jacopo-chevallard / BEAGLE-general

Basic information to get started with the galaxy spectral modelling tool Beagle
https://www.iap.fr/beagle/
9 stars 0 forks source link

Cannot find the spectrum for the object when fitting spectrum and photometry simultaneously #106

Closed zychen-astro closed 9 months ago

zychen-astro commented 10 months ago

Hi Jacopo, I have been trying to fit the spectra simultaneously with the photometry. While everything went fine when I fit the spectra alone, it keeps reporting errors when I add the photometry into the parameter file, i.e., adding:

FILTERS THROUGHPUTS = /PATH/filter.fits FILTERS CONFIGURATION = /PATH/filter.dat PHOTOMETRIC CATALOGUE = /PATH/beagle_phot.fits

The error message I got is:

[ERROR: Cannot find the spectrum for the object ID XX ! ] [FUNCTION: "load_observation_spectrum" ] [MODULE: "io_spectra" ] Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

However, there is the spectrum for the object, and it ran without issues when I removed those lines about the photometry. Here, when fitting the spectrum alone, I used the same photometric catalog as the prior catalog where there is the redshift information stored. So I think BEAGLE can successfully match the ID and find the spectrum (spectrum filename:/PATH/spectra/ID_spec.fits, and configured in spec.list) in this case.

It also worked fine when I fit the photometry alone. And I only got the problem when trying to fit the photometry+spectrum together. The BEAGLE version I am running is v0.20.4 if this is something useful.

Do you know what might be causing this issue? Thank you!

LittleLin1999 commented 10 months ago

Hi @zychen-astro I ran spectrum+photometry fitting with BEAGLE v0.20.4 (the one you used), v.0.24.4, v.0.27.2 and v0.29.2. I reproduced this bug only with v0.20.4. The other three versions worked smoothly. Could you please try a newer version?

jacopo-chevallard commented 9 months ago

@LittleLin1999 thanks for answering ! :-) @zychen-astro I'm closing assuming that this is solved using newer versions of Beagle