Next: 5.2.3 Example 3: Hard Up: User Examples Previous: 5.2.1 Example 1: I

5.2.2 Example 2: Processing Individual Days of Data

Let's say you've examined the light-curve reports from the standard SPECANAL products and see some hints of variability in the source. You want to examine the spectra for individual days or a range of days to discern the nature of the variability. How do you go about it?

First, you need an SDB file with the daily summed SDRs. Next, you need the appropriate response matrix. Daily summed SDRs reside in the Good-Sum (GSM) SDB file. The response matrix resides in the total (TOT) SDB file. FITIT requires a link between the SDRs and the response matrices in order to function. How do we do this?

It is possible to run SPECANAL so that it will generate the required file in its initial run, but we don't need to go back that far. It is also possible to generate the appropriate daily file if you have the regular output files from SPECANAL, particularly the GSM (Good-Sum) SDB file.

In IGORE, run the FFIT_PREP command with the /daily flag set. This will generate a <fileroot>_DAY.SDB file which contains pointers to the response matrices in <outfile>.

Igore> status=ffit_prep(file='ogre$dat:nom_cfg.fp',$
Igore>     SDBfile='$disk9:[osse.hilev]cygx-1_2_5_GSM.SDB',$
Igore>     outfile='cygx-1_daily_tot.sdb',$
Igore>     fileroot='cygx-1_daily',$
Igore>     filesetup='NONE',$
Igore>     logfile='cygx-1_daily_prep.log',$
Igore>     /daily)

Once the day file is generated, it is ready to use.

 
Igore> sdb=select_files('*day.sdb')

If more than one *DAY.SDB file is available you will be presented with the option to select the file desired. Otherwise this function will return with the value of SDB set. Next, let's load in the SDRs and examine their detectors and starting times.

Igore> sdr_load,sdb,sdr                  ; load all SDRs
Igore> start=getfld('hdr.strttim',sdr)   ; get the SDR starting times (
optional)
Igore> det=getfld('hdr.detid',sdr)       ; get the SDR detector IDs (
optional)

Next, generate an index to select the SDRs which will be summed. Sum them, making sure to attach the response matrix. Let's say for this example we wish to sum the first four (indices 0, 1, 2, and 3) SDRs

Igore> sdr$create,r_out,1                ; create an output record
Igore> sdr_sum,sdr(0:3),r_out,/matrix    ; add the SDRs into r_out

At last, you have an SDR (r_out) with an appropriate averaged response matrix. Now what?

At this point you have two options. You can continue the analysis in IGORE, or you can convert the SDR into a FITS format suitable for reading in XSPEC. To continue in IGORE, you can run FITIT on the individual SDR you've created, much like the previous example

Igore> status=fitit(sdr=r_out,modelfile='pwrlaw.mod',$
Igore>    fileroot='cygx-1_2_5_day1')

Again, you answer N to the `Read new Setup File?' prompt.

Alternatively, you can easily convert the new SDR into a count spectrum and response matrix file for use in XSPEC with:

Igore> igore_to_xspec,r_out,'cygx-1_2_5_day1'

This will create two files, the count spectrum with a .PHA file extension and the response matrix with a .RMF file extension.


Next: 5.2.3 Example 3: Hard Up: User Examples Previous: 5.2.1 Example 1: I