jwst.straylight.correct_mrs_modshepard(input_model, slice_map, roi, power)[source]

Straylight correction using a modified Shepard algorithm.

Corrects the MIRI MRS data for straylight using a Modified version of the Shepard algorithm. Straylight is determined using an inverse distance weighting function. The inverse distance weighting is determined by module shepard_2d_kernel(roi,power).

  • input_model (IFUImageModel) – Science data to be corrected.

  • slice_map (ndarray) – Holds the pixel region mask for the correction. slice = (band*100+slice#) gap = 0

  • roi (float) – Region of influence (size of radius)

  • power (float) – Exponent of Shepard kernel.

  • sci_ngroups (int) – Number of groups in input data.


output – Straylight-subtracted science data.

Return type