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

log10 Dust mass issue when generating models #17

Open
Yanshengyu0311 opened this issue Jan 20, 2024 · 0 comments
Open

log10 Dust mass issue when generating models #17

Yanshengyu0311 opened this issue Jan 20, 2024 · 0 comments

Comments

@Yanshengyu0311
Copy link

Hi, Abdurro'uf!
It's a very cool pipeline for modeling the SED of galaxies, But when I try to generate the model of the as the blow code, the dust mass is always 0, so the log10(dust_mass) is always nan. The above questions will lead to a series of follow-up issues, when select the models for fitting.
`

from piXedfit.piXedfit_model import save_models_rest_spec
nmodels =10
nproc = 2
params_range = {'log_age':[-1.0,1.14], 'dust1':[0.0,3.0], 'dust2':[0.0,3.0]
}
imf_type = 1 # Chabrier (2003)
sfh_form = 4 # double power law SFH form
dust_law = 0 # charlot & Fall (2000) two components dust attenuation law
duste_switch = 1 # turn off dust emission
add_neb_emission = 1 # turn on nebular emission
add_agn = 0 # turn off AGN dusty torus emission
name_out = 's_cb_dpl_cf_de_na_100k.hdf5'
save_models_rest_spec(imf_type=imf_type, sfh_form=sfh_form, dust_law=dust_law,
params_range=params_range,
duste_switch=duste_switch, add_neb_emission=add_neb_emission, add_agn=add_agn,
nmodels=nmodels, nproc=nproc, name_out=name_out)
`

Could you please take a look and see if there are any issues with the code generated above? If everything is fine, I'd like to offer a suggestion for your pipeline to avoid the mentioned problems. After checking your pipeline, I propose adding the following lines at line 104 in /piXedfit_model/save_models_rest_spec.py:

`

if dust_mass > 0:
mod_log_dustmass_temp[int(count)] = log10(dust_mass)
else:
mod_log_dustmass_temp[int(count)] = -99

`

I am not familiar with the characteristics of galaxy spectral synthesis and fsps code as I am an outsider in galaxy physics. Therefore, I'm unsure if this correction is appropriate, and I'm concerned it might lead to subsequent errors. If you have better suggestions to enhance the robustness of the code, please let me know. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant