bd-j / prospector

Python code for Stellar Population Inference from Spectra and SEDs
http://prospect.readthedocs.io
MIT License
157 stars 73 forks source link

Stellar Metallicity Prior in Linear Units #310

Closed anersesi closed 9 months ago

anersesi commented 9 months ago

Greetings,

I have a question. I was wondering if it is possible to give a stellar metallicity prior in linear units, without altering Prospector or FSPS?

I am using this: model_params["logzsol"]["prior"] = priors.TopHat(mini=-1.98, maxi=0.19) So, what I would like to test is something like this: model_params["logzsol"]["prior"] = priors.LogUniform(mini=0.011, maxi=1.55)

Many thanks!

Angelos

bd-j commented 9 months ago

Hi @anersesi

I think the versions you have above (a linear parameter with a LogUniform prior, or a logarithmic parameter with a uniform prior) are functionally equivalent.

If you really want a linear metallicity parameter so you can, e.g. use a prior that is Uniform in Z/Zsun, not log(Z/Z_sun) you could try a parameter transformation, see https://prospect.readthedocs.io/en/latest/models.html#transformations for some information on this.

anersesi commented 9 months ago

Thanks a lot for the prompt answer.