simwavecal2d

sofia_redux.spectroscopy.simwavecal2d.simwavecal2d(shape, edgecoeffs, xranges, slith_arc, ds)[source]

Simulate a 2D wavecal file using pixels for wavelengths

NOTE: will also return indices for new iSHELL wavecal FITS format.

Parameters:
shape2-tuple of int

(nrow, ncol) shape of image.

edgecoeffsarray_like of float

(norders, 2, degree+1) array of polynomial coefficients which define the edges of the orders. edgecoeffs[0, 0, :] are the coefficients of the bottom edge of the first order and edgecoeffs[0, 1, :] are the coefficients of the top edge of the first order.

xrangesarray_like of float

(norders, 2) array of column numbers between which the orders are completely on the array.

slith_arcfloat

The slit height in arcseconds.

dsfloat

The plate scale in arcseconds per pixel.

Returns:
wavecal, spatcal, indicesnumpy.ndarray, numpy.ndarray, dict
  • wavecal (nrow, ncol) array where each pixel is set to its wavelength (column in this case).

  • spatcal (nrow, ncol) array where each pixel is set to its angular position on the sky.

  • indices (dict of dict) where 1st keys are orders (int) and second level keys are as follows:

    "x"

    x indices of constant wavelength and angle in the zeroth order.

    "y"

    y indices of constant wavelength and angle in the zeroth order.

    "xgrid"

    (ncol) array of wavelength values along x

    "ygrid"

    (nrow) array of spatial coordinates along y