A Python wrapper for tempo2
Project description
libstempo
libstempo
is a Python wrapper around the tempo2 pulsar timing package.
Installation
conda Install
libstempo
is installed most simply via conda as the tempo
dependency
is bundled in the conda recipe. Simply use
conda install -c conda-forge libstempo
pip Install
To use libstempo
with pip (or from source), tempo2 must be installed as a prerequisite. Currently there are two recommended methods to do this.
- Install via script.
curl -sSL https://raw.githubusercontent.com/vallis/libstempo/master/install_tempo2.sh | sh
This will install the tempo2 library in a local directory ($HOME/.local
). This method is recommended if you do not need to use tempo2 directly but just need the installation forlibstempo
. You can also set the path to the install location. For example, to install in/usr/local
, you could run:# need sudo if installing in a restricted location curl -sSL https://raw.githubusercontent.com/vallis/libstempo/master/install_tempo2.sh | sudo sh -s /usr/local
- Install via the instructions on the tempo2 homepage. If this method is used, the
TEMPO2
environment variable will need to be set to uselibstempo
.
In either case, it is best practice to set the TEMPO2
environment
variable so that it can be easily discovered by libstempo
.
The libstempo
package can be installed via pip
:
pip install libstempo
To use astropy
for units:
pip install libstempo[astropy]
If you have installed tempo2
in a location that is not in your path or not the default from install_tempo2.sh
, you will need to install
libstempo
with an environment variable (e.g. if tempo2
is in /opt/local/bin
)
TEMPO2_PREFIX=/opt/local pip install libstempo
or
export TEMPO2_PREFIX=/opt/local
pip install libstempo
Usage
See Demo Notebook 1 for basic usage and Demo Notebook 2 for simulation usage.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file libstempo-2.4.6.tar.gz
.
File metadata
- Download URL: libstempo-2.4.6.tar.gz
- Upload date:
- Size: 959.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fabb22b466f1b14d52293fb34f819c8238d21f8fbb4c1455aae7808b34ea2af |
|
MD5 | 6e128262bdeb6222ac1361825b7719ce |
|
BLAKE2b-256 | 092eb1f255e3a09376090cbba04fceb5f489f4ea2b8761da1cef519de3215736 |