Change page style: 

gemini_python X1 release

You are here

gemini_python, version X1.0.1: November 14, 2014
Expires on: TBD


gemini_python is a new Python-based data reduction platform under development at Gemini. It was developed to support the Quality Assessment Pipeline.

IMPORTANT: The data reduction pipeline should NOT be used for science quality reduction, in particular the stacking routine has not been checked for flux conservation and photometric accuracy. Currently, it can do quick-look reduction of GMOS imaging data, that's it. You might get lucky and get NIRI imaging quick-look for on-target dither observation, but there are still several issues. Use the Gemini IRAF package for scientific reduction. (Note: The QAP-processed biases and flats are probably scientifically correct, but their headers are not compatible with the Gemini IRAF routines and therefore are effectively rendered scientifically unusable.)

However, for Python programmers, the AstroData module is approved for science use.

The main components of gemini_python are the RecipeSystem which automates data processing, and AstroData which is a tool to access Multi-Extension FITS in a generic way.

We recommend that the user starts by reading the Release Note and the README file which are both included in the tar archive. They are also available here:


The gemini_python package has several dependencies like numpy, astropy, and others. All dependencies of gemini_python and astrodata are provide by the Ureka package, and users are highly encouraged to install and use this very useful package. It is an easy and, perhaps, best way to get everything you need and then some.

WARNING: The Ureka installation script will not set up IRAF for you. You need to do that yourself. Here's how:

     $ cd ~
     $ mkdir iraf
     $ cd iraf
     $ mkiraf
     -- creating a new uparm directory
     Terminal types: xgterm,xterm,gterm,vt640,vt100,etc.
     Enter terminal type: xgterm
     A new LOGIN.CL file has been created in the current directory.
     You may wish to review and edit this file to change the defaults.


The data package contains the MEF files used in the demo in the appendix of the reduce Users Manual and in the examples of the astrodata Users Manual.

Installation Instructions

Additional information is available in the README file packaged in the gemini_python tar ball.

It is recommended to install the software in a location other than the standard Python location for modules (the default site-packages). This is also the only solution if you do not have write permission to the default site-package. Here is how you install the software somewhere other than the default location:

     $ python install --prefix=/your/favorite/location

/your/favorite/location must already exist. This command will install executable scripts in a bin subdirectory, the documentation in a share subdirectory, and the modules in a lib/python2.7/site-packages subdirectory. The modules being installed are astrodata, astrodata_FITS, astrodata_Gemini, and gempy.

Because you are not using the default location, you will need to add two paths to your environment. You might want to add the following to your .cshrc or .bash_profile, or equivalent shell configuration script.

C shell(csh, tcsh):

     setenv PATH /your/favorite/location/bin:${PATH}
     setenv PYTHONPATH /your/favorite/location/lib/python2.7/site-packages:${PYTHONPATH}

Bourne shells (sh, bash, ksh, ...) :

     export PATH=/your/favorite/location/bin:${PATH}
     export PYTHONPATH=/your/favorite/location/lib/python2.7/site-packages:${PYTHONPATH}

If you added those lines to your shell configuration script, make sure your source the file to activate the new setting.
For csh/tcsh:

     $ source ~/.cshrc
     $ rehash

For bash:

     $ source ~/.bash_profile


The documentation is still limited. What is available is distributed with the package; it is not available online. Each manual is available in HTML and as a PDF.

Once you have installed the package, the manuals will be located in the share directory under your installation directory. Calling back to the installation instructions above, this means /your/favorite/location/share.

The paths to the manuals are a bit convoluted, sorry about that.

  • reduce Users Manual
    Contains a demo in the appendix. Try it out!
    • HTML: .../share/astrodata/reduce_UsersManual/_build/html/index.html
    • PDF: .../share/astrodata/reduce_UsersManual/_build/latex/ReduceUsersManual.pdf

  • AstroData Users Manual
    Lots of examples. All the data to run the examples are included in the data package. Try it out!
    • HTML: .../share/astrodata/ad_UsersManual/_build/html/index.html
    • PDF: .../share/astrodata/ad_UsersManual/_build/latex/AstroDataUsersManual.pdf

  • AstroData API
    If AstroData is for you and you need to know more, the API document is for you.
    • HTML: .../share/astrodata/astrodata_API/build/html/index.html
    • PDF: .../share/astrodata/astrodata_API/build/latex/AstroDataAPI.pdf

  • Descriptor Users Manual
    If you wish to learn more about the Descriptors, how they work, how to code them, this is the manual.
    • HTML: .../share/astrodata/descriptor_UsersManual/_build/html/index.html
    • PDF: .../share/astrodata/descriptor_UsersManualI/_build/latex/AUsersGuidetoDescriptors.tex

Gemini Observatory Participants