lines_to_surface¶
-
pydis.
lines_to_surface
(img, xcent, ycent, wcent, mode='spline2d', fit_order=2, display=False)[source]¶ Turn traced arc lines into a wavelength solution across the entire chip
Requires inputs from line_trace(). Outputs are a 2d wavelength solution
- Parameters
- img2d array
the HeNeAr data
- xcent1d array
the X (spatial) pixel positions of the HeNeAr lines
- ycent1d array
the Y (wavelength) pixel positions of the HeNeAr lines
- wcent1d array
the wavelength values of the HeNeAr lines
- modestr, {‘poly’, ‘spline’, ‘spline2d’}
what mode of interpolation to use to go from traces along the HeNeAr lines to a wavelength value for every (x,y) pixel? Options include (1) poly: along 1-pixel wide slices in the spatial dimension, fit a polynomial between the HeNeAr lines. Uses fit_order; (2) spline: along 1-pixel wide slices in the spatial dimension, fit a quadratic spline; (3) spline2d: fit a full 2d surface using a cubic spline. This is the best option, in principle.
- Returns
- the 2d wavelenth solution. Output depends on mode parameter.