separate_non_science_pixels
- jwst.coron.median_replace_img.separate_non_science_pixels(img_dq, bad_locations)[source]
Generate masks for science pixels and non-science pixels.
For the median filter, we don’t care about the NON_SCIENCE pixels, but they produce a ton of warnings that clog up the alignment algorithm and make it run really slowly. In this function, we take all the bad pixels and pull out the ones with NON_SCIENCE flags so we can set them to 0 without running the median filter.
- Parameters:
- img_dqndarray
Input data quality array.
- bad_locationsndarray
Flagged bad pixels (bool).
- Returns:
- science_pixelsndarray
Flagged science pixels (bool).
- non_science_pixelsndarray
Flagged non-science pixels (bool).