Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error values when using the gls minimizer #345

Open
mkuemmel opened this issue Apr 22, 2021 · 11 comments
Open

Strange error values when using the gls minimizer #345

mkuemmel opened this issue Apr 22, 2021 · 11 comments
Assignees
Labels
Milestone

Comments

@mkuemmel
Copy link
Collaborator

When using the gsl minimizer. There are some cases when the error values are all NAN (blank in the pic) and sometimes the error values are all 0.0, which also makes not much sense:
gslI
Very occasionally only one of the error values is NAN, such as mag_err here:
 gslII
Note that in all those objects no flags were set and the # of iterations is >1. The zip file below contains the FITS from which the screenshots were made. The image was a cutout of a large galaxy in FIELD0 of the Euclid morphology challenge (Double Sersic).

gsl_minimizer.zip

@marcschefer
Copy link
Member

Did we ever look into that?

@mkuemmel
Copy link
Collaborator Author

mkuemmel commented Dec 6, 2021

Not to my knowledge.

@marcschefer marcschefer added the bug label Dec 6, 2021
@marcschefer marcschefer added this to the 0.17 milestone Dec 6, 2021
@marcschefer
Copy link
Member

Then we should for the version after this one.

@mkuemmel
Copy link
Collaborator Author

mkuemmel commented Dec 6, 2021

I can run a test to see whether this still happens.

@mkuemmel
Copy link
Collaborator Author

mkuemmel commented Dec 6, 2021

I am running now with gsl. There is tons of:

2021-12-06T14:04:09CET ModelFitting WARN : WorldToEngine ExpSigmoidConverter: world values outside of possible range
2021-12-06T14:04:09CET ModelFitting WARN : WorldToEngine ExpSigmoidConverter: world values outside of possible range
2021-12-06T14:04:10CET ModelFitting WARN : WorldToEngine ExpSigmoidConverter: world values outside of possible range
2021-12-06T14:04:10CET ModelFitting WARN : WorldToEngine ExpSigmoidConverter: world values outside of possible range

It was not like that in October when running with gsl and pyston on the version then. Maybe this is due to the meta iterations?

@marcschefer
Copy link
Member

Yes, I have fixed those "value outside range" to now be warnings and not stop the fit, the parameter value is clamped to the value you specified in the configuration.

Still it means one of the parameters is going outside of range which is not ideal but is configuration-dependent.

@mkuemmel
Copy link
Collaborator Author

mkuemmel commented Dec 6, 2021

Okay, but I did not change the boundaries or so in the python configuration files. So it is not clear why they show up now.

@mkuemmel
Copy link
Collaborator Author

mkuemmel commented Dec 6, 2021

Just to give the scale of that, in the levmar runs that warning appears 2 times, in gsl, 1/3 through the processing, it appeared 41000 time (same dataset of course).

@mkuemmel
Copy link
Collaborator Author

mkuemmel commented Dec 7, 2021

I checked into this.
The error values are almost all filled now. If they are not filled then fmf_flags is in almost all cases 1024, which is a general error flag for the fitting. In those case usually fmf_stop_reasons usually is 7. It tried to decipher these values, but I am not sure. If they are defined in gsl_errno.h it means sanity check failed. Looks like that this problem does not appear right now.
But, I am rather worried about the warnings mentioned above:
2021-12-06T14:04:10CET ModelFitting WARN : WorldToEngine ExpSigmoidConverter: world values outside of possible range
The number of those warning is higher than the number of objects. The 'normal' fmf_stop_reasons is 2 which would be 'output range error'. If this is true, this is a bigger problem that could camouflage the strange error values, simple since the fits don't finish.

How should we proceed, opening another ticket for the Warnings above?

@marcschefer
Copy link
Member

I don't see the point of having a ticket for the warnings, they are working as intended.

As for what reason the GSL fit is behaving weirdly in this case, I don't know. I put this in the 0.17 milestone, as honestly I don't think we have time to investigate this for 0.16.

@mkuemmel
Copy link
Collaborator Author

mkuemmel commented Dec 7, 2021

Fine with me. levmar is behaving well, no reason to emphasize this for 0.16.

@marcschefer marcschefer modified the milestones: 0.17, 0.18 Apr 12, 2022
@marcschefer marcschefer self-assigned this Nov 18, 2022
@marcschefer marcschefer modified the milestones: 0.18, 0.20 Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants