clobber_ref
- jwst.refpix.irs2_subtract_reference.clobber_ref(data, output, odd_even, mask, ref_flags, is_irs2, scipix_n=16, refpix_r=4)[source]
Set some interleaved reference pixel values to zero.
This is an explanation of the arithmetic for computing
refin the loop over the list of bit numbers that is returned bydecode_mask(). Reads of reference pixels are interleaved with reads of science data. The pattern of science pixels (S) and reference pixels (r) looks like this:SSSSSSSSrrrrSSSSSSSSSSSSSSSSrrrrSSSSSSSSSSSSSSSSrrrr ... rrrrSSSSSSSS
Within each amplifier output, a row starts and ends with 8 (scipix_n / 2) science pixels, and the row contains 32 blocks of 4 reference pixels. There are 20 (scipix_n + refpix_r) pixels from the start of one block of reference pixels to the start of the next.
kis an integer between 0 and 31, inclusive, an index to identify the block of reference pixels that we need to modify (we’ll set two of the pixels to zero).odd_evenis either 1 or 2, indicating that we should set either the first or the second pair of reference pixels to 0.The same set of interleaved reference pixels will be set to 0 regardless of integration number, group number, or image line number.
- Parameters:
- datandarray
The 4-D data array in detector orientation. This includes both the science and interleaved reference pixel values.
datawill be modified in-place to set some of the reference pixel values to zero. The science data values will not be modified.- outputndarray of int16
A 1-D array of amplifier output numbers, 1, 2, 3, or 4, read from the OUTPUT column in the DQ extension of the CRDS reference file.
- odd_evenndarray of int16
A 1-D array of integer values, which may be either 1 or 2, read from the ODD_EVEN column in the DQ extension of the CRDS reference file.
- maskndarray of uint32
The MASK column (1-D) read from the CRDS reference file.
- ref_flagsndarray of bool
Bad reference pixel flags (1-D) , matching the data row size in detector orientation.
Trueindicates a bad reference pixel.- is_irs2ndarray of bool
A 1-D array matching the data row size in detector orientation.
Trueindicates an interleaved reference pixel.- scipix_nint, optional
Number of regular (science) samples before stepping out to collect reference samples.
- refpix_rint, optional
Number of reference samples before stepping back in to collect regular samples.