pha2xspec-param


NAME

pha2xspec-param - generate XSPEC parameter databases for .pha files


PARAMETERS

pha2xspec-param uses the standard parameter interface

input file list
This parameter specifies the list of files to convert. If the value begins with an @ character, it designates a file which contains a list of the files to process. Otherwise, it may be a space or comman delimited list of files to process.

filelist filename
This parameter specifies the name of a file into which pha2xspec-param will write a list of the files it creates. This may be useful in batch scripts, especially if pha2xspec-param is invoked on .scn or .sum files, from which it may create more than one output file.

line_model string
The name of the model to use for lines. It must appear in the defaults database (see the defaults_db parameter).

cont_model string
The name of the model to use for the continuum. It must appear in the defaults database (see the defaults_db parameter).

defaults_db file name
The defaults database is an rdb database which contains information necessary to create the output parameter database. The database format and contents are described below.

gas_db filename
An rdb database which matches the gas names (as present in the data files) with the XSPEC gas id. An example of such a file is /proj/axaf/simul/databases/analysis/gas.rdb.

line_db filename
An rdb database which matches the target material and the target high voltage with emission lines to model. An example of such a file is /proj/axaf/simul/databases/analysis/xrcf_eips_lines.rdb.

filter_db filename
An rdb database which matches the filter name with an XSPEC filter id and a thickness. An example of such a file is /proj/axaf/simul/databases/analysis/pipe_filter.rdb.

resp_db filename
An rdb database which matches the detector to a detector response file. id and a thickness. An example of such a file is /proj/axaf/simul/databases/analysis/det_resp.rdb.

fallback_db filename
This is a parameter file which contains fallback values for data that are in the .sum files, but which may be set to None there. The values in the parameter file are only used if the values are None. An example of such a file is in /proj/axaf/simul/databases/analysis/xspec-param_fallbacks.par

override boolean
If true, the values in the fallback_db will be used, regardless of the values of the parameters in the .sum files.

verbose boolean
Be verbose.

help boolean
Print out a simple help message and exit.

version boolean
Print out pha2xspec-param's version and exit.

debug list
A list of debug flags. None are presently defined.

ftools path
A path to the FTOOLS binary directory. It is usually ok to leave this blank. However, if pha2xspec-param can't find FTOOLS, it'll die.

.


DESCRIPTION

pha2xspec-param reads a .sum file and creates an output rdb table which reflects the parameters and their values needed by XSPEC to perform a fit. It makes the assumption that there is only one detector per .pha file.

At present, only the .sum file is needed for input parameter values. In order to make life easier, it will also recognize .scn, and .pha files, and determine the appropriate .sum file.

Input files may have one of three suffixes: .scn, .sum, and .pha. For a .scn file, the name should have the format XXXXX.scn. pha2xspec-param will create parameter databases for all .pha files with the template acqXXXXXd?i?.pha.

Files which end in .sum should have the template XXXXXd?.sum. pha2xspec-param will create parameter databases for all .pha files with the template acqXXXXXd?i?.pha.

Files which end in .pha are processed directly.


The parameter defaults database

The parameter defaults database is in rdb form, and contains information about the parameters for each model (whether they are to be fit or held fixed, whether they are shared betweend all of the instantiations of the models, and to which model they belong). An example illustrating this is shown below.

The header to the database must contain a list of models in the database, in the format shown in the example (a # character indicating a comment line, the word models followed by a colon, and a space or comma separated list of model names).

The columns and their meanings are:

param -
the name of the parameter

value -
the default value of the parameter. parameters whose values are determined from the .pha or .sum files should be given the value INVALID to force an error in XSPEC if they are not properly determined.

fit -
a boolean value indicating whether the parameter is to be varied (fit) or held constant. Use yes or no.

unique -
a boolean value indicating whether the parameter is unique to an instantiation of the model, or whether it is shared amongst them. For instance, the detector gain is the same for all of the lines and the continuum in a single fit, but the normalization is different for the lines and continuum models.

model columns -
these columns have the same names as the models listed in the header of the database. Their values indicate the order in which XSPEC expects the parameter values to be input. The order is relative (i.e. the values do not indicate absolute position), and a value of 0 indicates that the parameter is not used by that model.

.

An example parameter defaults database

# models: jmkramer jmmodel param value fit unique jmkramer jmmodel ------- ------------ --- ------ -------- ------- fano 0.500000 no no 1 1 polyah 1.00000 no no 2 2 E_lin INVALID no yes 0 3 i_pot 2.800000E-02 no no 3 4 gain 4.00000 yes no 4 5 E_max INVALID no no 5 6 src_flt 2.00000 no no 6 7 flt_thk 1.000000E-03 no no 7 8 gas INVALID no no 8 9 T INVALID no no 9 10 p INVALID no no 10 11 offset 0. no no 11 12 broad 0. no no 12 13 displ 0. no no 13 14 norm INVALID yes yes 14 15


The output databases

The output databases are rdb files, and are named using the basename of the .pha file with _fitpar.rdb appended. Each row is a new instantiation of a line or continuum model. There are three columns which are always present: id, model , use. id uniquely identifies the instantiation of a given model. model indicates which model is to be used for that row of data, and use is a convenience flag indicating that the row is to be translated for XSPEC. If you wanted to quickly remove a line from a fit, for example, you could set the use column for that row to no.

The remaining rows contain the parameter values. Each parameter actually gets two rows, the first containing the value; the second indicating whether that parameter is to be fit or held constant. The latter have the name paramname_fit.


The fallback database

Normally, values for the following fields are read from the .sum file: srcTarget, srcHV_kV, filterId, gasType, T, and p. For some .sum files, these parameters have the value of None, or are not specified. In these cases, the fallback database is used to fill in the values. The values may be set in the database using pset, or may be specified on the pha2xspec-param command line. If the override flag is true, then the values in the fallback database will always be used.


AUTHOR

D. Jerius