5.3.1 HXS_FSP (McTiernan)


next up previous contents
Next: 5.3.2 FSP_PROC (McTiernan) Up: 5.3 How to Fit Previous: 5.3 How to Fit

5.3.1 HXS_FSP (McTiernan)

 

  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_FSP is interactive. You choose the data interval, and the type of fit. The routines HXSGRS_FSP, GRS32_FSP and HXT_FSP work 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_FSP are:
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_pars contains 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_par contains spectrometer channel information, such as the channel edges and the background count rate; ch_dta is 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.

1.
First the program prompts for an HXS channel to be used for the choice of background and fitting intervals.

2.
Next you choose the background interval using the routine PLOT_LCUR. After the choice is made, the program asks you to confirm that you are satisfied with the chosen interval, if so, then you choose the fitting interval using another call to PLOT_LCUR.

3.
Once the choice of interval is confirmed, the program asks for the time resolution, in number of minor frames, which are 1 s apiece for HXS in flare mode, and 8 s apiece in quiet mode. (And 0.5 s in flare mode for HXT; 4 s in quiet mode, etc...) The resolution chosen need not be divisible into the total; the program will ignore extra data.

4.
Next the program prompts for an integer for the type of fit desired, tyspec. The array is the field of fit_pars which contains the fit parameters.

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.

5.
The program then asks if you want to delete channels, if you respond ``Y'' then you'll be prompted for the number of channels to delete, and the channel numbers. If the keyword ``sdel'' is set this step is skipped; the channels specified in sdel are not included in the fit, and if sdel is set to then all channels are included. Steps 3 and 4 will have associated keywords in future versions.

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.


next up previous contents
Next: 5.3.2 FSP_PROC (McTiernan) Up: 5.3 How to Fit Previous: 5.3 How to Fit


ydac@mssly1.mssl.ucl.ac.uk