Open mkuemmel opened 1 year ago
It's weird, we test gsl as part of our automated tests so I think it's working in normal cases. Could it be possible those failure cases are related to what's causing the infinite loop in levmar?
It is strange that:
Maybe more effort is necessary in the parameterization, I only exchanged levmar --> gsl in the config files. On the other hand it's a rather simple PSF fitting, meaning only one parameter. If consistent the residuals of the brighter objects at -1000 must look ridiculous...
Yepp, the objects at -1000. are black holes in the residuals.
But the failures are signaled in the stop reason. They all have stop-reason=11 (but there are also good stop-reson=11 sources.
I tried to figure out what that 11 means for gsl, but it is confusing. 11 means too many iterations, but for most of the baid fails the # of iteration is 0, also 11 should be translated into a flag, but the gsl flag is always 0.
It's a bit confusing:
Somehow for those 4% sources the fits does not really start. No idea why.
I ran the same dataset with levmar and with gsl and crossmatched the results. When plotting the relative difference between the initial flux and the fitted flux it looks like this:
The good news: the sources that were not fitted with gsl were also not fitted with levmar.
The bad news: I have no idea why neither minimizer does a good job.
I should have checked the flagging. I'll investigate further....
They all have in levmar: "7 - stopped by invalid (i.e. NaN or Inf) "func" values; a user error "
There are NAN's in the image file and 0 in the weight, but no weight threshold.
In the dataset discussed in #554, one way to avoid getting stuck would be using gsl instead of levmar. I checked that. While indeed the program runs through, a comparison of the fit results in x and y shows:
~2% of the sources are off in both, x and y. The sources are rather evenly distributed in x/y.
In flux there is even a branch which is far off:
I did not go into detail, but it is strange that gsl gives 1000 times brighter flux than levmar. The sources that are at around 1 fit very good, however!