1. Introduction

1.1. What is AstroData?

The AstroData class is a tool to represent datasets stored in Multi-Extension FITS (MEF) files. It provides uniform interfaces for working on datasets from different instruments and their observational modes. Configuration packages are used to describe the specific data characteristics, layout, and to store type-specific implementations. Once a MEF has been opened with AstroData, the object it is assigned to knows essential information about itself, like from which instrument this data comes from, how to access the header information, etc.

Multi-extension FITS files are generalized as lists of header-data units (HDU), with key-value pairs populating headers, and pixel values populating data arrays. AstroData interprets a MEF as a single complex entity. The individual “extensions” within the MEF are available with normal Python list (“[]”) syntax.

In order to identify types for the dataset and provide type-specific behavior, AstroData relies on configuration packages. A configuration package (eg. astrodata_Gemini) contains definitions for all instruments and modes. A configuration package contains type definitions, meta-data functions, information lookup tables, and any other code or information needed to handle specific types of dataset.

1.2. Installing AstroData

The astrodata package has several dependencies like numpy, astropy, and others. The best way to get everything you need is to install Ureka, http://ssb.stsci.edu/ureka/.

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.

Once this is done, install gemini_python. The astrodata package is currently distributed as part of the gemini_python package. The gemini_python package, gemini_python-X1.tar.gz, can be obtained from the Gemini website:

1.2.2. Easier but more dangerous installation

Assuming that you have installed Ureka and that you have write access to the Ureka directory, this will install astrodata in the Ureka site-packages directory. WARNING: While easier to install and configure, this will modify your Ureka installation.

$ python setup.py install

This will also add executables to the Ureka bin directory and documentation to the Ureka share directory.

With this installation scheme, there is no need to add paths to your environment. However, it is a lot more complicated to remove the Gemini software in case of problems, or if you just want to clean it out after evaluation.

In tcsh, you will need to run rehash to pick the new executables written to bin.

1.2.3. Smoke test the installation

Just to make there is nothing obviously wrong with the installation and configuration, we recommend that you run the following smoke tests:

$ which typewalk

Expected result: /your/favorite/location/bin/typewalk
$ python
>>> from astrodata import AstroData

Expected result: Just a python prompt and no error messages.

1.3. AstroData Support

This release of astrodata as part of gemini_python-X1 is an early release of what we are working on. It is not a fully supported product yet. If you do have questions or feedback, please use the Gemini Helpdesk but keep in mind that the ticket will be addressed on a best-effort basis only.