Downloading and Installing Stingray

There are currently two ways to install Stingray:

  • via conda
  • via pip
  • from source

Installing via conda

If you manage your Python installation and packages via Anaconda or miniconda, you can install stingray via the conda-forge build:

$ conda install -c conda-forge stingray

That should be all you need to do! Just remember to run the tests before you use it!

Installing via pip

pip-installing Stingray is easy! Just do:

$ pip install stingray

And you should be done! Just remember to run the tests before you use it!

Installing from source (bleeding edge version)

For those of you wanting to install the bleeding-edge development version from source (it will have bugs; you’ve been warned!), first clone our repository on GitHub:

$ git clone --recursive

Now cd into the newly created stingray directory and install the necessary dependencies:

$ cd stingray

Finally, install stingray itself:

$ pip install -e "."

Note that this will install the package without the optional dependencies required by the modeling subpackage. In order to install stingray with these dependencies (emcee, corner and statsmodels), execute

$ pip install -e ".[modeling]"

Test Suite

Please be sure to run the test suite before you use the package, and please report anything you think might be bugs on our GitHub Issues page.

Stingray uses py.test for testing. To run the tests, go into the stingray root directory and execute

$ python test

If you have installed Stingray via pip or conda, the source directory might not be easily accessible. Once installed, you can also run the tests using:

$ python -c 'import stingray; stingray.test()'

or from within a python interpreter:


The documentation including tutorials is hosted on readthedocs The documentation uses sphinx to build and requires a couple of extensions (most notably nbsphinx and the astropy helpers).

You can build the API reference yourself by going into the docs folder within the stingray root directory and running the Makefile:

$ cd stingray/docs
$ make html

If that doesn’t work on your system, you can invoke sphinx-build itself from the stingray source directory:

$ cd stingray
$ $ sphinx-build docs docs/_build

The documentation should be located in stingray/docs/_build. Try opening ./docs/_build/index.rst from the stingray source directory.