-
Notifications
You must be signed in to change notification settings - Fork 9
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
Should we recomment using gsl instead of levmar in #554??? #555
Comments
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. 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: 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.
![x_offset](https://private-user-images.githubusercontent.com/10818276/241234345-966d77ad-7a70-405c-8335-3596f1fc9548.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NDUzMzYsIm5iZiI6MTcyMDQ0NTAzNiwicGF0aCI6Ii8xMDgxODI3Ni8yNDEyMzQzNDUtOTY2ZDc3YWQtN2E3MC00MDVjLTgzMzUtMzU5NmYxZmM5NTQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUF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kmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.r8F_zHsYdGXryD4rJx6VJLD36x6wvgQ4ETcF-AQ87NE)
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:
![flux_comp](https://private-user-images.githubusercontent.com/10818276/241236214-65f9af89-6955-4d0e-bcb9-59b0f456f83d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NDUzMzYsIm5iZiI6MTcyMDQ0NTAzNiwicGF0aCI6Ii8xMDgxODI3Ni8yNDEyMzYyMTQtNjVmOWFmODktNjk1NS00ZDBlLWJjYjktNTliMGY0NTZmODNkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDEzMjM1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ1NmU4ZmM1ZTMwZDMzZWNhMzQxYjcwNmJiYzY3YmMxY2I5MzM3ZjBmMTRlN2Q1M2ZiYmFhNjRiNzhjZjViODcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.a-DzcKMy9FxLCtwONzu1n11_KWdVMjPbEGrA81LWGeQ)
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!
The text was updated successfully, but these errors were encountered: