NAME

sxsanticopi - Assign PHA and PI columns to Hitomi SXS anticoincidence events.

USAGE

sxsanticopi infile outfile gainantfile

DESCRIPTION

The sxsanticopi task calculates the PHA and PI values of events detected by the SXS anticoincidence detector, and stores these in the corresponding columns in the output file. 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 PI, sxsanticopi uses the coefficients of a polynomial stored in the antico gain calibration database (CalDB) file for each 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 contains the telemetered information of the PSP value. For each antico event, sxsanticopi first reads the PSP_ID value, and then applies the gain coefficients corresponding to the appropriate PSP. If the event is a lost event, the values in the PHA and PI columns are set to TNULL values (-32768). The number of PI channels is 12200, and each channel corresponds to a bin with width of 0.5 keV.

PARAMETERS

infile = sff_in.evt [filename]
Input antico event file name.

outfile = sff_out.evt [filename]
Output antico event file name.

gainantfile = CALDB [filename CALDB|file name]
Name of the file with the polynomial coefficients needed to convert PHA to PI for both PSP-A and PSP-B. If the parameter is set to CALDB, the file is read from the CalDB.

(acphaoffset = 0.0) [double]
Average offset added to PHA values before applying the gain, if 'randomize=yes'. A random offset is added to each PHA between -0.5+acphaoffset and +0.5+acphaoffset. For example, when acphaoffset=0.5, the random offset is between 0 and 1.

(randomize = yes) [boolean yes|no]
If set to yes, a decimal randomization of +/-0.5 channels is applied to PHA.

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

(buffer = -1) [integer -1|0|N]
Rows to buffer (-1=auto, 0=none, N>0=number of rows).

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

(chatter = 1) [integer 0|1|2|3]
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 DEFAULT|NONE|file name]
Log file name. If set to DEFAULT, uses the name of the task and, if preceded by "!", overwrites the file if it exists. If set to NONE, no log file is created.

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

(history = yes) [boolean yes|no]
Records task parameters in HISTORY.

EXAMPLES

  1. Calculate the antico PHA and PI values for events in antico_in.fits and write these in antico_out.fits, using randomization and the gain coefficients in CALDB.
  2.    sxsanticopi antico_in.fits antico_out.fits CALDB
    

SEE ALSO

LAST MODIFIED

November 1, 2023