twVolc / PyCamPermanent

Permanent PiCam (SO2) installation project software
GNU General Public License v3.0
2 stars 2 forks source link

fit_calib_data from pyplis doesn't work as expected for 2nd order polynomials #17

Open twVolc opened 1 year ago

twVolc commented 1 year ago

When trying to fit the DOAS calibration to camera optical depths there are issues if requesting a 2nd order polynomial fit. Pyplis uses scipy.optimize.curve_fit and this doesn't seem to do a good job if the initial guess (which is provided by pyplis) isn't close to the actual parameters. Specifically, the x^2 term just doesn't change at all, so the line remains straight. This is probably to do with the input guesses/bounds which pyplis passes to curve_fit. We can pass our own guesses if we generate them in PyplisWorker, or it may be easier to to our own fit and then update the pyplis DoasCalibData object manually.