Introduction

This section contains an overview of PyAST and its relationship to AST. It does not give details of the AST library itself.

What is PyAST?

PyAST is a collection of modules that allows the facilities of the Starlink AST library to be used within Python (version 2.7 or later) scripts.

What is AST?

The AST library provides a comprehensive range of facilities for attaching world coordinate systems to astronomical data, for retrieving and interpreting that information and for generating graphical output based on it. AST is written in ANSI C but has wrappers for various other languages, including Fortran, Java, Perl, and now Python.

About this document:

This document does not provide a full description of the facilities of AST, or of the AST wrapper functions provided by PyAST. For general information about how to use AST, or the specifics of individual functions and their parameters, the main AST documentation describing the native C interface should be consulted.

Requirements:

PyAST requires Python version 2.7 or later to be installed, and requires the numpy package.It has no other dependencies (a copy of the AST library itself is bundled with PyAST). However, PyAST includes extra optional facilities that assume the presence of other python libraries:

Obtaining and installing PyAST:

The current version of PyAST can be downloaded from PyPI. To build it, unpack the tar file and then do:

% python setup.py install

To test it, do:

% python starlink/ast/test/test.py

Using PyAST:

First import the PyAST module (starlink.Ast). For instance:

>>> import starlink.Ast as Ast

The following is a list of general points about how to use PyAST (until more appropriate examples are produced, the PyAST test script - starlink/ast/test/test.py - can be consulted for examples of how to use the functions provided by PyAST):

PyAST Licensing:

PyAST is distributed under the GNU Lesser General Public Licence.