Installation Instructions¶
Docker Installation¶
Docker can be used to run the software without having to complete the HEASoft/caldb/wcstools installation procedure yourself (or to run on windows). The image can be found on docker hub. It also includes the latest version of the DRESSCode pipeline, along with any other python dependencies.
To download and open an interactive shell with the prerequisites already installed:
docker pull dresscodeswift/dresscode
docker run --rm -it dresscodeswift/dresscode /bin/bash
From there run the pipeline, which is located in /opt/dresscode
You will probably want to download the data onto a persistent volume and mount it in your docker image as you run the pipeline. For this, see docker's storage volume documentation.
Local Installation¶
The following steps will install Heasoft, caldb, and wcstools on your machine
Download Heasoft software¶
- Go to https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/download.html
- STEP 1
- Select the type of software: Choose "SOURCE CODE DISTRIBUTION"
- Choose your platform, e.g. "PC - Ubuntu Linux 20.04"
- STEP 2
- Download the desired packages: Select the "Swift" mission (all FTOOLS and XANADU will automatically be selected)
- Submit and wait
- Untar the file
Install/Build Heasoft software¶
- STEP 3 - Install the software: Follow the installation guide for your platform, e.g. "PC Linux - Ubuntu (or other Debian-based Linux)".
All subsequent steps are for Ubuntu platforms:
- Install the prerequisite packages listed here: https://heasarc.gsfc.nasa.gov/lheasoft/ubuntu.html
- Build the software following the instructions in the installation guide (https://heasarc.gsfc.nasa.gov/lheasoft/ubuntu.html)
-
Add the following lines to your
.bashrc
(or equivalent):export HEADAS=~/heasoft-6.28/x86_64-pc-linux-gnu-libc2.23 . $HEADAS/headas-init.sh
Install the calibration tree¶
- Create a new folder “caldb” in the heasoft-6.28 folder
- Follow the instructions on: https://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/install.html (Sections 2 and 3)
Install wcstools¶
- Download the current version (3.9.7) from http://tdc-www.harvard.edu/software/wcstools/wcstools-3.9.7.tar.gz
- Put the tarfile in your home folder and untar
-
Install the tools:
cd wcstools-3.9.7 make all
-
Add the following line to your
.bashrc
(or equivalent):export PATH=~/wcstools-3.9.7/bin:$PATH
More info can be found on the wcstools website.
Install DRESSCode¶
Requires Python >= 3.7. Make sure you have a working python environment (it is probably best to create a new environment to work with DRESSCode). Then install from source:
python -m pip install git+https://github.com/spacetelescope/DRESSCode
Alternatively, clone the repo to a directory & install from there:
git clone git@github.com:spacetelescope/DRESSCode.git
cd DRESSCode
- Create a virtual environment:
python3 -m venv venv
python -m pip install .
or for an editable installpython -m pip install -e .
To install extra dev dependencies: python -m pip install -e ".[dev]"