NAME

rslmpcor - Correct EPI2 and PI values for mid-resolution XRISM Resolve events

USAGE

rslmpcor infile outfile hkfile

DESCRIPTION

The rslmpcor task corrects the EPI2 energy column for mid-resolution primary (Mp) and secondary (Ms) events in a XRISM Resolve event file, and then uses that corrected value to recalculate the corresponding PI column. It should be applied following all other energy assignment steps, including rslseccor and rslpha2pi. Because the XBOX temperature affects the detector bias differently for high-resolution events than for mid-resolution events, the latter require an adjustment when the energy gain drift correction is based on the former as is the case for the rslgain task. The EPI2 energy correction factor takes the form of a fifth-order polynomial as a function of the XBOX temperature. The function coefficients for each pixel are queried from a CalDB file derived from in-flight measurements, and then the EPI2 value is scaled by this factor applied as a linear stretch.

After correcting the EPI2 values a new PI value is calculated using the same equation as the rslpha2pi task, PI=floor((EPI2 - offset)/binwidth) + 1.0), where offset and binwidth are set by rslpha2pi and are both 0.5 when default values are used. PI for Resolve pixel events range from 0 to 59999. If the input EPI2 is NULL, or if the calculated PI value is less than 0, PI is set to NULL. If PI > 59999 its value is set to 59999.

If the calcxboxtemp parameter is set to yes, the XBOX temperature is recalculated from the from the column specified by the xboxtempcol parameter in the file and extension specified by the hkfile and xboxtempext parameters, respectively. If the calcxboxtemp parameter is set to no, the XBOX temperature is directly extracted from the column specified by the xboxtempcalcol parameter. If the calcxboxtemp parameter is set to DEFAULT, the XBOX temperature is recalculated when the pre-pipeline version corresponds to an early time that contained a telemetry database error, and otherwise directly extracted from xboxtempcalcol.

PARAMETERS

infile [filename]
Input Resolve event file name.

outfile [filename]
Output Resolve event file name.

hkfile [filename]
Input housekeeping file name.

(xboxtempext = "HK_XBOXA") [string]
Name of the input housekeeping file XBOX temperature extension.

(xboxtempcol = "XBOX_TEMP3") [string]
Name of the input housekeeping file column for XBOX temperature in ADC counts.

(xboxtempcalcol = "XBOXA_TEMP3_CAL") [string]
Name of the input housekeeping file column for XBOX temperature in engineering units (K).

(mpcorfile = CALDB) [filename CALDB|file name]
Input file containing polynomial coefficients for each pixel that determine the correction factor as a function of XBOX temperature. If the parameter is set to CALDB, the file is read from the calibration database, CalDB.

(calcxboxtemp) [string DEFAULT|yes|no]
If 'calcxboxtemp=yes', or if 'calcxboxtemp=DEFAULT' and the prepipeline version is 3.1 or prior, the XBOX temperature is recalculated. If 'calcxboxtemp=no', the XBOX temperature is extracted from the xboxtempcalcol column in the file and extension specified by hkfile and xboxtempext, respectively.

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

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

(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 tool parameters in HISTORY.

EXAMPLES

  1. Correct EPI2 and PI for mid-resolution events in the event file from OBSID 300036010. Use the housekeeping file from the same sequence and CALDB for the mpcorfile.
  2.   rslmpcor infile=xa300036010rsl_p0px1000_uf.evt outfile=event_out.fits hkfile=xa300036010rsl_a0.hk1 mpcorfile=CALDB calcxboxtemp=default
    

SEE ALSO

rslpha2pi, rslseccor

LAST MODIFIED

October 16, 2024