Data Reduction

For processing KOALA data astronomers need to first pre-process the raw data into rss (Raw Stacked Spectra) files using the 2dfdr software, and then use the PyKOALA code for further processing the rss files and performing the cubing and combination of the individual cubes.
While a full documentation is prepared, do not hesitate to contact Ángel López-Sánchez for providing further information about KOALA data processing.

Pre-processing KOALA data: from raw data to rss files

The AAT and AAO-MQ supported 2dfdr software package handles basic reduction of KOALA data. 2dfdr takes raw files from the telescope and extracts wavelength calibrated spectra for each lenslet of the integral-field unit.
Astronomers MUST use the latest version of 2dFdr, V8.03b, which is the only one that can properly process KOALA data. Get 2dFdr V8.03b from  https://cloud.datacentral.org.au/s/Bn2jGibFeyCaOrY (bottom of the list).
Some information about the 2dFdr data reduction process is included in the KOALA+AAOmega Manual under "Part IV: Data Reduction” (Chapters 14 and 15).

Running 2dFdr will perform

  1. The dark frame subtraction,
  2. The long-slit at correction,
  3. The cosmic rays removal,
  4. The tram extraction,
  5. The scattered light subtraction,
  6. The wavelength calibration.

Important: 

  • For tram extraction, the SMCOPTEX method is strongly recommended. Gauss will be provide a fast processing but it is NOT optimal for science.
  • Be sure you select “KOALA” for "Scattered light subtraction”.
  • Be sure 2dFdr is not doing / trying to do any sky subtraction (it will NOT work).
  • DO NOT DIVIDE BY FLAT IN ANY MOMENT, this is later performed in the 2D throughput correction with PyKOALA.
  • DO NOT COMBINE any individual science file EXCEPT those for throughput (sky flats / dome flats) if desired (not needed, PyKOALA can handle that too).

Cosmic rays removal is ONLY needed for science frames (no need of running in ARC / FLATS / SKYFLATS/DOMEFLATS) for saving processing time.

Using PyKOALA for processing rss files and cubes

Once rss data are obtained for your science frames (+ skyflat/domeflat for throughput correction, offset skies, and calibration stars), we use the Python code PyKOALA to “clean” the rss files and process to the cubing. The code can be downloaded from: https://github.com/pykoala/koala and includes some tutorials. Full documentation of the PyKOALA package can be found in https://pykoala.readthedocs.io.
A full description and manual on how to use PyKOALA is currently in preparation.

Processing rss files with PyKOALA:

This will perform:

  1. Masking bad pixels (edges),
  2. Throughput correction,
  3. Small wavelength shift correction,
  4. Atmospheric extinction correction,
  5. Telluric correction (red arm),
  6. Sky subtraction (several methods included),
  7. Emission line identification,
  8. Cleaning sky residuals,
  9. Cleaning bright cosmic rays not deleted by 2dFdr,
  10. Save your data in fits files.

Processing cube files with PyKOALA: 

This will perform:

  1. Cubing rss files,
  2. Correction for ADR (atmospheric differential refraction),
  3. Update astrometry,
  4. Flux calibration,
  5. Alignment of cubes,
  6. Combination of cubes,
  7. Mosaicking as needed,
  8. Save cubes in fits files.

PyKOALA also includes tasks for quick plotting rss files, spectra (both through wavelength and fibres), cubes, creating and plotting maps (integrated flux, velocities, FWHM, EW…), fitting emission lines, continuum determination, and more. PyKOALA is fully modular, the user can apply any particular method desired as needed (e.g., if the user has an method for telluric correction, or sky subtraction, or cubing, can choose to use it, and apply the rest of the default methods included in PyKOALA for other corrections).
Please, don’t hesitate to contact Ángel López-Sánchez for further information.