sxsanticopi -- Assign PHA and PI columns to the SXS anticoincidence events


sxsanticopi infile outfile gainfile


'sxsanticopi' calculates the PHA and PI values of the events detected by the SXS anticoincidence. The PHA is calculated by taking the difference of the values in the ADC_SAMPLE_MAX and ADC_SAMPLE_PEDESTAL columns present in the antico event data file. To calculate the PI, 'sxsanticopi' uses the coefficient of a polynomial stored in the antico gain CALDB file for each of the PSP. The same antico events are read by both PSP-A and PSP-B electronics and stored in the event file. The column PSP_ID has the telemetered information of the PSP value. To calculate the PI, 'sxsanticopi' uses the coefficients of a polynomial stored in the antico gain CALDB file for both PSP. For each antico event, 'sxsanticopi' first reads the PSP_ID value and after applies the gain coefficients corresponding to the appropriate PSP. If the event is a 'LOST' events the PHA and PI are set to TNULL values (-32768). The number of PI channels are 12200 and each channel corresponds to 0.5 keV bin.


infile [filename]
Input antico event file name.

outfile [filename]
Output antico event file name.

gainantfile [filename]
Name of the calibration file with the polynomial coefficients to convert PHA to PI for both PSP-A and PSP-B or CALDB (default).

(acphaoffset = 0.0) [float]
Average offset added to PHA values before applying the gain. A random offset is added to each PHA between -0.5+acphaoffset and +0.5+acphaoffset. So, when acphaoffset=0.5, the random offset is between 0 and 1.

(randomize = yes) [boolean]
If set to yes, PI is calculated from PHA using decimal randomization ([yes]/no).

(seed = 0) [integer]
Random number generator seed; uses system time for seed=0.

(buffer = -1) [integer]
Rows to buffer (-1=auto, 0=none, >0=numrows).

(clobber = no) [boolean]
Overwrites the existing output file if set to yes (yes/[no]).

(chatter = 1) [integer]
Chatter level for output. Set to 0 to suppress output, or to 1, 2, or 3 for increasing the chatter of the output.

(logfile = !DEFAULT) [string]
Log filename. If set to DEFAULT uses the name of the task and, if preceded by '!', overwrite the file if it exists. If set to NONE no log file is created.

(debug = no) [boolean]
Diagnostic output is printed out on the screen if set to yes (yes/[no]).

(history = yes) [boolean]
Records tool parameters in HISTORY ([yes]/no).

(mode = ql) [string ql|hl|q]
Mode to query the parameter file. Acceptable values include: 'ql' (query and learn/remember), 'hl' (hidden and learn/remember), 'q' (query but don't remember), 'h' (hidden).(Optional)


1. Calculate the antico PHA, and the antico PI for events in antico_in.fits. Use the gain coefficients in CALDB and randomization to calculate the PI values, and include these in the output file antico_out.fits.

      sxsanticopi antico_in.fits antico_out.fits CALDB



Feruary 2, 2016