correct_picture_frame

jwst.picture_frame.picture_frame.correct_picture_frame(input_model, pictureframe_model, mask_science_regions=True, n_sigma=2.0, input_dir='', save_mask=False, save_correction=False)[source]

Correct full-frame NIRSpec data for the thermal picture frame effect.

Parameters:
input_modelRampModel, ImageModel, or CubeModel

Science model to be corrected. Updated in-place.

pictureframe_modelPictureFrameModel

Picture frame reference model.

mask_science_regionsbool, optional

Mask regions of the image defined by WCS bounding boxes for slits/slices, as well as any regions known to be affected by failed-open MSA shutters.

n_sigmafloat, optional

N-sigma rejection level for finding outliers.

input_dirstr, optional

Path to the input directory. Used by sub-steps (e.g., assign_wcs for NIRSpec MOS data) to find auxiliary data.

save_maskbool, optional

Switch to indicate whether the scene mask should be saved.

save_correctionbool, optional

Switch to indicate whether the scaled correction data should be saved.

Returns:
output_modelRampModel, ImageModel, or CubeModel

Corrected data, updated in-place.

mask_modelImageModel

Pixel mask to be saved or None.

correction_modelRampModel, ImageModel, or CubeModel

Correction model to be saved or None.

status{‘COMPLETE’, ‘SKIPPED’}

Completion status:

  • 'SKIPPED' if errors were encountered and the output data is unchanged from the input data.

  • 'COMPLETE' otherwise.