Spectra can be obtained for HXS data using the program HXS_FSP, which
takes the WBS index and data structures, and returns the parameters
for whatever type of spectrum is desired. HXS_FSPis interactive. You
choose the data interval, and the type of fit. The routines
HXSGRS_FSP, GRS32_FSPand HXT_FSPwork in the same way, for the
HXS-GRS, GRS first 32 channels, and HXT data. The examples shown here
will apply to all of them.
First, you must read the WBS data. The most simple method is to use
YODAT, but you can read a WBS data file directly using RD_WDA.
Given index and data, some sample calls to HXS_FSPare:
IDL> HXS_FSP, index, data, fit_pars
IDL> HXS_FSP, index, data, fit_pars, sc_par, ch_dta
IDL> HXS_FSP, index, data, outfile=outfile
IDL> HXS_FSP, index, data, pfile=pfile
IDL> HXS_FSP, index, data, countfile=countfile
IDL> HXS_FSP, index, data, fit_pars, sc_par, ch_dta, sdel=sdel
The input parameters, index and data, must always be present.
All of the other parameters are optional. The structure fit_parscontains the results of the fit, including the type of fit, the values
of the parameters, labels for the different parameters, the value of
, and the interval and background times. (Times are given in
the standard 7-element array, [hr,min,sec,msec,day,mon,yr].) The
structure sc_parcontains spectrometer channel information, such as the
channel edges and the background count rate; ch_dtais a structure
containing the data for each channel. The keyword pfile is the name
for an output plot PostScript file, outfile is a name for a file for a
print-out of the results, sdel is an array of channels you'd like to
delete. The keyword countfile is the name for a file, with the format
given in /ys/ucon/soft/mctiernan/spectral_data_format, which can be fit by the
instrument-independent routine FSP_PROC.
The following are the steps required to fit HXS spectra.
Tyspec and 9, thermal plus broken power law, and triple power law
fits are available, although not yet recommended.
always denotes
the photon flux at 1 keV in photons/
,
is
the spectral index,
is temperature in degrees K, and
is
emission measure in
;
is the break energy in keV.
That's all there is to it. The program will plot each fit on the screen as it is completed, and if the keyword ``pfile'' is set, these plots go into the specified file.