Skip to content

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 calibration tree

  1. Create a new folder “caldb” in the heasoft-6.28 folder
  2. Follow the instructions on: https://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/install.html (Sections 2 and 3)

Install wcstools

  1. Download the current version (3.9.7) from http://tdc-www.harvard.edu/software/wcstools/wcstools-3.9.7.tar.gz
  2. Put the tarfile in your home folder and untar
  3. Install the tools:

    cd wcstools-3.9.7
    make all
    
  4. 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:

  1. git clone git@github.com:spacetelescope/DRESSCode.git
  2. cd DRESSCode
  3. Create a virtual environment: python3 -m venv venv
  4. python -m pip install . or for an editable install python -m pip install -e .

To install extra dev dependencies: python -m pip install -e ".[dev]"