flag_nirspec_hot_pixels

grizli.jwst_utils.flag_nirspec_hot_pixels(data='jw02073008001_03101_00002_nrs2_rate.fits', rnoise_percentile=90, rnoise_threshold=16, hot_filter_sn_max=-3, corner_sn_max=-2, jwst_dq_flags=['DO_NOT_USE', 'OTHER_BAD_PIXEL', 'UNRELIABLE_SLOPE', 'UNRELIABLE_BIAS', 'NO_SAT_CHECK', 'NO_GAIN_VALUE', 'HOT', 'WARM', 'DEAD', 'RC', 'LOW_QE'], dilate_footprint=array([[False, True, False], [True, False, True], [False, True, False]]), **kwargs)[source]

Flag NIRSpec MOS hot pixels

Parameters
datastr, HDUList

NIRSpec image filename or open HDU object with SCI, ERR, DQ extensions.

rnoise_percentilefloat

Percentile of rnoise array for the absolute threshold

rnoise_thresholdfloat

The absolute hot_threshold is percentile(ERR_RNOISE, rnoise_percentile) * rnoise_threshold

max_filter_size, hot_filter_sn_max, corner_sn_max, jwst_dq_flagsint, float, float

See flag_nircam_hot_pixels

dilate_footprintarray-like

Footprint for binary dilation on the dq mask

Returns
snarray-like

S/N array derived from file

dqarray-like, int

Flagged pixels where hot = jwst.datamodels.dqflags.pixel["HOT"] and plus = jwst.datamodels.dqflags.pixel["WARM"]

countint

Number of flagged pixels