median_replace_img

jwst.coron.median_replace_img.median_replace_img(img_model, box_size, bad_bitvalue)[source]

Replace any bad pixels with the median value of the surrounding pixels.

Parameters:
img_modelCubeModel

The input model.

box_sizescalar

Box size for the median filter.

bad_bitvalueint

The sum of all of the DQ bit values to consider bad. Setting to 0 will treat all pixels as good.

Returns:
img_modelCubeModel

The updated image model with the bad pixels replaced.