do_correction

jwst.reset.reset_sub.do_correction(output_model, reset_model)[source]

Subtract the reset correction from science arrays.

Subtracts the reset correction from science arrays and updates data quality array based on DQ flags in the reset arrays. The reset data model contains the number of initial frames in an integration to correct in the reset_model.meta.exposure.ngroups attribute (hereafter, reset_ngroups) and the number of integrations for which a correction exists in the reset_model.meta.exposure.nints attribute (hereafter, reset_nints). Only the first reset_ngroups in each integration will have a reset correction applied. If the number of integrations in the science data is larger than reset_nints, then the reset correction applied is the correction contained in the reset_nints integration.

Parameters:
output_modelRampModel

Science data to be corrected

reset_modelResetModel

Reset reference file model

Returns:
output_modelRampModel

Reset-subtracted science data