Skip to content

Installation

If you're familiar with Python, you can install PTArcade with pip or conda, the Python package manager. If not, we recommend using a docker or singularity virtual environment.

With conda (recommended)

PTArcade is now available on conda-forge! you can install PTArcade using conda by typing in a terminal (1)

  1. See here for conda installation info.
conda install -c conda-forge ptarcade # (1)!
  1. If you want to install PTArcade in a new environment, run
    conda create -n ptarcade -c conda-forge python=3.10 ptarcade
    

This will install PTArcade and all the required dependencies in a conda environment named ptarcade. PTArcade will download and cache the following PTA datasets at runtime: NANOGrav 12.5-year, NANOGrav 15-year, and IPTA DR2.

With pip

PTArcade is also published as a PyPI package and can be installed with pip, ideally by using a virtual environment. Open up a terminal and install PTArcade with:

pip install ptarcade # (1)!

  1. We suggest to install PTArcade in a virtual environment. You can do so by running
    python3 -m venv <path/to/env>
    source <path/to/env>/bin/activate
    python3 -m pip install ptarcade
    

This will automatically install compatible versions of all Python dependencies and, as for the conda installation, download the following PTA datasets at runtime: NANOGrav 12.5-year, NANOGrav 15-year, and IPTA DR2.

Non-Python Dependencies

If you choose to install from PyPI, you'll need to get the non-Python dependencies yourself.

  • libstempo needs tempo2. You can install it by typing in a terminal
    curl -sSL https://raw.githubusercontent.com/vallis/libstempo/master/install_tempo2.sh | sh
    
  • sckit-sparse needs suitesparse. You can install it by typing in a terminal

    brew install suite-sparse
    
    sudo apt-get install libsuitesparse-dev
    
  • mpi4py needs an MPI implementation. You can install it by typing in a terminal

    brew install open-mpi
    
    sudo apt install libopenmpi-dev openmpi-bin
    

With docker

The official Docker image is a great way to get up and running in a few minutes, as it comes with all dependencies pre-installed. Open up a terminal and pull the image with:

docker pull ngnewphy/ptarcade:latest

With singularity

A singularity environment with all the necessary dependencies already installed can be downloaded by typing

singularity pull ptarcade.sif docker://ngnewphy/ptarcade:latest
This will create a Singularity image and save it as ptarcade.sif in the current working directory.

On Apple silicon

If you're using a Mac with Apple silicon, there are some dependencies of PTArcade that are not available for your architecture. We recommend using conda and specifying osx-64 as your platform so that the dependencies can be installed.

If you have a recent version of conda (>=23.10.0), you can use the following to set up your environment:

conda create -n ptarcade --platform osx-64 -c conda-forge python=3.10 ptarcade
If you are on an older version, modify the previous command as such:
CONDA_SUBDIR=osx-64 conda create -n ptarcade -c conda-forge python=3.10 ptarcade

# After environment is created, activate it and run
conda config --env --set subdir osx-64