5.3.3 SPFD HXS


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

5.3.3 SPFD HXS

 

SPFDHXS performs spectral fitting to the HXS data. The routine SPFDHXS runs on the only SUN workstation. After reading the data with YODAT, you choose a time interval for the flare data.
IDL> flph=out_hxsph(index,data,/disp)

IDL> flph=out_hxsph(index,data,stime=stime)
where /disp allows you to choose by mouse operation, and stime is the signal time to be chosen. Next you choose the background data in a similar way.
IDL> bgph=out_hxsph(index,data,/disp)

IDL> bgph=out_hxsph(index,data,stime=stime)
You get a count spectrum (plot of counts/s keV vs. energy) with
IDL> spplot_hxs,flph,bgph
The text file of the spectral data for SPFD (routine of spectral fitting double precision) is written with
IDL> write_hxsph,flph,bgph
The name of the text file (default) is HXS_SPECTRUM.DATA.

We have a simplified routine called TEST_OUTH. This routine consists of three functions, OUT_HXSPH.PRO, SPPLOT_HXS.PRO and WRITE_HXSPH.PRO which are mentioned above. You can do the same procedure shown above by using TEST_OUTH.


IDL> test_outh,index,data,/disp

IDL> test_outh,index,data,fltime=fltime,bgtime=bgtime
Next you set a spectral function (single power law, broken power law, thermal spectrum, Gaussian spectrum and their combination) and the initial values of spectral parameters in the file hxs.model.

This file must be in the executing directory of SPFDHXS. Maximum numbers of fitting models and parameters ( 'PAR', 'XPAR' and 'YPAR') are 10 and 20, respectively.

The following is a sample parameter file for power law analysis:

'REM'    SAMPLE FILE FOR POWER LAW ANALYSIS 
'SER'    0.01   /SYSTEMATIC ERROR
'CND'    300     3.00      0.001  / MAXSTP, CHISQ-MIN, VARIATION
'BIN'    01111111111111111111111111111110
'MDL'    POWL(1,2)
'PAR'    1          1         0.1         10
'PAR'    2         3.0       2.0         4.0
'OUT'    './HXS_RESULTS.DATA'
'FILE'   './HXS_SPECTRUM.DATA'

The following is sample parameter file for broken power law + Gauss analysis

'REM'      SAMPLE FILE FOR COUTOUR MAP (XAXIS INDEX1,YAXIS INDEX2)
'TRACE'    1                     / 1 OFF   0    ON
'SER'      0.01   /SYSTEMATIC ERROR
'CND'      300     3.00      0.001  / MAXSTP, CHISQ-MIN, VARIATION
'BIN'      01111111111111111111111111111110
'MDL'      BRPW(1,2,3,4) + GAUS (5,6,7)
'PAR'      1          1           0.1          10
'XPAR'     2          3.0        4.0          20
'YPAR'     3          4.0        5.0          20
'PAR'      4           70         50         100 
'PAR'      5          3.0        0.3          30
'PAR'      6          511         0            0
'PAR'      7           2          0.2          20
'XRMK'     'INDEX1  ( <Eb)'
'YRMK'     'INDEX2  ( >Eb)'
'TITLE'    'CONTOUR MAP INDEX 1/2'
'CHI2'     5.0    / MAXIMUM ALLOWED RED_CHI2 VALUE.
'LEVEL'    99.0     95.0      90.0     68.0    3.0   /MAX:(10)
'OUT'      './HXS_RESULTS.DATA'
'FILE'     './HXS_SPECTRUM.DATA'

For details on the parameters for these files, see the file $DIR_WBS_CAL/spfd_hxsample or /ys/ucon/soft/sato/hxs.model.

You carry out the spectral fitting on Sun machines with the command:
% /ys/ucon/soft/sato/spfdhxs
or from IDL with the command:
IDL> spfdhxs
 

You read the output file with the command
IDL> spfd=read_spfdhxs()
The name of file (default) is HXS_RESULTS.DATA. You plot the spectrum with
IDL> spfdplot_hxs,spfd

IDL> spfdplot_hxs,spfd,/chimap
You can plot a chi-square map with the second example above.

You can plot the time profile of time sequential data of spectral parameters (spectral index, spectral coefficient, temperature etc.) with
IDL> utplot,spfd.xtime,spfd.parafinal(1,*),spfd(0).fltime(0)+spfd(0).date

For details on the routines for this spectral fitting, use DOC_LIBRARY.


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


ydac@mssly1.mssl.ucl.ac.uk