astrorama / SourceXtractorPlusPlus

SourceXtractor++, the next generation SExtractor
https://astrorama.github.io/SourceXtractorPlusPlus/
GNU Lesser General Public License v3.0
73 stars 9 forks source link

Bug when doing multi-band bulge and disk model-fitting #574

Closed louisquilley closed 8 months ago

louisquilley commented 8 months ago

Hello, while working on Euclid ERO images I encountered a bug that I don't understand. I successfully launched model-fitting runs using:

2024-03-05T11:45:52CET SourceXtractor FATAL : Unknown exception type! 2024-03-05T11:45:52CET SourceXtractor FATAL : Please, report this as a bug 2024-03-05T11:45:52CET Python::Interpreter INFO : Python GIL acquired 164 times

even though the configuration steps to load images, psfs and filters and using VIS band for detection are the same as the successful single-Sérsic multi-band run, and the model parameters used are the same as the bulge and disk separate runs. By that, I mean that each band has its own independent set of parameters which is identical to the successfully tried one and no prior is added between bands, so they should just be performed simultaneously.

This error message arises after a series of such lines: 2024-03-05T11:45:52CET Config INFO : Range min compiled 2024-03-05T11:45:52CET Config INFO : Range max compiled 2024-03-05T11:45:52CET Config INFO : Free parameter compiled 2024-03-05T11:45:52CET Config INFO : Range min compiled 2024-03-05T11:45:52CET Config INFO : Range max compiled 2024-03-05T11:45:52CET Config INFO : Dependent parameter compiled

I remain available to provide more information or the configuration files if needed.

Thank you in advance for your help, Louis

marcschefer commented 8 months ago

Unfortunately it's impossible to say what it can be based on the error, it's just our generic exception catcher.

If you're willing to share the config file and full log maybe I can see something. (you can also send them privately for example on the Euclid slack)

mkuemmel commented 8 months ago

I had a similar situation some 10 days ago. The solution then was rather simple - a parenthesis was missing or was inconsistent. Consequently SE++ was reading almost the entire python config file and could not pinpoint the problematic line.

louisquilley commented 8 months ago

Ok, it was not a parenthesis but it pushed me to re-check carefully every line, and especially every ( ) and [ ], and I realized that I forgot a [i] specifying the band after the total flux parameter when computing the bulge fluxes and disk fluxes. Since flux was defined it did not raise a classical error, but it blocked things as it was not a single parameter but a dictionary of parameters. The model-fitting is now running. Thank you again for your help.