next up previous contents
Next: *qpspec* - Extraction of Up: Spectral Analysis Previous: Model Spectra for Spectral-Fitting

   
Structure of the Spectral Package

Several of the tasks in the spectral package share a common set of parameters. These parameters reside in the task pkgpars. Each task in the spectral package has a hidden parameter which points to the pkgpars parameter file. The parameters stored here include the observed data sets and the model descriptor, and instrument-specific parameters. Each task also has its own parameter file.

To examine the common parameter file, type:

  xs> lparam pkgpars | page
The task pkgpars allows the user to edit the pkgpars.par file as if they had called eparam pkgpars.
  xs> pkgpars
It is also valid to use the other IRAF methods to change this parameter file.
  xs> pkgpars.<param>=<newvalue>


This will set the value of param to newvalue, overwriting the previous value.


With this structure, the data and model may be passed from one task to the next without further user intervention, but the user has the option to make a change at any time. Because the observed data set and the model are in the pkgpars parameter file and not in the parameter file for each task, it is not possible to use them as positional arguments on the command line as with other automatic parameters. But one may change them on the command line using the syntax of hidden parameters. For example, to use these parameters without the user being prompted, one could type:

  xs> fit observed=rp90 model=``abs(21:23)*pow(4:7)''

The observed counts and error data set contained in the table file (*_obs.tab) produced by qpspec will be the input data for subsequent spectral tasks.

Spectral fits (tasks fit, singlefit) will output a distinct table file, the _prd table. The _prd table contains: the input data set and errors, the input model (imod), the output best fit parameters and corresponding count distribution, and the output model (omod). `omod' is a string that contains the model centered on the best fit parameter values. This latter can be the input for the search_grid task.

The task fit also generates a table for the best fit spectral model, with the extenstion _int.

The user has no control over the _prd file name: it will have the same root as the input file, with the new extension `_prd' instead of `_obs'. It will be written in the current directory by default, regardless of where the input _obs file is stored. (Everything to the left of the last ``/" or ``$" character in the input table name is the `directory path', and it will not be part of the _prd table name.) The user has the option of changing the output directory by setting the parameter prd_dir in the pkgpars parameter file to the desired value (null string $\equiv$ current directory).


Since some of the spectral tasks require both the _obs and the _prd tables as input, but ask for only the observed data set, it is important that the `root' name remain the same; otherwise the task will not find the predicted data set.


Subsequent runs of the model fitting routines will produce different best fit models. The user has the option of keeping only the results from the last run, or to store all of them in separate columns in the output table. In the latter case, subsequent runs will be numbered sequentially. The parameter predict in the pkgpars parameter file regulates this choice.


Multiple data sets can be fitted to the same model. Separate input data set names should be given at the prompt, separated by semicolons. Multiple _prd tables will be the output, with one for each input data set. The same rules for the output table names apply, so that each _prd will have the same `root' name as the corresponding _obs, and all will be written in the same directory, regardless of whether the input tables are in the same or in separate directories.


The choice of spectral channels to be used in the fit is regulated by a hidden parameter in the pkgpars parameter file. The channels can be changed easily at run time, by specifying them within [ ] at the end of the input file name. The section on Limiting Energy Channels gives an example of this.


next up previous contents
Next: *qpspec* - Extraction of Up: Spectral Analysis Previous: Model Spectra for Spectral-Fitting
rsdc@cfa.harvard.edu
1998-06-10