dfm / python-fsps

Python bindings to Charlie Conroy's Flexible Stellar Population Synthesis (FSPS) Fortran code
https://python-fsps.readthedocs.io
MIT License
66 stars 38 forks source link

Clarification about SSP vs CSP generation #272

Closed sachapf closed 4 months ago

sachapf commented 4 months ago

I am a little confused about the get_spectrum function so I want to make sure I'm using it properly. One of the parameters for fsps StellarPopulation is sfh, where in the documentation it says for 0 - "Compute a simple stellar population (SSP)." The description for the get_spectrum function says that it "Return spectra for the current CSP."

Am I correct in assuming that with the sfh=0 option get_spectrum returns the SSP, where each element of the array returned from get_spectrum is an SSP for that age of stars? Then if sfh != 0, it will return the CSP, where the elements of the array are the evolution of the CSP over time?

If this assumption is wrong, then how can I access the SSP?

Thanks!

bd-j commented 4 months ago

Hi @sachapf, yes that is right. sfh = 0 returns SSPs (of different ages, if the tage keyword is not given) while sfh > 0 returns the CSP as it appears at the different ages. Note that in the former case the SSPs are all normalized to one solar mass formed, whereas for CSPs the normalization is by the fraction of stellar mass formed up to that age.

Hope this helps!

sachapf commented 4 months ago

Yes, thank you so much!