detect_continuum

The purpose of the detect_continuum utility is to find and fit the order centres with low-level polynomials.

The utility takes as input a calibrated single pinhole flat-frame which displays the traces of the order centre locations:

From a spectral format table (specific to the arm in question) we know the minimum and maximum wavelength values for each order. Then using the first guess dispersion map generated by soxs_disp_solution we generate an array of approximate pixel locations on each order centre between these wavelength limits.

Centred on each pixel position we take a single-pixel wide image slice in the cross-dispersion direction N-pixels long (N is a recipe parameter). A 1D gaussian is fitted against the pixel slice and the peak pixel-position is stored.

Finally, for each order, the set of gaussian peak pixel-positions is fitted with a low-order polynomial (X as a function of Y).

\[ X = \sum_{i=0}^n c_{i} \times Y^i \]

Where \(n\) is the degree of the polynomials. Polynomials are iteratively fitted while sigma-clipping pixel-positions with outlying residuals. Results are stored in an order table.