Skip to main content

A Python wrapper for tempo2

Project description

libstempo

GitHub release (latest by date) PyPI Conda Version libstempo CI tests

Python Versions GitHub license

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.

  1. 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 for libstempo. This script also takes in an option argument with a path to the install location. For example you could run:
    # need sudo if installing in a restricted location
    curl -sSL https://raw.githubusercontent.com/vallis/libstempo/master/install_tempo2.sh /usr/local | sudo sh -
    
  2. Install via the instructions on the tempo2 homepage. If this method is used, the TEMPO2 environment variable will need to be set to use libstempo.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libstempo-2.4.1.tar.gz (863.1 kB view details)

Uploaded Source

File details

Details for the file libstempo-2.4.1.tar.gz.

File metadata

  • Download URL: libstempo-2.4.1.tar.gz
  • Upload date:
  • Size: 863.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for libstempo-2.4.1.tar.gz
Algorithm Hash digest
SHA256 0295d57e5b3f4137fba1970a84832b09fdfee82afd68ecc1e786199ad93e0e2b
MD5 3c5ef885c341210fbeadbfe460c8c741
BLAKE2b-256 5110524a5408c7870c1dbe5c567d73085d6d2e57bb7ac6405b1c188ab18f3c18

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page