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
81 stars 42 forks source link

MultiNest hanging at edge of prior #72

Closed robersju closed 1 month ago

robersju commented 7 months 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 7 months 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 7 months 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

ACCarnall commented 1 month ago

I assume this is now sorted.