Reference File Types

The linearity step uses LINEARITY, INVERSELINEARITY, and INTEGRALNONLINEARITY reference files.

LINEARITY and INVERSELINEARITY Reference Files

REFTYPE:

LINEARITY, INVERSELINEARITY

Data models:

LinearityRefModel, InverselinearityRefModel

The LINEARITY reference file contains pixel-by-pixel polynomial coefficients that map observed DN to linearized DN. The INVERSELINEARITY reference file has the same format but contains coefficients for the inverse transformation (linearized DN to observed DN), used internally to simulate individual reads from observed resultants.

Reference Selection Keywords for LINEARITY and INVERSELINEARITY

CRDS selects appropriate LINEARITY and INVERSELINEARITY references based on the following keyword attributes. All keyword attributes used for file selection are required.

Instrument

Keyword Attributes

WFI

instrument, detector, date, time

Standard ASDF metadata

The following table lists the attributes that are required to be present in all reference files. The first column shows the attribute in the ASDF reference file headers, which is the same as the name within the data model meta tree (second column). The second column gives the roman data model name for each attribute, which is useful when using data models in creating and populating a new reference file.

Attribute

Fully Qualified Path

author

model.meta.author

model_type

model.meta.model_type

date

model.meta.date

description

model.meta.description

instrument

model.meta.instrument.name

reftype

model.meta.reftype

telescope

model.meta.telescope

useafter

model.meta.useafter

NOTE: More information on standard required attributes can be found here: Standard ASDF metadata

Type Specific Attributes for LINEARITY

In addition to the standard reference file attributes listed above, the following attributes are required in LINEARITY reference files, because they are used as CRDS selectors (see Reference Selection Keywords for LINEARITY and INVERSELINEARITY):

Attribute

Fully qualified path

Instruments

detector

model.meta.instrument.detector

WFI

Reference File Format

LINEARITY reference files are ASDF format, with 2 data arrays. The format and content of the file is as follows:

Data

Array Type

Dimensions

Data type

coeffs

NDArray

ncols x nrows x ncoeffs

float32

dq

NDArray

ncols x nrows

uint32

Each plane of the COEFFS data cube contains the pixel-by-pixel coefficients for the associated order of the polynomial. There can be any number of planes to accommodate a polynomial of any order.

INTEGRALNONLINEARITY Reference File

REFTYPE:

INTEGRALNONLINEARITY

Data model:

IntegralnonlinearityRefModel

The INTEGRALNONLINEARITY reference file contains per-channel lookup tables for correcting integral nonlinearity in the analog-to-digital converter.

Reference Selection Keywords for INTEGRALNONLINEARITY

CRDS selects appropriate INTEGRALNONLINEARITY references based on the following keyword attributes. All keyword attributes used for file selection are required.

Instrument

Keyword Attributes

WFI

instrument, detector, date, time

Standard ASDF metadata

The following table lists the attributes that are required to be present in all reference files. The first column shows the attribute in the ASDF reference file headers, which is the same as the name within the data model meta tree (second column). The second column gives the roman data model name for each attribute, which is useful when using data models in creating and populating a new reference file.

Attribute

Fully Qualified Path

author

model.meta.author

model_type

model.meta.model_type

date

model.meta.date

description

model.meta.description

instrument

model.meta.instrument.name

reftype

model.meta.reftype

telescope

model.meta.telescope

useafter

model.meta.useafter

NOTE: More information on standard required attributes can be found here: Standard ASDF metadata

Type Specific Attributes for INTEGRALNONLINEARITY

In addition to the standard reference file attributes listed above, the following attributes are required in INTEGRALNONLINEARITY reference files, because they are used as CRDS selectors (see INTEGRALNONLINEARITY Reference File):

Attribute

Fully qualified path

Instruments

detector

model.meta.instrument.detector

WFI

Reference File Format

INTEGRALNONLINEARITY reference files are ASDF format. The file contains a lookup value array and correction tables for each of the 32 readout channels.

Data

Array Type

Dimensions

Data type

value

NDArray

65536

float64

inl_table.science_channel_NN.correction

NDArray

65536

float64

The value array contains the DN values (0-65535) used as lookup indices. Each science_channel_NN (where NN ranges from 01 to 32) contains a correction array with the INL correction offset for each DN value in that channel.