next up previous contents
Next: Fit Commands Up: Data Commands Previous: notice

response: change the detector response for a spectrum

Modify one or more of the matrices used to describe the response(s) of the associated spectrum to incident X-rays.

           Syntax:            response [ <filespec>...]

                response  [<source num>:]<spectrum num> none


      <filespec> =:: [[<source num>:]<spectrum num>] <file name>...,

and <file name> is the name of the response file to be used for the response of the associated spectrum. If  <file name> ends in a {n}specifier then the nth response will be read from the file. <spectrum num> is the spectrum number for the first file name in the specification, and follows similar rules as described in the data command description. An important difference however is that the response command may only be used to modify the response of a previously loaded spectrum: an error message is printed if the <spectrum num> is greater than the current number of spectra (as determined from the last use of the data command).

An optional <source num> may be specified to attach additional responses to a spectrum, and should be paired with <spectrum num> separated by a ‘:’.  This allows the user to assign multiple models, each with their own response file, to a particular spectrum.  See the model command for more information.  If no <source num> is specified, it always defaults to 1.  Source numbers do not need to be assigned consecutively to a spectrum, and gaps in numbering are allowed.  The additional response may be removed with a response <source num>:<spectrum num> none command.  Both the show data and show response commands will display current information regarding the response(s) to spectrum assignments. 

A file name none indicates that no response is to be used for that spectrum. This situation means that any incident spectrum will produce no counts for those particular channels. If a file is not found or cannot be opened for input, then the user is prompted for a replacement response file.  An  <EOF> at this point is equivalent to using none as the response. See the data command for ways to totally remove the spectrum from consideration. The user is also prompted for a replacement if the response file has a different number of PHA channels than the associated spectrum. A warning will be printed out if the response detector ID is different from the associated spectrum's. The current ignore status for channels is not affected by the command. (See the ignore and notice commands).


It is assumed that there are currently three spectra:

Single source usage:

XSPEC12> response a,b,c                          // New files for the response are given for all three files.

XSPEC12> response 2 none                       // No response will be used for the second file.

XSPEC12> response ,d{2}                         // The second response in d becomes the response for

                                                                   //the second file.


Multiple source usage:

XSPEC12> response 2:1 e                          // A second source with response e.pha is now added to

                                                                   // the first spectrum.  A second model can be assigned

                                                                   // to this source.

XSPEC12> response 2:2 f  3:2 g                // A second and third source is assigned to spectrum 2.

XSPEC12> response 2:2 none                  // The second source is now removed from spectrum 2.


next up previous contents
Next: Fit Commands Up: Data Commands Previous: notice