Closed marcschefer closed 4 years ago
So I can reproduce this issue: large uncertainties even for bright sources, while GSL has smaller uncertainties. So far I have found one small issue (the diagonal of the covariance matrix may have tiny negative values caused by the floating point precision, and they will cause and propagate NaNs once we take their square root), but the issue does not go away.
I have checked sextractor vendored levmar, and, as far as I can tell, it does not use lapack for computing the inverse of JtJ, but a custom method implemented by @ebertin, which I think should be similar to the lapack one?
I fail to see any difference on our side between what we pass to the GSL and to the Levmar engines.
In general, when I compare with sextractor, we have bigger uncertainties, but for a single frame the difference between levmar and gsl does not look that dramatic.
This one too is fixed by #277
@ebertin reported that some sources get inexplicably large uncertainty values for their model fitting magnitudes. This doesn't seem to be limited to faint sources or sources that are missing data.
I was able to confirm that using sersic models on the sim11 dataset.
This could come from the way we extract uncertainties from levmar's covariance matrix or it could be related to how levmar computes it. The original sextractor 2 code seems to have some custom code in levmar that could potentially be related to that issue.