get_rect_xy

sofia_redux.spectroscopy.rectifyorder.get_rect_xy(xarray, yarray, xvals, yvals, dx=None, dy=None, mask=None, poly_order=3)[source]

Given arrays of x and y coordinates, interpolate to defined grids

Parameters:
xarrayarray_like of float

(nrows, ncols)

yarrayarray_like of float

(nrows, ncols)

xvalsarray_like of float

(nrows, ncols)

yvalsarray_like of float

(nrows, ncols)

dxfloat, optional

Spacing of the output grids in the x-direction. If not supplied, then taken to be range(xarray)/range(xvals)

dyfloat, optional

Spacing of the output grids in the y-direction. If not supplied, then taken to be range(yarray)/range(yvals)

masknumpy.ndarray, optional
poly_orderint, optional

Polynomial order used to interpolate to the new coordinates

Returns:
numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray

(rectx, recty, gridx, gridy) where rectx and recty are the x and y arrays interpolated onto a regular grid. gridx and gridy are the coordinates of the regular grid.