aXeConf¶
- class grizli.grismconf.aXeConf(conf_file='WFC3.IR.G141.V2.5.conf')[source]¶
Bases:
object
Read an aXe-compatible configuration file
- Parameters
- conf_file: str
Filename of the configuration file to read
Methods Summary
Get the maximum polynomial order in DYDX or DLDP for each beam
evaluate_dp
(dx, dydx)Evalate arc length along the trace given trace polynomial coefficients
field_dependent
(xi, yi, coeffs)aXe field-dependent coefficients
get_beam_trace
([x, y, dx, beam, fwcpos])Get an aXe beam trace for an input reference pixel and list of output x pixels
dx
Get beam parameters and read sensitivity curves
load_nircam_sensitivity_curve
([verbose])Replace +1 NIRCam sensitivity curves with Nov 10, 2023 updates
read_conf_file
([conf_file])Read an aXe config file, convert floats and arrays
remove_beam
(beam)Remove a beam definition
Reset full beam list, perhaps after removing some with
remove_beam
show_beams
([xy, beams])Make a demo plot of the beams of a given configuration file
Methods Documentation
- evaluate_dp(dx, dydx)[source]¶
Evalate arc length along the trace given trace polynomial coefficients
- Parameters
- dxarray-like
x pixel to evaluate
- dydxarray-like
Coefficients of the trace polynomial
- Returns
- dparray-like
Arc length along the trace at position
dx
.- For
dydx
polynomial orders 0, 1 or 2, integrate analytically. - Higher orders must be integrated numerically.
- Constant:
- \[dp = dx\]
- Linear:
- \[dp = \sqrt{1+\mathrm{DYDX}[1]}\cdot dx\]
- Quadratic:
- \[u = \mathrm{DYDX}[1] + 2\ \mathrm{DYDX}[2]\cdot dx\]\[dp = (u \sqrt{1+u^2} + \mathrm{arcsinh}\ u) / (4\cdot \mathrm{DYDX}[2])\]
- field_dependent(xi, yi, coeffs)[source]¶
aXe field-dependent coefficients
See the aXe manual for a description of how the field-dependent coefficients are specified.
- Parameters
- xi, yifloat or array-like
Coordinate to evaluate the field dependent coefficients, where
xi = x-REFX
andyi = y-REFY
.- coeffsarray-like
Field-dependency coefficients
- Returns
- afloat or array-like
Evaluated field-dependent coefficients
- get_beam_trace(x=507, y=507, dx=0.0, beam='A', fwcpos=None)[source]¶
Get an aXe beam trace for an input reference pixel and list of output x pixels
dx
- Parameters
- x, yfloat or array-like
Evaluate trace definition at detector coordinates
x
andy
.- dxfloat or array-like
Offset in x pixels from
(x,y)
where to compute trace offset and effective wavelength- beamstr
Beam name (i.e., spectral order) to compute. By aXe convention,
beam='A'
is the first order, ‘B’ is the zeroth order and additional beams are the higher positive and negative orders.- fwcposNone or float
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 atdx
.- lamfloat or array-like
Effective wavelength along the trace evaluated at
dx
.
- load_nircam_sensitivity_curve(verbose=True, **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.
- read_conf_file(conf_file='WFC3.IR.G141.V2.5.conf')[source]¶
Read an aXe config file, convert floats and arrays
- Parameters
- conf_file: str
Filename of the configuration file to read.
- Parameters are stored in an OrderedDict in `self.conf`.
- remove_beam(beam)[source]¶
Remove a beam definition
- Parameters
- beamstr
Beam name to remove. Example: ‘A’.
- show_beams(xy=None, beams=['E', 'D', 'C', 'B', 'A'])[source]¶
Make a demo plot of the beams of a given configuration file
- Parameters
- xytuple
Reference pixel in direct image to evaluate the beams.
- beamslist
List of beams to plot. Default is
["E", "D", "C", "B", "A"]
.
- Returns
- fig
matplotlib.figure.Figure
Figure object.
- fig