stdatamodels API

Model base class

JwstDataModel

Base class for all JWST data models.

stdatamodels Package

Data models for JWST.

Classes

DataModel([init, schema, ...])

Base class of all of the data models.

stdatamodels.exceptions Module

Classes

NoTypeWarning

Warning to raise when opening a file that lacks a model type.

ValidationWarning

Warning to raise if a model fails to validate through its schema.

stdatamodels.dqflags Module

Interpret JWST data quality flags.

The flags are binary-packed structures representing information about a given element (a bit field): Each flag is assigned a bit position in a 32-bit mask. If a given bit is set, the flag assigned to that bit is interpreted as being set or active.

Functions

dqflags_to_mnemonics(dqflags, mnemonic_map)

Interpret value as bit flags and return the mnemonics.

interpret_bit_flags(bit_flags[, flip_bits, ...])

Convert input bit flags to a single integer value (bit mask) or None.

stdatamodels.asdf_in_fits Module

Functions

open(filename_or_hdu[, ...])

Read ASDF data embedded in a fits file.

to_hdulist(tree[, hdulist])

Add ASDF data to an hdulist (or create one if needed).

write(filename, tree[, hdulist])

Write ASDF data inside a FITS file.

stdatamodels.jwst.datamodels Package

Datamodels for JWST pipeline.

Functions

open([init, guess])

Load a data model, list of models, or association from file.

read_metadata(fname[, model_type, flatten])

Load a metadata tree from a file without loading the entire datamodel into memory.

Classes

ABVegaOffsetModel([init])

A data model containing offsets to convert from AB to Vega magnitudes.

AmiLgFitModel([init, schema, ...])

A data model for AMI LG analysis results.

AmiLgModel([init])

A data model for AMI LG analysis results.

AmiOIModel([init, schema, ...])

Class containing AMI interferometric observables.

AsnModel([init])

A data model for association tables.

BarshadowModel([init])

A data model for Bar Shadow correction information.

CameraModel([init, model, input_units, ...])

Stores the transforms from the NIRSpec camera to the GWA.

CollimatorModel([init, model, input_units, ...])

Stores the transform through the NIRSpec collimator.

CombinedSpecModel([init, schema, ...])

A data model for combined 1D spectra.

ContrastModel([init, schema, ...])

A data model for coronagraphic contrast curve files.

CubeModel(*args, **kwargs)

A data model for 3D image cubes.

DarkMIRIModel([init])

A data model for dark MIRI reference files.

DarkModel([init])

A data model for dark reference files.

DarkNirspecModel([init])

A data model for NIRSpec dark reference files.

DisperserModel([init, angle, gwa_tiltx, ...])

A model for a NIRSPEC reference file of type "disperser".

DistortionMRSModel([init, x_model, y_model, ...])

A model for a reference file of type "distortion" for the MIRI MRS.

DistortionModel([init, model, input_units, ...])

A model for a reference file of type "distortion".

EmiModel([init])

A data model to correct MIRI images for EMI contamination.

Extract1dIFUModel([init])

A data model for IFU MIRI and NIRSpec extract 1d reference files.

FOREModel([init, model, input_units, ...])

Stores the transform from the MSA plane to the Filter Wheel.

FPAModel([init, nrs1_model, nrs2_model])

A model for a NIRSPEC reference file of type "fpa".

FgsImgApcorrModel([init])

A data model for FGS imaging apcorr reference files.

FgsImgPhotomModel([init])

A data model for FGS photom reference files.

FilteroffsetModel([init, filters, instrument])

A model for filter-dependent boresight offsets.

FlatModel([init])

A data model for 2D flat-field images.

FringeFreqModel([init])

A data model for 2D fringe correction images.

FringeModel([init])

A data model for 2D fringe correction images.

GainModel([init])

A data model for 2D gain.

GuiderCalModel(*args, **kwargs)

A data model for Guide Star pipeline calibrated files.

GuiderRawModel(*args, **kwargs)

A data model for Guide Star pipeline raw data files.

IFUCubeModel(*args, **kwargs)

A data model for 3D IFU cubes.

IFUFOREModel([init, model, input_units, ...])

A model for a NIRSPEC reference file of type "ifufore".

IFUImageModel(*args, **kwargs)

A data model for 2D IFU images.

IFUPostModel([init, slice_models])

A model for a NIRSPEC reference file of type "ifupost".

IFUSlicerModel([init, model, data])

A model for a NIRSPEC reference file of type "ifuslicer".

IPCModel([init])

A data model for IPC kernel checking information.

IRS2Model([init])

A data model for the IRS2 refpix reference file.

ImageModel([init, schema, ...])

A data model for 2D images.

LastFrameModel([init])

A data model for Last frame correction reference files.

Level1bModel([init, schema, ...])

A data model for raw 4D ramps level-1b products.

LinearityModel([init])

A data model for linearity correction information.

MRSMultiSpecModel([init])

A data model for MIRI MRS multi-spec tables.

MRSSpecModel([init, schema, ...])

A data model for MIRI MRS 1D spectra with residual fringe corrections.

MSAModel([init, models, data])

A model for a NIRSPEC reference file of type "msa".

MaskModel([init])

A data model for 2D masks.

MirImgApcorrModel([init])

A data model for MIRI imaging apcorr reference files.

MirImgPhotomModel([init])

A data model for MIRI imaging photom reference files.

MirLrsApcorrModel([init])

A data model for MIRI LRS apcorr reference files.

MirLrsPathlossModel([init])

A data model for MIRI LRS pathloss correction information.

MirLrsPhotomModel([init])

A data model for MIRI LRS photom reference files.

MirMrsApcorrModel([init])

A data model for MIRI MRS apcorr reference files.

MirMrsPhotomModel([init])

A data model for MIRI MRS photom reference files.

MirMrsPtCorrModel([init])

A data model for MIRI mrs IFU across-slice corrections file.

MirMrsXArtCorrModel([init])

A data model for MIRI MRS cross-artifact corrections file.

MirWfssPhotomModel([init])

A data model for MIRI WFSS photom reference files.

MiriIFUCubeParsModel([init])

A data model for MIRI mrs ifucubepars reference files.

MiriLRSSpecwcsModel([init, wavetable, ...])

A model for a reference file of type "specwcs" for MIRI LRS Slit.

MiriResolutionModel([init])

A data model for MIRI Resolution reference files.

MiriWFSSSpecwcsModel([init, displ, dispx, ...])

A model for a reference file of type "specwcs" for MIRI WFSS.

MultiCombinedSpecModel([init])

A data model for multi-spec images.

MultiExposureModel([init])

A data model for multi-slit images derived from numerous exposures.

MultiSlitModel([init])

A data model for multi-slit images.

MultiSpecModel([init])

A data model for multi-spec tables.

NIRCAMGrismModel([init, displ, dispx, ...])

A model for a reference file of type "specwcs" for NIRCAM WFSS.

NIRISSGrismModel([init, displ, dispx, ...])

A model for a reference file of type "specwcs" for NIRISS grisms.

NRMModel([init])

A data model for Non-Redundant Mask.

NirspecFlatModel([init])

A data model for NIRSpec flat-field reference files.

NirspecIFUCubeParsModel([init])

A data model for Nirspec ifucubepars reference files.

NirspecIfuAreaModel([init])

A data model for the NIRSpec IFU pixel area reference file.

NirspecMosAreaModel([init])

A data model for the NIRSpec MOS pixel area reference file.

NirspecQuadFlatModel([init])

A data model for NIRSpec flat-field files that differ by quadrant.

NirspecSlitAreaModel([init])

A data model for the NIRSpec fixed-slit pixel area reference file.

NisImgApcorrModel([init])

A data model for NIRISS imaging apcorr reference files.

NisImgPhotomModel([init])

A data model for NIRISS imaging photom reference files.

NisSossPhotomModel([init])

A data model for NIRISS SOSS photom reference files.

NisWfssApcorrModel([init])

A data model for NIRISS WFSS apcorr reference files.

NisWfssPhotomModel([init])

A data model for NIRISS WFSS photom reference files.

NrcImgApcorrModel([init])

A data model for NIRCam imaging apcorr reference files.

NrcImgPhotomModel([init])

A data model for NIRCam imaging photom reference files.

NrcWfssApcorrModel([init])

A data model for NIRCam WFSS apcorr reference files.

NrcWfssPhotomModel([init])

A data model for NIRCam WFSS photom reference files.

NrsFsApcorrModel([init])

A data model for NIRSpec Fixed-Slit apcorr reference files.

NrsFsPhotomModel([init])

A data model for NIRSpec Fixed-Slit photom reference files.

NrsIfuApcorrModel([init])

A data model for NIRSpec IFU apcorr reference files.

NrsMosApcorrModel([init])

A data model for NIRSpec MOS apcorr reference files.

NrsMosPhotomModel([init])

A data model for NIRSpec MOS and IFU photom reference files.

OTEModel([init, model, input_units, ...])

Stores the transform from the Filter Wheel to the Optical Telescope Element.

OutlierIFUOutputModel([init, schema, ...])

A data model for the optional output from outlier_detection_ifu step.

PastasossModel([init])

A data model to hold NIRISS SOSS wavelength grids.

PathlossModel([init])

A data model for pathloss correction information.

PersistenceSatModel([init])

A data model for the persistence saturation value (full well).

PictureFrameModel([init])

A data model for 2D thermal picture frame reference files.

PixelAreaModel([init])

A data model for the pixel area map.

PsfMaskModel([init])

A data model for coronagraphic 2D PSF mask reference files.

QuadModel(*args, **kwargs)

A data model for 4D image arrays.

RSCDModel([init])

A data model for the RSCD reference file.

RampFitOutputModel([init, schema, ...])

A data model for the optional output of the ramp fitting step.

RampModel([init])

A data model for 4D ramps.

ReadnoiseModel([init])

A data model for 2D readnoise.

ReferenceCubeModel([init])

A data model for 3D reference images.

ReferenceFileModel([init])

A data model for reference tables.

ReferenceImageModel([init])

A data model for 2D reference images.

ReferenceQuadModel([init])

A data model for 4D reference images.

RegionsModel([init, regions])

A model for a reference file of type "regions".

ResetModel([init])

A data model for reset correction reference files.

ResolutionModel([init])

A data model for Spectral Resolution parameters reference tables.

SIRSKernelModel([init])

A data model for the NIR Optimized Convolution Kernel Fourier Coefficients.

SaturationModel([init])

A data model for saturation checking information.

SegmentationMapModel([init, schema, ...])

A data model for 2D segmentation maps.

SlitDataModel([init])

A data model for 2D slit images.

SlitModel([init])

A data model for 2D images.

SossBkgModel([init])

A data model of 2D background reference templates for NIRISS SOSS data.

SossExtractModel([init, schema, ...])

A data model to hold NIRISS SOSS extraction model arrays.

SossWaveGridModel([init, schema, ...])

A data model to hold NIRISS SOSS wavelength grids.

SpecKernelModel([init])

A data model for 2D spectral kernels.

SpecModel([init, schema, ...])

A data model for 1D spectra.

SpecProfileModel([init])

A data model for NIRISS SOSS spectral profile reference files.

SpecProfileSingleModel([init])

A data model for NIRISS SOSS spectral profile data.

SpecPsfModel([init])

A data model for spectral PSF reference data.

SpecTraceModel([init])

A data model for NIRISS SOSS spectral trace reference files.

SpecTraceSingleModel([init])

A data model for NIRISS SOSS spectral trace data.

SpecwcsModel([init, model, input_units, ...])

A model for a reference file of type "specwcs".

StrayLightModel([init])

A data model for 2D straylight mask.

SuperBiasModel([init])

A data model for 2D super-bias images.

TSOMultiSpecModel([init])

A data model for TSO multi-integration, multi-spectra tables.

TSOSpecModel([init, schema, ...])

A data model for TSO 1D spectra with multiple integrations.

ThroughputModel([init])

A data model for filter throughput.

TrapDensityModel([init])

A data model for the trap density of a detector, for persistence.

TrapParsModel([init])

A data model for trap capture and decay parameters.

TrapsFilledModel([init, schema, ...])

A data model for the number of traps filled for a detector, for persistence.

TsoPhotModel([init, radii])

A model for a reference file of type "tsophot".

WFSSCombinedSpecModel([init, schema, ...])

A data model for NIRCam and NIRISS WFSS exposure-averaged 1D spectra.

WFSSMultiCombinedSpecModel([init, schema, ...])

A data model for NIRCam and NIRISS WFSS exposure-averaged 1D spectra.

WFSSMultiSpecModel([init])

A data model for a collection of spectra from multiple exposures and/or spectral orders.

WFSSSpecModel([init, schema, ...])

A data model for NIRCam and NIRISS WFSS 1D spectra.

WaveCorrModel([init, apertures])

Wavelength zero-point correction for the position of a point source in a NIRSpec slit.

WaveMapModel([init])

A data model for NIRISS SOSS wavelength map reference files.

WaveMapSingleModel([init])

A data model for NIRISS SOSS wavelength map data.

WavelengthrangeModel([init, ...])

A model for a reference file of type "wavelengthrange".

WfssBkgModel([init])

A data model for 2D WFSS master background reference files.

stdatamodels.jwst.datamodels.model_base Module

Classes

DefaultDQMixin(*args, **kwargs)

Mixin for models that should have dq array initialized on init.

DefaultErrMixin(*args, **kwargs)

Mixin for models that should have err array initialized on init.

stdatamodels.properties Module

Classes

ListNode(attr, instance, schema, ctx, parent)

A list-like object that supports validation against a schema.

ObjectNode(attr, instance, schema, ctx, parent)

A dictionary-like object that supports validation against a schema.

stdatamodels.jwst.transforms Package

Custom Astropy modeling transforms for JWST.

Classes

AngleFromGratingEquation(groove_density, ...)

Solve the 3D Grating Dispersion Law for the refracted angle.

GrismObject([sid, order_bounding, ...])

Grism Objects identified from a direct image catalog and segment map.

Gwa2Slit(slits, models)

NIRSpec GWA to slit transform.

IdealToV2V3(v3idlyangle, v2ref, v3ref, vparity)

Perform the transform from Ideal to telescope V2,V3 coordinate system.

Logical(condition, compareto, value, **kwargs)

Substitute values in an array where the condition is evaluated to True.

MIRIWFSSBackwardDispersion(orders[, ...])

Calculate the dispersion extent of MIRI WFSS pixels.

MIRIWFSSForwardDispersion(orders[, lmodels, ...])

Calculate the wavelengths of the dispersed MIRI WFSS data.

MIRI_AB2Slice([beta_zero, beta_del, channel])

MIRI MRS alpha, beta to slice transform.

NIRCAMBackwardGrismDispersion(orders[, ...])

Calculate the dispersion extent of NIRCAM pixels.

NIRCAMForwardColumnGrismDispersion(orders[, ...])

Forward grism dispersion model for NIRCAM (column-wise).

NIRCAMForwardRowGrismDispersion(orders[, ...])

Forward grism dispersion model for NIRCAM (row-wise).

NIRISSBackwardGrismDispersion(orders[, ...])

Calculate the dispersion extent of NIRISS pixels.

NIRISSForwardColumnGrismDispersion(orders[, ...])

Calculate the wavelengths for horizontally dispersed NIRISS grism data.

NIRISSForwardRowGrismDispersion(orders[, ...])

Calculate the wavelengths of vertically dispersed NIRISS grism data.

NirissSOSSModel(spectral_orders, models)

NIRISS SOSS wavelength solution model.

RefractionIndexFromPrism(prism_angle[, name])

Compute the refraction index of a prism (NIRSpec).

Rotation3DToGWA(angles, axes_order[, name])

Perform a 3D rotation given an angle in degrees.

Slit(name, shutter_id, dither_position, ...)

Nirspec Slit structure definition

Slit2Msa(slits, models)

Transform from Nirspec slit_frame to msa_frame.

Slit2MsaLegacy(slits, models)

Transform from Nirspec slit_frame to msa_frame without passing slit name.

Snell(angle, kcoef, lcoef, tcoef, tref, ...)

Apply transforms, including Snell's law, through the NIRSpec prism.

V2V3ToIdeal(v3idlyangle, v2ref, v3ref, vparity)

Perform the transform from telescope V2,V3 to Ideal coordinate system.

WavelengthFromGratingEquation(...)

Solve the 3D Grating Dispersion Law for the wavelength.