bd-j / prospector

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

Errors with Continuity non-parametric SFH #136

Closed smlower closed 5 years ago

smlower commented 5 years ago

I am using the Flexible Continuity SFH and run into an error when generating the SFRs with FSPS:

File "/home/s.lower/anaconda3/lib/python3.6/site-packages/fsps-0.3.0-py3.6-linux-x86_64.egg/fsps/fsps.py", line 871, in set_tabular_sfh

assert np.all(age[1:] > age[:-1]), "Ages must be increasing." AssertionError: Ages must be increasing.

Here is the photometry being used as well as the param_file. The galaxy is at redshift 0. I am using emcee v.2.2.1 and scipy v.1.2.1.

smlower commented 5 years ago

As a follow up, with the fixed time bin continuity SFH, prospector can run the fits, but the derived stellar masses seem to be fixed at 1e12 solar masses (i.e. the walkers do not deviate from 1e12 throughout the iterations).

bd-j commented 5 years ago

There are problems with the implementation of the Flexible Continuity SFH in the TemplateLibrary that will be a little tricky to fix, so I'd suggest skipping that for now.

If you look at the default "continuity_sfh" parameters -- i.e. via TemplateLibrary.describe("continuity_sfh") -- the prior for logmass is restricted to 7-12, so the sampler is getting stuck at the upper limit of the prior. You can shift this prior range by hand model_params["logmass"]["prior"] = priors.TopHat(mini=10, maxi=14). If you still run up against the prior it suggests a units or distance/normalization issue.

smlower commented 5 years ago

Ah - entirely obvious now with the fixed time bin issue (I was mixed up with how the Dirichlet SFH priors were set up). Thanks!

bd-j commented 5 years ago

I've noted the flex_continuity problem in a separate issue, so I'll close this since the other problem is resolved.