hxdgsoxbpi - Produces dead time corrected GSO background spectrum, and a source spectrum.


hxdgsoxbpi @evts.list @pse.list @bkgs.list <outstem>


hxdgsoxbpi performs the following steps to produce output spectra:

  1. AND GTI from NXB file(s) with GTI in gso??_cl.evt file(s) (or spectrum file) and any extra input GTI file(s) after ORing them together.
  2. Extract source spectrum using same GTI as step 1., if a GSO cleaned event file is input
  3. Extract NXB background spectrum using GTI from step 1.
  4. Apply dead time correction to source spectrum and background spectrum using hxddtcorr.
  5. Optionally group source spectrum.


The number of output files depends on the input parameters and types of input files. If cleaned event files are used for the input_fname parameter, cxb_fname != 'NONE' and grouspec = "yes", then the output files will be as follows:
Source spectrum, corrected for dead time.

Grouped source spectrum

NXB background spectrum, corrected for dead time


input_fname [string]
Cleaned GSO event file(s) or GSO source spectrum. The GTI from this file is ANDed with the GTI from the GSO NXB background file, and optionally the GTI file(s) input in the gti_fname parameter (not supported for input spectrum). The resulting GTI is used to extract a spectrum from the cleaned GSO event file (if event files are input), the pseudo event file (see pse_event_fname parameter) and the GSO NXB file (see bkg_event_fname parameter).

A single spectrum for multiple event files can be extracted. Specify @flist, where flist is a file containing cleaned GSO event files (one per line) to use this feature. Extended filename syntax is supported for individual files.

If a spectrum is entered, only a single file is allowed, and no extra GTI filtering (see gti_fname param) is allowed. However, mutliple pseudo event files and background files can be entered if necessary.

pse_event_fname [string]
Pseudo event file name or WEL unfiltered file name if pseudo event file is unavailable. This file is used to correct the dead time of the source spectrum extracted from the cl_event_fname event file(s).

If multiple event files are input for the cl_event_fname parameter, then the files input for this parameter must correspond 1-1 to the cl_event_fname files. The same syntax is used as for the cl_event_fname parameter.

bkg_event_fname [string]
HXD GSO NXD file. These can be downloaded from:

Alternatively, if the full ftp or http path to the file(s) is known, it can be entered directly. There should be 1-1 correspondence between these files and the cl_event_fname files. The same syntax is used as for the cl_event_fname parameter. A warning will be issued if any of these files are the quick background.

outstem [string]
Output filenames will start with this string.

(gti_fname) [string]
Additional GTI file(s) to AND with both the GSO NXB GTI(s) and cleaned event GTI(s). If more than one file is specified, they will be ORed together before the AND operation. The same syntax is used as for the cl_event_fname parameter. There does not have to be 1-1 correspondence between the gti_fname files and the cl_event_fname event file(s). The files must be FITS GTI files.

(gsonom_rsp) [string]
GSO nominal pointing response matrix. The response matrix file corresponding to the nominal pointing of the input observation should be used. The nominal pointing can be checked by examining the 'NOM_PNT' FITS keyword in the input GSO cleaned event file. If set to 'CALDB', then the calibration database will be queried for the correct file.

(groupspec) [bool]
Group output source spectrum?

(groupfile) [file]
Name of file that contains a grouping specification for the grppha task. If set to 'DEFAULT', then a binning specification appropriate for the input data will be used.

(nxb_scale) [real]
The exposure time in the extracted NXB spectra will be multiplied by this parameter.

NOTE: It is unlikely that you will need to change this parameter.

(cleanup) [bool]
Remove temporary files?

(chatter) [0,5]
Terminal chat level. 0 => no chatter; 5 => debugging

(clobber) [bool]
Overwrite existing output files?

(history) [bool]
Add history keywords?



August 2009