center_wcs

msaexp.drizzle.center_wcs(slit, waves, center_on_source=False, force_nypix=31, fix_slope=None, slit_center=0.0, center_phase=-0.5)[source]

Derive a 2D spectral WCS centered on the expected source position along the slit

Parameters
slitjwst.datamodels.SlitModel

Slitlet data object

wavesarray-like

Target wavelength array

center_on_sourcebool

Center on the source position along the slit. If not, center on slit_center slit coordinate

force_nypixint

Cross-dispersion size of the output 2D WCS

fix_slopefloat

Fixed cross-dispersion pixel size, in units of the slit coordinate frame

slit_centerfloat

Define the center of the slit in the slit coordinate frame

center_phasefloat

Pixel phase defining the center of the slit alignment

Returns
wcs_dataobject

Output from msaexp.utils.build_slit_centered_wcs

offset_to_sourcefloat

Offset between center of the WCS and the expected source position

metatuple

MSA key from msaexp.drizzle.metadata_tuple