clean_showers

jwst.straylight.straylight.clean_showers(input_model, allregions, shower_plane=3, shower_x_stddev=18.0, shower_y_stddev=5.0, shower_low_reject=0.1, shower_high_reject=99.9, save_shower_model=False)[source]

Correct the MIRI MRS data for straylight produced by residual cosmic ray showers.

Parameters:
input_modelIFUImageModel

Science data to be corrected.

allregionsndarray

Holds the regions information mapping MRS pixels to slices (3-D, planes for different throughput).

shower_planeint, optional

Throughput plane for identifying inter-slice regions.

shower_x_stddevfloat, optional

X standard deviation for shower model.

shower_y_stddevfloat, optional

Y standard deviation for shower model.

shower_low_rejectfloat, optional

Low percentile of pixels to reject.

shower_high_rejectfloat, optional

High percentile of pixels to reject.

save_shower_modelbool

If True, a shower model is created and returned along with the cleaned input_model array. If not, the output_shower_model returned is None.

Returns:
outputIFUImageModel

Straylight-subtracted science data.

output_shower_modelIFUImageModel or None

A datamodel containing the shower model, if save_shower_model is True.