libstempo — a Python wrapper for tempo2
libstempo
uses the tempo2 library to load a pulsar's tim/par files, and gives you easy Python access to the TOAs, the residuals, the timing-model parameters, the fit procedure, and more.
The master branch now refers to versions 2.X of libstempo. The API has changed substantially (for the better) from versions 1.X. If you need the older 1.X API, check out the libstempo1 branch, or install an older version with pip.
pip install libstempo
. That's all you need. Sweet, huh?include/tempo2.h
and lib/libtempo2.a
) by writing pip install libstempo --install-option="--with-tempo2=..."
.python setup.py install --prefix=...
, to install where you prefer. Again you can use --with-tempo2=...
to point the installer to the tempo2 install location.import libstempo
fails at runtime, complaining that it cannot find libtempo2.so
, you need to set the environment variable LD_LIBRARY_PATH
to the directory that contains libtempo2.so
.tempo2
release, and the latest CVS. (Or at least the changes that the maintainers are aware of. Open a ticket if you find a problem.)In lieu of documentation, since showing is better than telling.