NIRISS

class jwst.ami.instrument_data.NIRISS(filt, nrm_model, bandpass, chooseholes=None, affine2d=None, usebp=True, firstfew=None, run_bpfix=True)[source]

Bases: object

Module for defining NIRISS data format, wavelength info, and mask geometry.

Parameters:
filtstr

Filter name.

nrm_modelNRMModel

Datamodel containing mask geometry information.

bandpassSpectralElement, array, or None

Array should be in the format of [(wt,wlen), (wt,wlen), ...]. Monochromatic would be, e.g., [(1.0, 4.3e-6)]. Explicit bandpass argument will replace all NIRISS filter-specific variables with the given bandpass, so you could simulate, for example, a 21cm PSF through something called “F430M”.

chooseholeslist, optional

List of hole names to use, e.g., ['B2', 'B4', 'B5', 'B6'] for a four-hole mask, If not specified, all the holes will be used.

affine2dAffine2d object, optional

Affine2d object. If not specified, an ideal affine2d object will be used.

usebpbool

If True, exclude pixels marked DO_NOT_USE from fringe fitting.

firstfewint

If not None, process only the first few integrations.

run_bpfixbool

Run Fourier bad pixel fix on cropped data.

Methods Summary

mast2sky()

Rotate hole center coordinates.

read_data_model(input_model)

Read the NIRISS data model.

Methods Documentation

mast2sky()[source]

Rotate hole center coordinates.

Rotation of coordinates is:

  • Clockwise by the ROLL_REF + V3I_YANG from north in degrees if VPARITY = -1

  • Counterclockwise by the ROLL_REF + V3I_YANG from north in degrees if VPARITY = 1

Hole center coords are in the V2, V3 plane in meters.

Returns:
ctrs_rotarray

Rotated coordinates to be put in OIFITS files.

Notes

Nov. 2024 email discussion with Tony Sohn, Paul Goudfrooij confirmed V2/V3 coordinate rotation back to “North up” equatorial orientation should use ROLL_REF + V3I_YANG (= PA_APER).

read_data_model(input_model)[source]

Read the NIRISS data model.

Retrieve info from input data model and store in NIRISS class. Trim refpix and roughly center science data and dq array. Run Fourier bad pixel correction before returning science data.

Parameters:
input_modelJwstDataModel

DM object for input

Returns:
scidata_ctrdndarray

Cropped, centered, optionally cleaned AMI data

dqmask_ctrdndarray

Cropped, centered mask of bad pixels