Should we use another function than RMS(dx) in fit to max? And what about a completely diffrent way to fit the arc. E.g. one could go through a peak detection scheme, and use a more-intuitive distance criterion to the peaks, still taking into account the fact that one peak should correspond to a single arc line...
LocalModel structure to be used for dx(lambda) and sigma(lambda) -nlenses -ncoeff -**coeff -type (NAG, Fit_polynom) -domain of validity in lambda
Implement the blaze option, in order to fit 0th/2nd orders weighted according to the blaze function.
Discard the need for the arc frame or for the max if they are not actually adjusted.
It is probably not a good idea to use a classical minimization scheme on such a noisy ill-conditionned problem. Maybe have a look at ``simulated annealing'' algorithm (cf.
GSL), which could be however computation-time costly.
Compute decent value for arc normalisation factor
glnormmax (arc frame mean? 1st step value?)
Fit_polynom (with automatic adjustment of polynomial degree) instead of
fit_poly_rej_nag_tab in local adjustment. Furthermore, since the sigma=f(lambda) is noisy, the sigma-clipping is not rebost enough, and one should enforce a physical selection over sigma right after pup_get_maxdata
CHECK CAREFULLY THE OPTIMAL EXTRACTION (signal and variance). In particular, use the variance extension during the optimal extraction. One could also have a look at Khmil & Surdej 2002 (optimal extraction with maximum entropy).
Test the option
Use a fancier interpolation scheme in the final spectrum writing
The spatial coordinates still have to be computed.
Test different zones in the arc frame (size and position, but beware of 0th and 2nd orders)
Fit multiple zones in the arc frame and derive a CCD-tilt
Check out why the Y-error bars are so different between the red and blue channels. The formal error estimates derived with
nllsqfit_bnd seem theoritically correct.