Getting Started

What machines will python run on? We have run python various versions of linux and on Mac. It is compiled using mpicc, with an option to compile with gcc. It uses the Gnu Scientific Libraries (gsl)

Installation

Python and the various routines associated are set up in a self-contained directory structure. The basic directory structure and the data files that one needs to run Python need to be retrieved and compiled.

If you want to obtain a stable (!) release, go to the Releases page.

If you want to download the latest dev version, you can zip up the git repository by clicking on the zip icon to the right of the GitHub page. Alternatively, clone it directly as

$ git clone https://github.com/agnwinds/python.git

If you anticipate contributing to development we suggest Forking the repository and submitting pull requests with any proposed changes.

Once you have the files, you need to cd to the new directory and set your environment variables

$ export PYTHON = /path/to/python/
$ cd $PYTHON
$ ./configure
$ make install
$ make clean

One can run a more rigorous clean of GSL with make distclean, or remove the compiled GSL libraries altogether with make rm_lib.

note that export syntax is for bash- for csh use

$ setenv PYTHON /path/to/python/

Atomic data is stored in our data repository with it’s own releases page- one should unzip these files and place them in a $PYTHON/data folder.

A development user may want to work on atomic data as part of their work, and pull in changes as they are made, in which case we recommend cloning the data repository:

$ cd $PYTHON; git clone https://github.com/agnwinds/data data

Running python

To run python you need to add the following to your $PATH variable:

$PYTHON/bin

You can then setup your symbolic links by running

$ Setup_Py_Dir

and run the code by typing, e.g.

$ py root.pf

Directory structure

The python directory structure is fairly simple:

progs
Location of source code for various fully debugged version of the code (Note that the progs directory is created as part of the make process.)
bin
Location of executables
data
Location for all datafiles. Files that are mainly for reference should be gzipped to save space. Such files are not recreated in
bin
The location of the executables. (It is a good idea to put this directory in your path)
software
This directory contains libraries which are used in in python that must be recompiled when creating an installation on a new machine, primarily Bill Pence’s cfitsio package and the GNU scientific library gsl
Example
A directory with a few examples of python runs. (Note that the input files will have changed and so one may not be able to run these examples without some changes in the input files.)

Please help by reporting bugs in installation

This can be done by submitting a bug under the Issues page