Package: brav0
# brav0_brav0_ (B**ayesian **Ra**dial **V**elocity **0-point correction) is a tool
to correct zero-point variations in radial velocity (RV) timeseries. This means
_brav0_ takes several datasets (usually from the same instrument) and models
variations that are common to all datasets.## Installation
_brav0_ can be installed with pip:python -m pip install brav0.To use the development version of _brav0_, clone the repository and install it:`shell git clonehttps://github.com/vandalt/brav0.gitcd brav0 python-mpip install-U-e".[dev]"`_Note: In both cases, as of release 0.1, the development pace will probably be
relatively fast for a while so users should update often, either by pulling
from the upstream Github repository or by upgrading withpython -m pip install
-U brav0.## Using _brav0_
_brav0_ is accessible as a command line script or as a Python library. The
script requires a configuration file. There are example config files as well as
a notebook using the API in theexamplesdirectory.### brav0 CLI
The CLI is the main way to use _brav0_. It does not (yet) provide an command to
run everything at once. The main ZP correction steps are instead separated in
various commands.First, we runsourceto load all the input individual data and merge it in a
single pandas dataframe.` brav0 source config.yml `This produces araw.csvfile in the output directory, indexed by original
file name.Then, we can preprocess the data by doing a series cleanups and by re-formatting
the dataframe (e.g. index with object names).` brav0 preprocess config.yml `This produces theprocessed.csvfile theraw_plotsdirectory with timeseries
and periodogram plots before PP, and thepp_plotsdirectory with plots after
PP.Once the data is ready, we can remove known planets. Currently, the only way to
do this inbrav0is to use the [NASA explanet archive](https://exoplanetarchive.ipac.caltech.edu/)
to remove known planets. It performs Monte-Carlo error propagation and removes
“non-controversial” planets only (as defined by the archive).` brav0remove-planetsconfig.yml `The resulting dataset is stored inno_planets.csvwith corresponding plots inno_planet.After removing known planets, we can fit the Zero-point model joinlty to all
data. The config file specifies if we do MCMC, MAP optimization, or just use a
fixed model (recommended only when all parameters have deterministic values).
Here is an example where we fit a GP with a Matern 3/2 kernel:` brav0 model config.yml Matern32 `This produces the model curve and the optimization or sampling results in a
directory with the model name (or other subdirectory when using the-ooption).Finally, we can generate summary information and plots about a given ZP model:` brav0 summary config.yml /path/to/model/dir `This will save plots in the model directory.## Why brav0 ?
Fitting RV zero-points can be done with relatively simple tools. _brav0_ was
originally written to explore the use of Gaussian processes to model RV
zero-points. When fitting a GP along with parameters for each standard
(calibration) star, the number of parameter can be high, such that sampling the
posterior distribution efficiently is challenging. _brav0_ uses PyMC3 to perform
gradient-based inference (other backends are not excluded, contributions are
welcome!). By usingexoplanetandcelerite2, _brav0_ enables efficient
inference to derive a zero-point correction error estimates.