Pre-requisites

Dependencies

numpy and matplotlib

APLpy requires numpy-1.3.0 or later, and matplotlib-0.99 or later. There are two different ways to install these packages.

You can download the required packages from the numpy and matplotlib home pages, and install these using the standard installation method, for example:

tar xvzf numpy-1.3.0.tar.gz
cd numpy-1.3.0
sudo python setup.py install

Be sure to install numpy before matplotlib!

The second alternative, if you have easy_install installed, is:

easy_install numpy
easy_install matplotlib # This method does not currently work for matplotlib 0.99!

If you have space-a-plenty on your computer put in the -Z option. This will keep the install file un-archived, which means faster load times when importing the modules. Here's an example:

easy_install -Z numpy

which will install the latest available versions. Bear in mind, that some computers will require the sudo command before the easy_install command. If you run into complications installing any of these packages you should go to the numpy and/or matplotlib mailing lists for help.

pyfits

In order to read/write FITS files, APLpy requires pyfits-2.1 or later to be installed. The pyfits module is developed at the Space Telescope Science Institute, and can be downloaded here. Once you have the tar file downloaded, you can either install it using the standard installation method:

tar xvzf pyfits-2.x.x.tar.gz
cd pyfits-2.x.x
sudo python setup.py install

or using easy_install:

easy_install pyfits-2.x.x.tar.gz

pywcs

In order to be able to use the World Coordinate System (WCS) information contained in FITS file headers, APLpy requires pywcs. The pywcs module is developed at the Space Telescope Science Institute, and can be downloaded here. Once you have the tar file downloaded, you can either install it using the standard installation method:

tar xvzf pywcs-1.5.x-x.x.x.tar.gz
cd pywcs-1.5.x-x.x.x
sudo python setup.py install

or using easy_install:

easy_install pywcs-1.5.x-x.x.x.tar.gz

Montage (optional)

Currently, one of the features in APLpy (re-projecting a FITS file to point north) requires Montage to be installed. Montage is a set of tools developed at the Infrared Processing and Analysis Center (IPAC) to re-project and mosaic FITS files. If you do wish to use the north argument when initializing a FITSFigure instance, you will need to install Montage. Installation instructions are available on the Montage website.

APLpy

If you have easy_install, you can install APLpy by simply typing

easy_install aplpy

Otherwise, you can install APLpy by downloading the latest available tar file from here and using the standard installation method:

tar xvzf APLpy-0.9.x.tar.gz
cd APLpy-0.9.x
sudo python setup.py install

Updating APLpy

If you have easy_install, you can update APLpy to the latest version by simply typing

easy_install -U aplpy

Alternatively, simply follow the instructions given for installation to install the latest tar file manually.

If you have any questions or comments contact us here