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
78 stars 41 forks source link

Suggestion to add warning in the docs when using nautilus #84

Open camipacifici opened 2 months ago

camipacifici commented 2 months ago

Hi Adam, After a few hiccups, I managed to fit my spectrum and it works beautifully with nautilus. I would like to suggest to add a word of caution when using nautilus, though. When I started experiment with the fits, they would never converge and I had no idea why. The priors were sensible and even the simplest spectrum would not work. Then I switched to verbose=True and realized that the runner was stuck in a try/except statement. Basically, it kept resuming the previous run (I didn't know it would do that), but in the meantime I had changed the spectrum limits and resolution and the priors, so I guess the runner was very confused and didn't know what to do. Maybe you can add to the docs something explicit about resuming previous runs similar to what is in the nautilus docs here: https://nautilus-sampler.readthedocs.io/en/stable/guides/checkpointing.html#checkpointing Thank you again for your help!!

johannesulf commented 2 months ago

I'm happy to hear nautilus worked for you. And you're right that one should not resume a fit using a checkpoint file from a different fit. That will actually confuse both nautilus and MultiNest. I don't think it's necessarily specific to nautilus unless there are differences in the way bagpipes implements these two samplers regarding checkpointing.

johannesulf commented 2 months ago

I had a look at the code and, I believe, MultiNest would be affected in the same way. So if the documentation is updated, the statement about resuming from previous runs can be a general statement, I believe.

camipacifici commented 2 months ago

Makes sense. Thank you for clarifying this. I am not a frequent user of either of the two.