Installation

Python Environment

It is highly recommended users create a new Python environment with either venv or Anaconda. The pipeline supports Python versions 3.12 or newer. Once configured, activate the new Python environment.

CRDS

For now, we rely on the Calibration Reference Data System (CRDS) API used by Space Telescope Science Intitute (STScI) to retrieve calibration data products necessary for data reduction. The CRDS defines a set of rules on how to choose the right calibraiton file(s) given an observation’s metadata. The CRDS server-side aspects will eventually be replaced with the appropriate interfaces to Keck and TMT, but we aim to maintain a minimal interface common to both facilities. Below we download and install the CRDS and cache tailored for Liger and IRIS. Note the CRDS cache is not a Python package itself, and is downloaded to the user’s home directory.

git clone https://github.com/oirlab/liger_iris_crds
git clone https://github.com/oirlab/liger-iris-crds-cache $HOME/crds_cache
cd liger_iris_crds
pip install .

We then define environment variables required by CRDS. Specifically, we will use the local cache instead of trying to connect to the JWST instance:

source setup_local_crds.sh

Development Install

Recommended: Fork the repository liger_iris_pipeline under your account on GitHub, then clone your fork on your machine.

Enter the root folder and create a live installation with:

pip install -e .

The -e option uses the cloned repository’s code directly as the source, meaning it will not be installed into site-packages/.

Run the unit tests (optional)

First install the testing dependencies:

pip install -e .[test]
pytest -s liger_iris_pipeline/tests/