# Reference Files¶

The cube_build step uses two reference files: CUBEPAR and RESOL. CUBEPAR is used for both NIRSpec and MIRI IFU data. The RESOL reference file is only used for processing MIRI IFU data and uses an experimental weighting option that is still in the testing phase.

## CUBEPAR reference file¶

REFTYPE

CUBEPAR

Data models

The CUBEPAR reference file contains parameter values used to construct the output IFU cubes.

### Reference Selection Keywords for CUBEPAR¶

CRDS selects appropriate CUBEPAR references based on the following keywords. CUBEPAR is not applicable for instruments not in the table.

Instrument

Keywords

MIRI

INSTRUME, EXP_TYPE, DATE-OBS, TIME-OBS

NIRSPEC

INSTRUME, EXP_TYPE, DATE-OBS, TIME-OBS

### Standard Keywords¶

The following table lists the keywords that are required to be present in all reference files. The first column gives the FITS keyword names. The second column gives the jwst data model name for each keyword, which is useful when using data models in creating and populating a new reference file. The third column gives the equivalent meta tag in ASDF reference file headers, which is the same as the name within the data model meta tree (second column).

FITS Keyword

Data Model Name

ASDF meta tag

AUTHOR

model.meta.author

author

DATAMODL

model.meta.model_type

model_type

DATE

model.meta.date

date

DESCRIP

model.meta.description

description

FILENAME

model.meta.filename

N/A

INSTRUME

model.meta.instrument.name

instrument: {name}

PEDIGREE

model.meta.pedigree

pedigree

REFTYPE

model.meta.reftype

reftype

TELESCOP

model.meta.telescope

telescope

USEAFTER

model.meta.useafter

useafter

NOTE: More information on standard required keywords can be found here: Standard Required Keywords

### Type Specific Keywords for CUBEPAR¶

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

Keyword

Data Model Name

EXP_TYPE

model.meta.exposure.type

### MIRI Reference File Format¶

The MIRI CUBEPAR reference files are FITS format, with 5 BINTABLE extensions. The FITS primary data array is assumed to be empty. The format and content of the MIRI CUBEPAR reference file

EXTNAME

XTENSION

Dimensions

CUBEPAR

BINTABLE

TFIELDS = 6

CUBEPAR_MSM

BINTABLE

TFIELDS = 6

MULTICHANNEL_MSM

BINTABLE

TFIELDS = 5

CUBEPAR_EMSM

BINTABLE

TFIELDS = 5

MULTICHANNEL_EMSM

BINTABLE

TFIELDS = 5

### NIRSPec Reference File Format¶

The NIRSpec CUBEPAR reference files are FITS format, with 9 BINTABLE extensions.

EXTNAME

XTENSION

Dimensions

CUBEPAR

BINTABLE

TFIELDS = 6

CUBEPAR_MSM

BINTABLE

TFIELDS = 6

MULTICHAN_PRISM_MSM

BINTABLE

TFIELDS = 5

MULTICHAN_MED_MSM

BINTABLE

TFIELDS = 5

MULTICHAN_HIGH_MSM

BINTABLE

TFIELDS = 5

CUBEPAR_EMSM

BINTABLE

TFIELDS = 5

MULTICHAN_PRISM_EMSM

BINTABLE

TFIELDS = 4

MULTICHAN_MED_EMSM

BINTABLE

TFIELDS = 4

MULTICHAN_HIGH_EMSM

BINTABLE

TFIELDS = 4

The formats of the individual table extensions are listed below, first for the MIRI reference file and then for NIRSpec.

Table

Column

Data type

Units

CUBEPAR

CHANNEL

shortint

N/A

BAND

ch*6

N/A

WAVEMIN

float

microns

WAVEMAX

float

microns

SPAXELSIZE

float

arcseconds

SPECTRALSTEP

double

microns

CUBEPAR_MSM

CHANNEL

shortint

N/A

BAND

ch*6

N/A

ROISPATIAL

float

arcseconds

ROISPECTRAL

double

microns

POWER

double

unitless

double

unitless

MULTICHANNEL_MSM

WAVELENGTH

double

microns

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

POWER

double

unitless

double

unitless

CUBEPAR_EMSM

CHANNEL

shortint

N/A

BAND

ch*6

N/A

ROISPATIAL

float

arcseconds

ROISPECTRAL

double

microns

double

unitless

MULTICHANNEL_EMSM

WAVELENGTH

double

microns

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

double

unitless

Table

Column

Data type

Units

CUBEPAR

DISPERSER

ch*5

N/A

FILTER

ch*6

N/A

WAVEMIN

double

microns

WAVEMAX

double

microns

SPAXELSIZE

double

arcseconds

SPECTRALSTEP

double

microns

CUBEPAR_MSM

DISPERSER

ch*5

N/A

FILTER

ch*6

N/A

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

POWER

double

unitless

double

unitless

MULTICHAN_PRISM_MSM

WAVELENGTH

double

microns

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

POWER

double

unitless

double

unitless

MULTICHAN_MED_MSM

WAVELENGTH

float

microns

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

POWER

double

unitless

double

unitless

MULTICHAN_HIGH_MSM

WAVELENGTH

float

microns

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

POWER

double

unitless

double

unitless

CUBEPAR_EMSM

DISPERSER

ch*5

N/A

FILTER

ch*6

N/A

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

double

unitless

MULTICHAN_PRISM_EMSM

WAVELENGTH

double

microns

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

double

unitless

MULTICHAN_MED_EMSM

WAVELENGTH

float

microns

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

double

unitless

MULTICHAN_HIGH_EMSM

WAVELENGTH

float

microns

ROISPATIAL

double

arcseconds

ROISPECTRAL

double

microns

double

unitless

These reference files contain tables for each wavelength band giving the spatial and spectral size, and the size of the region of interest (ROI) to use to construct an IFU cube. If only one band is used to construct the IFU cube then the CUBEPAR and CUBEPAR_MSM or CUBE_EMSM tables are used. These types of cubes will have a linear - wavelength dimension. If more than one wavelength band is used to build the IFU cube then the MULTICHANNEL (MIRI) or MULTICHAN (NIRSPEC) tables are used o set the spectral and spatial roi size, and the wavelength dependent weighting function parameters. For multi-band IFU cubes then the final spatial size will be the smallest one from the list of input bands and these cubes will have a non-linear wavelength dimension.

The MIRI reference table descriptions:

• CUBEPAR table contains the spatial and spectral cube sample size for each band.

• CUBEPAR_MSM table contains the Modified Shepard Method (MSM) weighting values to use for each band.

• MULTICHANNEL_MSM table is used for the MSM weighting and contains the wavelengths and associated region of interest size to use when IFU cubes are created from several bands and the final output is to have an IFU cube of varying spectral scale.

• CUBEPAR_EMSM table contains the Exponential Modified Shepard Method (EMSM) weighting values to use for each band.

• MULTICHANNEL_EMSM table is used for the EMSM weighting and contains the wavelengths and associated region of interest size to use when IFU cubes are created from several bands and the final output is to have an IFU cube of varying spectral scale.

The NIRSPEC reference table descriptions:

• CUBEPAR table contains the spatial and spectral cube sample size for each band.

• CUBEPAR_MSM table contains the Modified Shepard Method (MSM) weighting values to use for each band.

• MULTICHAN_PRISM_MSM table is used for the MSM weighting and contains the wavelengths and associated region of interest size to use when IFU cubes are created from the grating prism and the final IFU Cube output has a varying spectral scale.

• MULTICHAN_MED_MSM table is used for the MSM weighting and contains the wavelengths and associated region of interest size to use when IFU cubes are created from the medium resolution grating and the final IFU Cube output has a varying spectral scale.

• MULTICHAN_HIGH_MSM table is used for the MSM weighting and contains the wavelengths and associated region of interest size to use when IFU cubes are created from the high resolution gratings and the final IFU Cube output has a varying spectral scale.

• CUBEPAR_EMSM table contains the Exponential Modified Shepard Method (EMSM) weighting values to use for each band.

• MULTICHAN_PRISM_EMSM table is used for the EMSM weighting and contains the wavelengths and associated region of interest size to use when IFU cubes are created from the grating prism and the final IFU Cube output has a varying spectral scale.

• MULTICHAN_MED_EMSM table is used for the EMSM weighting and contains the wavelengths and associated region of interest size to use when IFU cubes are created from the medium resolution grating and the final IFU Cube output has a varying spectral scale.

• MULTICHAN_HIGH_EMSM table is used for the EMSM weighting and contains the wavelengths and associated region of interest size to use when IFU cubes are created from the high resolution gratings and the final IFU Cube output has a varying spectral scale.

## RESOL reference file¶

REFTYPE

RESOL

Data model

MiriResolutionModel

The RESOL reference file contains the MIRI MRS PSF and LSF widths, per wavelength band. This information is used if the cube_build weight function incorporates the size of the PSF and LSF, i.e. when using the parameter setting “–weighting = miripsf”.

### Reference Selection Keywords for RESOL¶

CRDS selects appropriate RESOL references based on the following keywords. RESOL is not applicable for instruments not in the table.

Instrument

Keywords

MIRI

INSTRUME, DETECTOR, CHANNEL, DATE-OBS, TIME-OBS

### Standard Keywords¶

The following table lists the keywords that are required to be present in all reference files. The first column gives the FITS keyword names. The second column gives the jwst data model name for each keyword, which is useful when using data models in creating and populating a new reference file. The third column gives the equivalent meta tag in ASDF reference file headers, which is the same as the name within the data model meta tree (second column).

FITS Keyword

Data Model Name

ASDF meta tag

AUTHOR

model.meta.author

author

DATAMODL

model.meta.model_type

model_type

DATE

model.meta.date

date

DESCRIP

model.meta.description

description

FILENAME

model.meta.filename

N/A

INSTRUME

model.meta.instrument.name

instrument: {name}

PEDIGREE

model.meta.pedigree

pedigree

REFTYPE

model.meta.reftype

reftype

TELESCOP

model.meta.telescope

telescope

USEAFTER

model.meta.useafter

useafter

NOTE: More information on standard required keywords can be found here: Standard Required Keywords

### Type Specific Keywords for RESOL¶

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

Keyword

Data Model Name

CHANNEL

model.meta.instrument.channel

### Reference File Format¶

MIRI RESOL reference files are FITS format, with three BINTABLE extensions. The FITS primary data array is assumed to be empty. The format and content of the file is as follows:

EXTNAME

XTENSION

Dimensions

RESOLVING_POWER

BINTABLE

TFIELDS = 11

PSF_FWHM_ALPHA

BINTABLE

TFIELDS = 5

PSF_FWHM_BETA

BINTABLE

TFIELDS = 5

The formats of the individual table extensions are listed below.

Table

Column

Data type

Units

RESOLVING_POWER

SUB_BAND

ch*16

N/A

R_CENTRE

double

microns

R_A_LOW

double

N/A

R_B_LOW

double

1/microns

R_C_LOW

double

1/microns2

R_A_HIGH

double

N/A

R_B_HIGH

double

1/microns

R_C_HIGH

double

1/microns2

R_A_AVG

double

N/A

R_B_AVG

double

1/microns

R_C_AVG

double

1/microns2

PSF_FWHM_ALPHA

A_CUTOFF

double

microns

A_A_SHORT

double

arcsec

A_B_SHORT

double

arcsec/micron

A_A_LONG

double

arcsec

A_B_LONG

double

arcsec/micron

PSF_FWHM_BETA

B_CUTOFF

double

microns

B_A_SHORT

double

arcsec

B_B_SHORT

double

arcsec/micron

B_A_LONG

double

arcsec

B_B_LONG

double

arcsec/micron

The RESOLVING_POWER table contains information to use for each band. This table has 12 rows and 11 columns; one row of information for each MIRI band. The 11 columns contain the polynomial coefficients used to determine the resolving power for each band. The PSF_FWHM_ALPHA table has a format of 1 row and 5 columns. The 5 columns contain the polynomial coefficients used for determining the alpha coordinate PSF size. Similarly, the PSF_FWHM_BETA table has a format of 1 row and 5 columns, which contain the polynomial coefficients used for determining the beta coordinate PSF size.