Installation

Prerequisites

Before installing csky, make sure you have the latest pip:

pip install --user --upgrade pip  # or possibly pip3, for python3

Optional: install the latest versions of dependencies explicitly (otherwise pip should still guarantee that valid dependencies are installed):

python -m pip install --user --upgrade pybind11 numpy matplotlib scipy healpy histlite

On macOS: install the GNU compiler collection, which will be used instead of the system compiler.

brew install "gcc@13"

csky installation

Once you have the prerequisites, you can install csky. First obtain the sources:

cd [someplace where you would like the csky sources to live]
git clone https://github.com/icecube/csky.git

or for a specific release, e.g.

git clone https://github.com/icecube/csky.git --branch releases/v1.0.0

Then install with pip:

python -m pip install --user --editable csky

Configuration

Before getting started with using csky, you may want to set the following environment variables (in ~/.profile or such, check your shell documentation…). Note that these settings are not necessary on UW machines with access to /data/ana, such as the cobalts.

# where you want your mirror of /data/ana/analyses or analogous repository
export CSKY_DATA_ANALYSES_DIR="/path/to/local/mirror"
# username for rsync'ing data (leave unset to use wget instead)
export CSKY_REMOTE_USER="[cobalt username]"

Updating csky

As long as you’ve included the --editable argument as recommended above, updating should be as simple as svn up. However, if you see a .cpp file in an incoming update (or if you modify the C++ code yourself), you’ll need to repeat the pip-install step in order to recompile the C++ extension.

Compatibility

csky is still compatible with Python 2.7, but it is nevertheless recommended that you upgrade to Python 3 as soon as possible. In particular, note that csky has been tested with

eval `/cvmfs/icecube.opensciencegrid.org/py3-v4.0.1/setup.sh`