CIRADA-Tools/RM-Tools

Migrate QU fitting away from pymultinest

AlecThomson opened this issue · 3 comments

Adding this with the knowledge this will require a good deal of development + testing. But I think it'd be worth it for in the long run for both speed and maintainability.

Pymultinest is a python wrapper around the compiled multinest code. Unfortunately, the documentation on both pymultinest and multinest are rather sparse. This makes bug-fixing and development around it very difficult.

Further, running multinest can be very slow. Confusingly, it sometimes slows down when used with MPI, as well. This restricts its use for large area surveys e.g. POSSUM. It also prohibits any use on diffuse images of any kind - i.e. fitting for every pixel will take far too long.

There now exist several libraries which offer the same outcomes of multinest, but with much better interfaces, documentation, and speed. A couple that come to mind are:

  • UltraNest -- Note this is from the same developer as pymultinest, but seems to be receiving much more recent development!
  • dynesty

These libraries also have built in mode decomposition which should be a lot more robust than what we currently have implemented.

Strongly agree with this. Literally yesterday I gave up on installing multinest on the CANFAR cluster, while trying to reproduce #46. It would be much better if we could move to something that can be installed more reliably. Even better if we could move to something that can be easily pip-installed without extra steps.

I don't have time for that in the foreseeable future (i.e., to the end of this year), but if you or anyone else wants to tackle it I would greatly appreciate it.

Thanks @Cameron-Van-Eck. Good to know its not just a 'me problem'! Doing some reading, we may also want to strongly consider bilby, which provides a common interface to all the above samplers (including multinest) and more.

I can do some initial investigation on this, and scope out how much redevelopment will be needed.

Complete with #56