RSS science data pipeline

The RSS science data pipeline runs as part of the daily SALT data pipeline run, and reduces normal and frame transfer long-slit spectroscopy exposures. In simple terms, the RSS science data pipeline is, in the most essential respects, a Pythonised version of Alexei Kniazev’s MIDAS and IRAF based RSS long-slit reduction pipeline package[1].

At minimum the object exposures are:

  • bad pixel replaced (FITS file suffix: _bp),
  • cosmic ray cleaned1 (FITS file suffix: _cr),
  • CCD gaps filled (FITS file suffix: _cg), and
  • wavelength calibrated and rectified (FITS file suffix: _wr).

If an observed instrument configuration has an accompanying (or archived) set of flat-field exposures then the object exposures are also:

  • auto gain corrected2 (FITS file suffix: _ag), and
  • flat fielded (FITS file suffix: _ff).

The following products are also included in the data distribution:

  • mosaicked bad pixel mask(s) for the observed binning configuration(s),
  • if applicable, median combined flat field(s) of accompanying (or archived) set of flat-field exposures for the observed instrument configuration(s),
  • reduction dictionaries with the details of CCD gap positions, and if applicable, median combined flat field(s) and auto-gain correction factors, and
  • wavelength calibration3 solution dictionary with the solution(s) for the observed instrument configuration(s).

As of observation date 1 August 2024 the above mentioned data products are included in the daily data distribution. Also, all normal and frame transfer long-slit spectroscopy exposures from the beginning of semester 2015-1, i.e., observation date 1 May 2015, have been reduced and are available to PIs. If not already included in the daily data distribution, the data products can be requested via the Web Manager (or the new Web Manager) using the Request data tick box for the relevant block and Request data button at the bottom of the Summary of executed observations section.

To aid users with the extraction of target spectra from the reduced object exposures the RSS: Long-slit spectra processing and extraction app is distributed as a Docker image: rsslsspectra.

Docker image setup

NOTE: This assumes the user is running a Linux operating system.

Using a terminal:

1. Install Docker (if not already installed):

# Update the package index files

sudo apt-get update

# Install Docker

sudo apt-get install docker.io

2. Get (pull) the rsslsspectra Docker image:

# Pull the latest rsslsspectra image from SAAO’s Docker registry … this takes a few minutes depending on your internet speed …

docker pull registry.saao.ac.za/rsslsspectra:latest

If the pull command gives the message: “Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock”:

# Add the unprivileged user to the docker group

sudo usermod -aG docker ${USER}

After the usermod command restart computer / laptop before proceeding.

3. Run the rsslsspectra Docker image as a container (make sure to run the command as 1 line in the terminal):

docker run --rm -it --ipc host -v /home/${USER}:/home/${USER}:rw -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -u rssuser registry.saao.ac.za/rsslsspectra

Foot notes:

1 Cosmic rays are cleaned with the Astro-SCRAPPY package which detects and cleans cosmic rays in 2D images, based on Pieter van Dokkum’s L.A. Cosmic algorithm[2].

2 The electronics of the RSS CCDs may cause slight changes to the routinely obtained gain levels used for gain correction in the primary reduction. An auto-gain correction is applied to ameliorate any significant change in gain levels.

3 The centre row of the reference (arc) exposure image is wavelength calibrated via cross-correlation with an emission line list for the applicable reference lamp (argon, copper-argon, mercury-argon, neon, thorium-argon, or xenon) used. The rest of the rows in the image are wavelength rectified using a low-order polynomial fit of the respective cross-correlation shifts with the wavelength-calibrated centre row.