Open KathleenLabrie opened 3 months ago
My first guess is that there's a column which has only one good pixel in it. The error doesn't arise when fitting a spline. The fitting is done by fit_1D()
regardless of the type of fit, but the spline-fitter has explicit code to deal with cases where there are more degrees of freedom than parameters (hence the "Unmasking all data." messages). Since there's not a problem with other GMOS datasets (where there are chip-gap columns with zero good pixels), my guess is that this only happens with one good pixel. This would also explain why increasing the size of the regions works (additional good pixels are brought into that column).
This happens with DRAGONS v3.2 (probably happens with previous versions too).
reduce S20240410S0025_aperturesFound.fits -p aperture_growth=10 order=1 hsigma=2.5 function=chebyshev regions=[960:1000,1130:1170] interactive=True -r skyCorrectFromSlit
Removing the regions or making them much bigger (~10 x) avoids the crash. As can see from the screenshot, it's a very straight forward fit, no idea why it would fail.
There's a vertical area of bad pixels on the input image around x=400, maybe that's where the fit fails. I can't investigate with the interactive tool right now because the column selection slider does not seem to do anything anymore. (that's another issue, reported on Slack).
Data to reproduce (still proprietary, limited access): https://drive.google.com/drive/folders/1eCK2dk2UrzxN8B1yOmkuONCNfN2ktLpB?usp=sharing