pha2xspec-fits


NAME

pha2xspec-fits - convert .pha files to XSPEC compatible FITS files


PARAMETERS

pha2xspec-fits 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-fits will write a list of the files it creates. This may be useful in batch scripts, especially if pha2xspec-fits is invoked on .scn or .sum files, from which it may create more than one output file.

rebin integer
This parameter specifies the binning factor for the data. pha2xspec-fits will create one output channel for each rebin input channels. If the last output channel has less than rebin input channels, it is discarded.

save boolean
pha2xspec-fits creates some intermedniate files which are passed to the FTOOLS fcreate program. If things go wrong, they are much easier to read than the resultant FITS file. Normally they are deleted. This option keeps them around

truetime boolean
Normally, the exposure time is determined from the liveTime family of keywords. This option makes pha2xspec-fits set the exposure time to that in the trueTime family of keywords.

verbose boolean
Be verbose.

help boolean
Print out a simple help message and exit.

version boolean
Print out pha2xspec-fits'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-fits can't find FTOOLS, it'll die.

.


DESCRIPTION

pha2xspec-fits reads a .pha file and creates one or more FITS files (one per detector output) suitable for import into XSPEC.

It used keyword values in the .pha header to set up the following FITS keywords:

PARENT - filename OBJECT - mansonAnodeComp TIME_OBS - startTime, startDate, date, fileCreationDate EXPOSURE - liveTime, liveTime_sec, liveTime_x20ms, trueTime, trueTime_sec, trueTime_x20ms

pha2xspec-fits used the FTOOLS program fcreate to do the actual conversion to FITS. If the ftools option is used to specify an FTOOLS root directory, it will look there first, else if the environmental variable FTOOLS_ROOT is present, it'll use that value. Finally, it'll look in /iraf/irafext/ftools (or in /proj/axaf/pkgs/ftools, depending upon the system).

Note that it wants the root directory, not the binary directory. It looks in the bin.host subdirectory for what it needs.

Additionally, fcreate requires a parameter file to work with, and preferrably one that it can write to. pha2xspec-fits sets the environmental variable PFILES to .;${FTOOLS_ROOT}/bin.host. fcreate will create a parameter file in the current directory, which is left there after pha2xspec-fits exits, as a gift.

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-fits will process all .pha files with the template acqXXXXXd?i?.pha.

Files which end in .sum should have the template XXXXXd?.sum. pha2xspec-fits will process all .pha files with the template acqXXXXXd?i?.pha.

Files which end in .pha are processed directly.


AUTHOR

Original script by R.J. Edgar, revamped by D. Jerius