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

Error While Fitting Photometry with Spectral Indices Configuration File #87

Closed IsobeYuki closed 5 years ago

IsobeYuki commented 5 years ago

When fitting photometry with fixed Ha flux, I got this error:

[ERROR: Parameter hbaa@6563 does not correspond to any physical parameter ] [FUNCTION: "change_galaxy_parameters" ] [MODULE: "parameters_handling" ]

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f29a8145ea7 in ???
#1  0x7f29a81450dd in ???
#2  0x7f29a77c1f1f in ???
#3  0x55a747a35c72 in print_backtrace
    at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/astrofortran-src/src/lib_messages.f90:869
#4  0x55a747a37cba in __lib_messages_MOD_print_error
    at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/astrofortran-src/src/lib_messages.f90:819
#5  0x55a747c46521 in change_galaxy_parameters
    at /root/src/github.com/jacopo-chevallard/BEAGLE/src/parameters_handling.f90:812
#6  0x55a747c46521 in __parameters_handling_MOD_set_and_change_galaxy_parameters
    at /root/src/github.com/jacopo-chevallard/BEAGLE/src/parameters_handling.f90:297
#7  0x55a747c32d23 in __likelihood_function_MOD_likelihood
    at /root/src/github.com/jacopo-chevallard/BEAGLE/src/likelihood_function.f90:166
#8  0x55a747c397ab in __likelihood_function_MOD_mc_likelihood
    at /root/src/github.com/jacopo-chevallard/BEAGLE/src/likelihood_function.f90:121
#9  0x55a74783e4e4 in getloglike
    at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/mcfor-src/src/nested_sampling.f90:224
#10  0x55a74787d513 in __nested_MOD_gen_initial_live
    at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/multinest-src/nested.F90:536
#11  0x55a74787f0fd in __nested_MOD_nestsample
    at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/multinest-src/nested.F90:352
#12  0x55a7478806c4 in __nested_MOD_nestrun
    at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/multinest-src/nested.F90:239
#13  0x55a74783e935 in __nested_sampling_MOD_run_nested_sampling
    at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/mcfor-src/src/nested_sampling.f90:137
#14  0x55a747831f42 in __prosit_MOD_sample_pdf
    at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/mcfor-src/src/PROSIT.f90:322
#15  0x55a7477f1c04 in beagle
    at /root/src/github.com/jacopo-chevallard/BEAGLE/src/BEAGLE.f90:641
#16  0x55a7477ee2b6 in main
    at /root/src/github.com/jacopo-chevallard/BEAGLE/src/BEAGLE.f90:6

I attached the parameter file and the spectral indices configuration file used for this analysis. If you need more information, please tell me. I really appreciate if you help me. SpecIndiceConfig.txt test.txt

jacopo-chevallard commented 5 years ago

dear Yuki, sorry for not answering your mail earlier, the error it's actually self-explained, it arises since the quantity hbaa@6563 is not an adjustable parameter of the model. Our approach is to model a galaxy SED in terms of physical parameters, which means that the emission line strenghts are determined by a set of physical parameters. If you take a look at the Beagle manual (https://www.overleaf.com/read/wkhmzbcwmkqz) you'll find a list of adjustable parameters, those starting with nebular_ control, along with the sfr or specific_sfr, the strength of the different emission lines. You can, however, fit emission lines, by including the spectral indices configuration file (as you did). By simply removing the HBaA@6563 parameter from the parameter file your fitting should work, let me know if this clears things.

IsobeYuki commented 5 years ago

Thanks to your advice, BEAGLE finally ran!

You can, however, fit emission lines, by including the spectral indices configuration file (as you did). By simply removing the HBaA@6563 parameter from the parameter file your fitting should work, let me know if this clears things.

As you said, commenting out the line related to HBaA@6563 in the parameter file (and adding the information of pseudo continuum), I obtained the fitting results. I checked that they are different from those with no emission lines by a factor of ~2. Actually, however, I'm wondering why it works even though I remove descriptions of flux parameters from the parameter file and whether this analysis is truly what I'd like to do.

jacopo-chevallard commented 5 years ago

The reason is the one I pointed out above, in Beagle we use a physical model, determined by a set of physical parameters, to fit a galaxy SED/spectrum, and the flux of an emission line is not a physical parameter. The star formation rate, gas metallicity, ionization parameter, and so on are physical parameters. If you get a good agreement between the observed line flux and the line flux predicted by Beagle, then it means you’re doing the right things.

IsobeYuki commented 5 years ago

Now I understand what you mean. Thank you very much for your help! Closing.

jacopo-chevallard commented 5 years ago

Great! :)