ACCarnall / bagpipes

Bagpipes is a state of the art code for generating realistic model galaxy spectra and fitting these to spectroscopic and photometric observations. Users should install with pip, not by cloning the repository.
http://bagpipes.readthedocs.io
GNU General Public License v3.0
70 stars 37 forks source link

SEDs of different components #70

Open mariabile opened 4 weeks ago

mariabile commented 4 weeks ago

Hello, I was wondering if it is possible in BAGPIPES, in case of multiple components for the SFHs or in case of the addiction of the AGN, if it is possible to get the SEDs of the different components?

arielwrl commented 4 weeks ago

I don't know if there is a built-in way of doing that. The way I have been doing this is by creating a new model using the parameters that were derived for one of your components, and then you can get the SED (as well as other information) from this new model.

ACCarnall commented 4 weeks ago

Thanks Ariel, yes, this is probably what I'd recommend too, you can loop through the posterior samples and populate a new model_components dictionary each time with only the components you wish to recreate.

Cheers, Adam

arielwrl commented 4 weeks ago

Also here's a sample code that does just that to get the stellar mass of a single component: https://github.com/arielwrl/HST_blobs/blob/main/BAGPIPES/get_young_masses.py