This recipe boils down to making a filter file and PCA response. First the filter file:
- Insert the target RA & Dec into the stdprod index file:
The program that generates the filter file, xtefilt, needs the target position in order to calculate the instantaneous pointing offset (the OFFSET column in the filter file). It gets this information from the RA_OBJ and DEC_OBJ keywords in the primary header of the stdprod index file. In realtime data, the RA and Dec are both zero and should be replaced with their correct values:
- Find the stdprod index file. This is a file beginning with FIST at the ObsId level, e.g.
20077-01-13-00/FIST_5e47bf5-5e488d9.
- Create an ASCII file, containing the correct RA and Dec in decimal degrees, like this example:
RA_OBJ 266.137909
DEC_OBJ -28.741100
We'll call it position.
- Run the ftool fmodhead to insert the new values into the primary header of the stdprod index file:
fmodhead FIST_5e47bf5-5e488d9+0 position
- Create a list of AppIds for filtering:
Xtefilt requires an ASCII list of application IDs and columns from which it obtains data to make the filter file. The standard list can be found be typing fhelp xtefilt.
We'll call the AppId list realtime_applist.
- Determine the "real" ObsId from the FMI file:
Xtefilt needs to know the location of the files containing the listed AppIds. It gets this information first by looking at the FMI file which contains pointers to the subsystem index files which in turn point to the files themselves. Since xtefilt makes one filter file per ObsId, and since an FMI file can sometimes point to more than one ObsId, xtefilt also needs the ObsId.
However, the ObsId specified in the FMI is not the same as the one implied by the name of the tar file (which is also the ObsId the production data will be known by). Rather, realtime ObsIds are denoted with a slightly different convention. For example, the ObsId that appears to be 20077-01-13-00 is listed in the FMI file as D1144-05-07-01R. To get the realtime ObsId, either run XDF and look in the "Observations" window or run fdump on the FMI file, like this:
fdump mode=h prhead=no infile=20077-01-13-00/FMI columns=ObsId
ObsId
1 D1144-05-07-01R
- Create the filter file:
Here, we'll create the filter file pulburst_13.xfl in the current directory using the files we created above. Default binning of 16 seconds is used.
xtefilt -f pulburst_13
Running XTEFILT v1.3
##########################################
Observation ID: [] D1144-05-07-01R
Path to XTE FITS Database: [] /data/realtime/20077-01-13-00
File containing AppID list: [] realtime_applist
Timestep: [16.0]
The resulting file has the same columns (bar the HEXTE particle monitors) as one generated from production data. But it will likely have gaps corresponding to periods when the spacecraft was not in contact with the ground station.
And now for the response matrix:
- Extract your spectrum:
Follow the usual procedure which, for PCA data, is described in the recipe Reduction and Analysis of PCA Spectra. However, please be aware of the following caveats:
- Realtime datafiles have only one GTI extension, containing those times when telemetered data were present. These GTI are applied by answering "APPLY" to the saextrct prompt
Input GTI files to be OR'd.
- Realtime slew data are not separated into their own ObsIds. To ensure that your data are entirely on source, we recommend creating a GTI file from your filter file with the ftool maketime. Like this:
maketime
Name of FITS file and [ext#][] pulburst_13.xfl
Name of output FITS file[] on_target.gti
Selection Expression[] OFFSET.lt.0.02
Column containing HK parameter names[NAME]
Column containing HK parameter values[VALUE]
Column containing HK parameter times[TIME] Time
Flag, yes if HK format is compact[no]
The criterion used here is that pointing offset be less than 0.02 degrees. The file should be input at the saextrct prompt Input GTI file to be AND'd with INFILE.
- Insert the target RA & Dec into the PHA file:
The program that generates the response, pcarsp, needs the target position in order to calculate the effective area. It gets this information from the RA_OBJ and DEC_OBJ keywords in the first extension header of the PHA file. In realtime data, the RA and Dec are both zero and should be replaced with their correct values. The procedure is the same as for inserting the target RA & Dec into the stdprod index file, as described above. Indeed, the same ASCII file can be used. Note, however, that the "+0" should be omitted, e.g.:
fmodhead flare.pha position
[This step is not strictly necessary if the previous step is followed: Selecting only on-target data means, in effect, that the target is at the center of the field of view, in which case "NONE" can be given to pcarsp as the attitude file.]
- Run pcarsp:
This is described in the recipe Creating PCA Responses.