j-faria / kima

Exoplanet detection in RVs with DNest4 and GPs
http://www.kima.science
MIT License
15 stars 10 forks source link

Consider using the `dnest4` Python bindings #23

Closed barentsen closed 6 years ago

barentsen commented 6 years ago

Just a suggestion: have you considered using the Python bindings for dnest4, or otherwise creating a Python wrapper for your own C++ code?

This could simplify this package by bypassing the need for compilation instructions, and bypassing the need for documenting both the C++ and the Python code. It would also make it easier to treat dnest4 as a standard Python dependency (i.e. it could automatically be installed and compiled via pip or setup.py just like e.g. astropy).

(This suggestion is part of https://github.com/openjournals/joss-reviews/issues/487.)

j-faria commented 6 years ago

I have used dnest4's Python bindings, which do make it easier to specify the model, priors, etc. Well, easier just because they are specified in Python instead of C++, so the development might be a bit faster. Sampling performance still suffers though, because the likelihood is then specified in Python (also I didn't find a way to parallelize the sampler into threads using the bindings).

Another issue is that the trans-dimensional sampling is not included in the Python bindings, as far as I can tell. So I still see kima as a C++ package, using the C++ code from DNest4, even if I completely agree that a Python-only package would simplify installation.

eggplantbren commented 6 years ago

I was about to comment on this, but João already said what I was going to say... :-)