DetectorModelOrder

class jwst.extract_1d.soss_extract.soss_extract.DetectorModelOrder(spectral_order: int, wavemap: ndarray, spectrace: ndarray, specprofile: ndarray, throughput: Callable, kernel: WebbKernel | ndarray | None = None, kernel_native: WebbKernel | None = None, kernel_func: WebbKernel | None = None, subarray: str | None = None, trace_cutoff: int = 2048, short_cutoff: float | None = None, orderengine: ExtractionEngine | None = None, order12engine: ExtractionEngine | None = None, mederr: ndarray | None = None, m_inv: ndarray | None = None, bmat: ndarray | None = None, mask: ndarray | None = None)[source]

Bases: object

Model of detector properties for the ATOCA algorithm for a single spectral order.

Attributes:
spectral_orderint

The spectral order number.

wavemapndarray

The 2-D map of the expected wavelengths at each pixel for this order as determined by PASTASOSS.

spectracendarray

The 1-D spectral trace as determined by PASTASOSS.

specprofilendarray

The 2-D spatial profile of the spectral trace from the SPECPROFILE reference file.

throughputcallable

An interpolation function for the throughput of the order, computed from the throughput in the PASTASOSS reference file.

kernelWebbKernel, ndarray, or None

The spectral resolution kernel for this order on the input wavelength grid, either as a WebbKernel object (callable) or as a 2-D array.

kernel_nativeWebbKernel, ndarray, or None

The spectral resolution kernel for this order on the native pixel grid, either as a WebbKernel object (callable) or as a 2-D array.

kernel_funcWebbKernel or None

The spectral resolution kernel for this order. This is intended not to be modified, so the ExtractionEngine can use it to generate a kernel at any wavelength grid.

subarraystr or None

The name of the subarray used for the extraction.

trace_cutoffint

The maximum x pixel to consider for this order, as determined by the PASTASOSS reference file.

short_cutofffloat or None

The shortest wavelength to consider for this order, in microns, as determined by the PASTASOSS reference file.

orderengineExtractionEngine or None

Precomputed extraction engine for this order. This is intended to be computed for the first integration and stored thereafter.

order12engineExtractionEngine or None

Precomputed extraction engine for orders 1+2. This is intended to be computed for the first integration and stored thereafter.

mederrndarray or None

Median error across integrations

m_invndarray or None

Inverse of the design matrix of the regularized least squares problem. Intended to be computed for the first integration and stored thereafter.

bmatndarray or None

Matrix of pixel values divided by the median error. Intended to be computed for the first integration and stored thereafter.

maskndarray or None

Mask for pixels valid in at least some integrations. Intended to be computed for the first integration and stored thereafter.

Attributes Summary

bmat

kernel

kernel_func

kernel_native

m_inv

mask

mederr

native_grid

Make a 1D grid of the pixels boundary based on the wavelength solution.

order12engine

orderengine

short_cutoff

specprofile

spectrace

spectral_order

subarray

throughput

trace

Get the x, y, wavelength of the trace after applying the transform.

trace_cutoff

wavemap

Methods Summary

get_grid_from_trace(n_os)

Make a 1D grid of the pixels boundary based on the wavelength solution.

Attributes Documentation

bmat: ndarray | None = None
kernel: WebbKernel | ndarray | None = None
kernel_func: WebbKernel | None = None
kernel_native: WebbKernel | None = None
m_inv: ndarray | None = None
mask: ndarray | None = None
mederr: ndarray | None = None
native_grid

Make a 1D grid of the pixels boundary based on the wavelength solution.

Returns:
wavendarray

Grid of the pixels boundaries at the native sampling (1D array)

colndarray

The column number of the pixel

order12engine: ExtractionEngine | None = None
orderengine: ExtractionEngine | None = None
short_cutoff: float | None = None
specprofile: ndarray = <dataclasses._MISSING_TYPE object>
spectrace: ndarray = <dataclasses._MISSING_TYPE object>
spectral_order: int = <dataclasses._MISSING_TYPE object>
subarray: str | None = None
throughput: Callable = <dataclasses._MISSING_TYPE object>
trace

Get the x, y, wavelength of the trace after applying the transform.

Returns:
xtrace, ytrace, wavetracendarray

The x, y, and wavelength of the trace, respectively.

trace_cutoff: int = 2048
wavemap: ndarray = <dataclasses._MISSING_TYPE object>

Methods Documentation

get_grid_from_trace(n_os)[source]

Make a 1D grid of the pixels boundary based on the wavelength solution.

Parameters:
n_osint or ndarray

The oversampling factor of the wavelength grid used when solving for the uncontaminated flux.

Returns:
ndarray

Grid of the pixels boundaries at the native sampling (1D array).