Installation

Requirements

Baseband requires:

Installing Baseband

To install Baseband with pip, run:

pip3 install baseband

Note

To run without pip potentially updating Numpy and Astropy, run, include the --no-deps flag.

Obtaining Source Code

The source code and latest development version of Baseband can found on its GitHub repo. You can get your own clone using:

git clone git@github.com:mhvk/baseband.git

Of course, it is even better to fork it on GitHub, and then clone your own repository, so that you can more easily contribute!

Running Code without Installing

As Baseband is purely Python, it can be used without being built or installed, by appending the directory it is located in to the PYTHON_PATH environment variable. Alternatively, you can use sys.path within Python to append the path:

import sys
sys.path.append(BASEBAND_PATH)

where BASEBAND_PATH is the directory you downloaded or cloned Baseband into.

Installing Source Code

If you want Baseband to be more broadly available, either to all users on a system, or within, say, a virtual environment, use setup.py in the root directory by calling:

python3 setup.py install

For general information on setup.py, see its documentation . Many of the setup.py options are inherited from Astropy (specifically, from Astropy -affiliated package manager) and are described further in Astropy’s installation documentation .

Testing the Installation

The root directory setup.py can also be used to test if Baseband can successfully be run on your system:

python3 setup.py test

or, inside of Python:

import baseband
baseband.test()

These tests require pytest to be installed. Further documentation can be found on the Astropy running tests documentation .

Building Documentation

Note

As with Astropy, building the documentation is unnecessary unless you are writing new documentation or do not have internet access, as Baseband’s documentation is available online at baseband.readthedocs.io.

The Baseband documentation can be built again using setup.py from the root directory:

python3 setup.py build_docs

This requires to have Sphinx installed (and its dependencies).