Skip to content

Commit

Permalink
Merge pull request #739 from Gaurav17Joshi/features/GPtool
Browse files Browse the repository at this point in the history
Gaussian Processes Tool
  • Loading branch information
dhuppenkothen authored Sep 29, 2023
2 parents be88264 + e9ef4df commit 34e6a94
Show file tree
Hide file tree
Showing 5 changed files with 1,340 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/changes/739.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This is a JAX implementation of the GP tool by `Hubener et al <https://arxiv.org/pdf/2205.12716.pdf#:~:text=ABSTRACT%20Analyses%20of%20quasi%2Dperiodic,flares%20and%20fast%20radio%20bursts.>`_
for QPO detection and parameter analysis.

This feature makes use of tinygp library for Gaussian Processes implementation, and jaxns for nested sampling,
and is kept in the stingray.modeling.gpmodeling module.

Main features of the module are:

- get_prior: This function makes the prior function for a specified prior dictionary.
- get_likelihood: This function makes the log_likelihood function for the given Kernel, Mean model and lightcurve.
- GPResult class: The class which takes a Lightcurve, and performs Nested Sampling for a given prior and likelihood.

The additional Dependencies for the code
- jax
- tinygp
- jaxns
- etils
- tensorflow_probability
- typing_extensions
14 changes: 14 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,20 @@ To install all required and recommended dependencies in a recent installation, y

$ pip install astropy scipy matplotlib numpy h5py tqdm numba pint-pulsar emcee corner statsmodels pyfftw tbb

For the Gaussian Process modeling in `stingray.modeling.gpmodeling`, you'll need the following extra packages

+ jax
+ jaxns
+ tensorflow
+ tensorflow-probability
+ tinygp
+ etils
+ typing_extensions

Most of these are installed via ``pip``, but if you have an Nvidia GPU available, you'll want to take special care
following the installation instructions for jax and tensorflow(-probability) in order to enable GPU support and
take advantage of those speed-ups.

For development work, you will need the following extra libraries:

+ pytest
Expand Down
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ all =
xarray
pandas
ultranest
jax
tinygp
jaxns
etils
tensorflow_probability
typing_extensions
test =
pytest
pytest-astropy
Expand Down
Loading

0 comments on commit 34e6a94

Please sign in to comment.