dfm / python-fsps

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

User SFHs #5

Closed bd-j closed 8 years ago

bd-j commented 11 years ago

Using the sfh = 2 option (user defined SFH in data/sfh.dat) yields a spectrum filled with zeros. I think this is due to compsp expecting SSPs at all metallicities for sfh = 2 or sfh = 3 while compute in fsps.f90 only passes a single metallicity.

beckermr commented 10 years ago

I am having a similar issue, but am not sure why. I use sfh=2 and then the interpolation to a single age (to say get magnitudes) fails. The full tables seem to be there however.

bd-j commented 10 years ago

@jonathansick @dfm perhaps we can add something to the docs about sfh=2 being unsupported for now? I'm not sure yet how much work it will be to add the user sfh support.

beckermr commented 10 years ago

What I found works is to request the full set of times and then do your own interpolation.

bd-j commented 10 years ago

Yup, that should work! If this ends up being a significant use case we should add something to python FSPS for it, I've got some code for such interpolations lying around. Wrapping the FSPS fortran code for this looks like it will require a bit of a refactor of current python-FSPS, and has the drawback of requiring the user sfhs to be in a particular file.

bd-j commented 8 years ago

closed by #63