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
71 stars 37 forks source link

MultiNest hanging at edge of prior #72

Open robersju opened 3 weeks ago

robersju commented 3 weeks ago

Have been attempting to run spectroscopic fits of a redshift 1.52 galaxy with various levels of complexity within the global model (a 4-dimension fit where the only variance is within the tau-decay SFH, a 6-dimension fit that also varies dust attenuation, and an 11-dimension fit that includes velocity dispersion and the polynomial Bayesian calibration detailed in the example notebook).

In each case, over the course of the fit the following warning/warnings are returned:

MultiNest Warning! Parameter 3 of mode 1 is converging towards the edge of the prior. Parameter 6 of mode 1 is converging towards the edge of the prior. Parameter 8 of mode 1 is converging towards the edge of the prior.

and after a certain point (approximately 2 hours) the run itself seems to stop entirely (no more returned warnings, no more time calls, no exception or error that forcibly halts the process). Is this an issue of the priors range being too small and that causing the run itself to hang indefinitely, or are the two issues unrelated?

robersju commented 3 weeks ago

As a secondary note, the same MultiNest warning appears when doing photometric fits of the same galaxy but the model successfully completes regardless, suggesting that it's less the model parameters that are the issue.

ACCarnall commented 2 weeks ago

Hi Robert,

I suspect these things are probably unrelated, the MultiNest warning often appears and doesn't usually imply anything wrong.

Do you have the verbose option set to True for your fits? If not, can you re-run with this and copy in the output for the time at which things start to hang?

In my experience, this kind of thing is often related to issues in the spectroscopic data loaded into the code. For example, a very small or negative or zero error on a single flux value, an unreasonably high flux value in the spectrum, etc. Might be worth checking for this in your data.

Cheers, Adam