Clarify this spatial median filtering normalization issue when the spectrum norm si close to 0 or even <0. For the moment, the dirty trick is to consider positive values only...
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, GSL) -domain of validity in lambda. . This could actually simply be based upon the
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
CAREFULLY CHECK 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).
The spatial coordinates still have to be computed.
For the two-pass multi-order optimal extraction, add an option
-restore to extract pre-restore_frame (i.e. without the final wavelength-rebin and extracted on the full wavelength domain).
USE_PROFERR). For the moment, analytic computation of the variance from photon noise and RoN.
Should unify with Fit_Xpeak using an intermediate 2D-array.
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.