do_correction

jwst.pathloss.pathloss.do_correction(input_model, pathloss_model=None, inverse=False, source_type=None, user_slit_loc=None, return_corrections=True)[source]

Execute all tasks for Path Loss Correction.

Parameters:
input_modelJwstDataModel

Science data to be corrected. Updated in place.

pathloss_modelMirLrsPathlossModel, PathlossModel, or None, optional

Pathloss correction data

inversebool, optional

Invert the math operations used to apply the pathloss correction.

source_typestr or None, optional

Force processing using the specified source type.

user_slit_locfloat, optional

User-provided slit location in units of arcsec, where (0, 0) is the center and the edges are +/-0.255 arcsec.

return_correctionsbool, optional

If True, a model containing the applied corrections is returned.

Returns:
input_modelJwstDataModel

The corrected science data with pathloss extensions added.

correctionsJwstDataModel, optional

A model of the correction arrays, returned if return_corrections is True.