Metadata-Version: 2.4
Name: ravest
Version: 0.4.1
Summary: Radial Velocity fitting, simulation and model comparison
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Author: Ross Dobson
Author-email: 56548895+ross-dobson@users.noreply.github.com
Requires-Python: >=3.11,<3.14
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Dist: astropy (>=7.2.0,<8.0.0)
Requires-Dist: corner (>=2.2.3,<3.0.0)
Requires-Dist: emcee (>=3.1.6,<4.0.0)
Requires-Dist: harmonic (>=1.3.1,<2.0.0)
Requires-Dist: jax (>=0.8.2,<0.9.0)
Requires-Dist: matplotlib (>=3.10.8,<4.0.0)
Requires-Dist: numba (>=0.64.0,<0.65.0)
Requires-Dist: numpy (>=2.4.2,<3.0.0)
Requires-Dist: pandas (>=2.3.3,<3.0.0)
Requires-Dist: scipy (>=1.16.3,<2.0.0)
Requires-Dist: tinygp (>=0.3.0,<0.4.0)
Requires-Dist: tqdm (>=4.67.1,<5.0.0)
Project-URL: Homepage, https://ravest.readthedocs.io
Project-URL: Repository, https://www.github.com/ross-dobson/ravest
Description-Content-Type: text/markdown

# ravest

**Radial Velocity fitting with Bayesian model comparison**

[![GitHub](https://img.shields.io/badge/GitHub-ross--dobson%2Fravest-181717?logo=github)](https://github.com/ross-dobson/ravest)
[![PyPI version](https://img.shields.io/pypi/v/ravest.svg)](https://pypi.org/project/ravest/)
[![CI/CD](https://github.com/ross-dobson/ravest/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/ross-dobson/ravest/actions/workflows/ci-cd.yml)
[![codecov](https://codecov.io/gh/ross-dobson/ravest/branch/main/graph/badge.svg)](https://codecov.io/gh/ross-dobson/ravest)
[![Documentation Status](https://readthedocs.org/projects/ravest/badge/?version=latest)](https://ravest.readthedocs.io/en/latest/?badge=latest)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

Features:
- Model exoplanets and host stars, to simulate RV data for given orbital and instrumental parameters
- Fit RV data with MCMC to explore posterior distributions for parameters - including Gaussian Processes for stellar activity
- Bayesian Model Comparison using the Learned Harmonic Mean Estimator from [harmonic](https://astro-informatics.github.io/harmonic/)
- Visualise/animate the star's orbit (coming soon!)

Check out the example notebooks at the [online documentation](https://ravest.readthedocs.io/) to see examples of how to do all of these!

GitHub: [github.com/ross-dobson/ravest](https://github.com/ross-dobson/ravest)


## Installation

It should be as simple as
```bash
$ pip install ravest
```

JAX is a requirement for `ravest` (and `harmonic`), so you may want to consult [the JAX installation docs](https://docs.jax.dev/en/latest/installation.html) if you want GPU or TPU support (tl;dr: install JAX first according to those instructions, then install `ravest` on top).

## Usage

For an example of how to fit a model to RV data, see [Example 1: fitting a single planet](https://ravest.readthedocs.io/en/latest/Examples/example_1_fitting.html), where we fit ELODIE data for 51 Peg b.

For fitting a two-planet system, comparing circular and eccentric orbits, see [Example 2: fitting a two-planet system](https://ravest.readthedocs.io/en/latest/Examples/example_2_K2-24.html), where we fit HIRES data for K2-24.

For an example of how to use a Gaussian Process to mitigate stellar variability, see [Example 3: fitting with a Gaussian Process](https://ravest.readthedocs.io/en/latest/Examples/example_3_GP.html), where we use a quasiperiodic kernel on HARPS data for K2-229.

For an example on using the Learned Harmonic Mean Estimator from `harmonic` to compare two competing RV models by estimating the Bayesian evidence $\mathcal{Z}$ and Bayes factors, see [Example 4: using the Learned Harmonic Mean Estimator](https://ravest.readthedocs.io/en/latest/Examples/example_4_harmonic.html), where we compare a one-planet and two-planet fit for TOI-544. It also demonstrates a multi-instrument fit, using both HARPS and HARPS-N data.

If you have any questions, check the [Frequently Asked Questions](https://ravest.readthedocs.io/en/latest/FAQ.html), raise an issue on Github, or email me and I'll be happy to help.

## Citing ravest

If you use `ravest` in your research, please cite [Dobson et al. (2026)](https://ui.adsabs.harvard.edu/abs/2026MNRAS.551g1343D/abstract).

If you use the Learned Harmonic Mean Estimator for Bayesian evidence estimation, then please also cite the `harmonic` team: see [their GitHub repository](https://github.com/astro-informatics/harmonic) for the relevant papers to cite, starting with [McEwen et al. (2021)](https://ui.adsabs.harvard.edu/abs/2021arXiv211112720M/abstract).

## Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

## Acknowledgements

Ravest makes use of the following open-source packages:
- [NumPy](https://numpy.org/) for numerical computing
- [SciPy](https://scipy.org/) for scientific computing algorithms
- [Matplotlib](https://matplotlib.org/) for plotting and visualisation
- [Astropy](http://www.astropy.org/) for astronomical calculations and utilities
- [pandas](https://pandas.pydata.org/) for data manipulation
- [tqdm](https://tqdm.github.io/) for progress bars
- [emcee](https://emcee.readthedocs.io/) for MCMC sampling
- [corner](https://corner.readthedocs.io/) for visualising posterior distributions
- [tinygp](https://tinygp.readthedocs.io/) for Gaussian Process modelling
- [JAX](https://jax.readthedocs.io/) for accelerated array computing and 64-bit precision, also required by `tinygp` and `harmonic`
- [harmonic](https://astro-informatics.github.io/harmonic/) for Bayesian evidence estimation via the Learned Harmonic Mean Estimator

## License

`ravest` was created by Ross Dobson. It is licensed under the terms of the GNU General Public License v3.0 or later (GPL-3.0-or-later).

