rslmpcor infile outfile hkfile
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 is 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. While the energy scale accuracy for Mp events depends on that of the contents of the correction file (parameter 'mpcorfile'), that for Ms events also depends on the secondary correction applied by the rslseccor task and may not be as good in general.
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.
The xboxtempext, xboxtempcalcol, and calcxboxtemp parameters are utilized in testing and devepment and should not be reset by the standard user. If the calcxboxtemp parameter is set to yes, the XBOX temperature is recalculated 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.
rslmpcor infile=xa300036010rsl_p0px1000_uf.evt outfile=event_out.fits hkfile=xa300036010rsl_a0.hk1 mpcorfile=CALDB calcxboxtemp=default