TransformGrismconf

class grizli.grismconf.TransformGrismconf(conf_file='', get_photom=True, pivot_wavelength=1.047, **kwargs)[source]

Bases: object

Transform GRISMCONF-format configuration files to grizli convention of wavelength increasing towards +x

See https://github.com/npirzkal/GRISMCONF and config files at, e.g., https://github.com/npirzkal/GRISM_NIRCAM.

Parameters
conf_filestr

Configuration filename

get_photombool

Get sensitivity curves from the photom reference file

pivot_wavelengthfloat

The wavelength (in microns) in the 1st order spectrum which is not deviated by the grism. Only used to correct for the NIRISS filter wheel rotation, by default 1.047um (Willott+22).

Attributes Summary

beams

aXe beam names like 'A','B','C', etc.

orders

GRISMCONF order names, like '+1', '0', '+2', etc.

Methods Summary

get_beam_trace([x, y, dx, beam, fwcpos])

Function analogous to grizli.grismconf.aXeConf.get_beam_trace but that accounts for the different dispersion axes of JWST grisms

get_beam_trace_original([x, y, dx, beam, fwcpos])

Function analogous to grizli.grismconf.aXeConf.get_beam_trace.

get_beams([nt, min_sens])

Get beam parameters and read sensitivity curves

load_nircam_sensitivity_curve([verbose])

Replace +1 NIRCam sensitivity curves with Nov 10, 2023 updates

remove_beam(beam)

Remove a beam from the orders list

Attributes Documentation

beams

aXe beam names like ‘A’,’B’,’C’, etc.

orders

GRISMCONF order names, like ‘+1’, ‘0’, ‘+2’, etc.

Methods Documentation

get_beam_trace(x=1024, y=1024, dx=0.0, beam='A', fwcpos=None)[source]

Function analogous to grizli.grismconf.aXeConf.get_beam_trace but that accounts for the different dispersion axes of JWST grisms

Parameters
x, yfloat

Reference position in the rotated frame

dxarray-like

Offset in pixels along the trace

beamstr

Grism order, translated from +1, 0, +2, +3, -1 = A, B, C, D, E

fwcposfloat or None

For NIRISS, specify the filter wheel position to compute the trace rotation.

Returns
dyfloat or array-like

Center of the trace in y pixels offset from (x,y) evaluated at dx.

lamfloat or array-like

Effective wavelength along the trace evaluated at dx.

get_beam_trace_original(x=1024, y=1024, dx=0.0, beam='A', fwcpos=None)[source]

Function analogous to grizli.grismconf.aXeConf.get_beam_trace.

Calculates the trace in the original (detector) frame of the images.

Parameters
x, yfloat

Reference position in the rotated frame

dxarray-like

Offset in pixels along the trace

beamstr

Grism order, translated from +1, 0, +2, +3, -1 = A, B, C, D, E

fwcposfloat or None

For NIRISS, specify the filter wheel position to compute the trace rotation.

Returns
dxfloat or array-like

Offset in x pixels from (x,y).

dyfloat or array-like

Center of the trace in y pixels offset from (x,y) evaluated at dx.

lamfloat or array-like

Effective wavelength along the trace evaluated at dx.

get_beams(nt=512, min_sens=0.001, **kwargs)[source]

Get beam parameters and read sensitivity curves

Parameters
ntint

Number of points to sample the GRISMCONF t parameter

min_sensfloat

Minimum sensitivity to consider in the sensitivity curves.

Returns
sets dxlam, nx, sens, attributes
load_nircam_sensitivity_curve(verbose=False, **kwargs)[source]

Replace +1 NIRCam sensitivity curves with Nov 10, 2023 updates

Files generated with the calibration data of P330E from program CAL-1538 (K. Gordon)

Download the FITS files from the link below and put them in $GRIZLI/CONF/GRISM_NIRCAM/.

https://s3.amazonaws.com/grizli-v2/JWSTGrism/NircamSensitivity/index.html

Parameters
verbosebool

Print messages to the terminal.

remove_beam(beam)[source]

Remove a beam from the orders list

Parameters
beamstr

Beam name, like ‘A’, ‘B’, ‘C’, etc.

Returns
removedbool

True if the beam was removed, False if it was not in the list.