ApCorrBase

class jwst.extract_1d.apply_apcorr.ApCorrBase(input_model, apcorr_table, sizeunit, location=None, slit_name=None, **match_kwargs)[source]

Bases: ABC

Base class for aperture correction classes.

Create and apply an aperture correction.

Parameters:
input_modelJwstDataModel

Input data model used to determine matching parameters.

apcorr_tableFITS_rec

Aperture correction table data from APCORR reference file.

sizeunitstr

Units for the aperture correction data “row” values (assuming the aperture correction is a 2D array).

locationtuple or None, optional

Reference location (RA, Dec) used to calculate the pixel scale used in converting values in arcsec to pixels. Default is None, however, if the input reference data contains size/radius data in units of arcsecs, a location is required.

slit_namestr, optional

For MultiSlitModel, the name of the slit being processed.

**match_kwargs

Additional keywords for matching data to reference table entries.

Raises:
ValueError

If apcorr_row_units are not supplied and units are undefined in apcorr_table columns, or if the input apcorr_table cannot be reduced to a single row based on match criteria from input_model.

Attributes Summary

match_pars

size_key

Size key for the reference.

Methods Summary

apply(spec_table)

Apply interpolated aperture correction to extraction results in-place.

approximate()

Generate an approximate aperture correction function based on input data.

Attributes Documentation

match_pars = {'MIRI': {'LRS': {'subarray': ['name']}, 'WFSS': {'subarray': ['name']}}, 'NIRCAM': {'NRC_GRISM': {'instrument': ['filter', 'pupil']}, 'WFSS': {'instrument': ['filter', 'pupil']}}, 'NIRISS': {'WFSS': {'instrument': ['filter', 'pupil']}}, 'NIRSPEC': {'BRIGHTOBJ': {'instrument': ['filter', 'grating']}, 'FIXEDSLIT': {'instrument': ['filter', 'grating']}, 'MSASPEC': {'instrument': ['filter', 'grating']}}}
size_key

Size key for the reference.

The value is intended to index into self.reference. Implementations of this abstract class should define this property as appropriate.

Methods Documentation

apply(spec_table)[source]

Apply interpolated aperture correction to extraction results in-place.

Parameters:
spec_tableFITS_rec

Table of aperture corrections values from apcorr reference file.

abstractmethod approximate()[source]

Generate an approximate aperture correction function based on input data.