niriss_ghost_mask

grizli.utils.niriss_ghost_mask(im, init_thresh=0.05, init_sigma=3, final_thresh=0.01, final_sigma=3, erosions=0, dilations=9, verbose=True, **kwargs)[source]

Make a mask for NIRISS imaging ghosts

See also Martel. JWST-STScI-004877 and https://github.com/spacetelescope/niriss_ghost

Parameters
imHDUList

Input image HDUList.

init_threshfloat, optional

Initial threshold for detecting ghost pixels. Default is 0.05.

init_sigmafloat, optional

Initial sigma threshold for detecting ghost pixels. Default is 3.

final_threshfloat, optional

Final threshold for detecting ghost pixels. Default is 0.01.

final_sigmafloat, optional

Final sigma threshold for detecting ghost pixels. Default is 3.

erosionsint, optional

Number of binary erosions to apply to the ghost mask. Default is 0.

dilationsint, optional

Number of binary dilations to apply to the ghost mask. Default is 9.

verbosebool, optional

If True, print diagnostic messages. Default is True.

Returns
ghost_maskndarray

Boolean array indicating the positions of the ghost pixels.