Skip to content

pykoala/pykoala

Repository files navigation

PyKOALA

A multi-instrument tool for reducing Integral Field Spectroscopic Data


PyKOALA is a Python package to reduce KOALA+AAOmega integral field spectroscopy (IFS) data creating a data cube. It produces full calibrated (wavelength, flux and astrometry) data cubes ready for science.

KOALA, the Kilofibre Optical AAT Lenslet Array, is a wide-field, high efficiency, integral field unit used by the AAOmega spectrograph on the 3.9m AAT (Anglo-Australian Telescope) at Siding Spring Observatory. PyKOALA is the forthcoming data reduction pipeline for creating science-ready 3D data cubes using Raw Stacked Spectra (RSS) images created with 2dfdr.


Status

Documentation Status test Coverage Status License Supported versions PyPI


Documentation

PyKOALA full documentation can be found here: https://pykoala.readthedocs.io/en/latest/index.html


Download

PyKOALA can be obtained by cloning the repository, using git:

git clone https://github.com/pykoala/pykoala.git

Installation (recommended)

We recommend the use of Python environments for the installation of PyKOALA. First, from the terminal enter in the downloaded PyKOALA package and create the Python environment:

cd pykoala
python3 -m venv venv_koala

To activate the environment, use:

source venv_koala/bin/activate

then install all required packages with:

pip install -r requirements.txt
pip install .

The second command will also install PyKOALA in the virtual environment. Once you are finished with your PyKOALA session, use:

deactivate

to deactivate the Python environment.

For more information about installation and usage of Python virtual environment, check the documentation or the oficial Python documentation.

Package structure


Data containers

Represent the different types of data used by PyKOALA.

  • RSS
  • Cube

Data Wrappers: Instrument-specific classes based on Data Containers for reading the data

  • koala_rss

Cubing

cubing.interpolate_fibre

cubing.interpolate_rss

cubing.build_cube

Registration

registration.register_stars


Corrections

All the corrections applied to the data are build upon the Correction base class.

Fibre Throughput

Atmospheric corrections

  • AtmosphericExtinction
  • Atmospheric Differential Refraction (ADR)

Sky

  • Sky substraction (SkySubsCorrection)
    • Sky continuum
    • Sky emission lines
  • Telluric correction (TelluricCorrection)

Flux calibration (Spectral throughput)

Cleaning

  • Cosmics
  • NaN's
  • CCD edges

Ancillary


Basic reduction procedure


(See examples)

Reducing calibration star data

  • Read RSS data.
  • Apply fibre throughput.
  • Correct data for atmospheric extinction.
  • Correct data from telluric atmospheric absorption.
  • Substract sky (continuum + emission lines).
  • Build cube

License and Acknowledgements

BSD 3-Clause License

Copyright (c) 2020, pykoala All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.