PFITS (A Python FITS iterface employing CFITSIO)
This package uses the CFITSIO library to interface to FITS files from Python. Particular attention has been paid to supporting ASCII and BINARY tables with fixed and variable-length entries. Data I/O is handled through numpy arrays.
For an overview of the latest changes to this package, see the CHANGELOG.
You are invited to edit this wiki (see EditingThisWiki).
Contents
Download
If you have setuptools and numpy is already installed, then with root permissions, you can just type:
easy_install pfits
Otherwise, you may download from http://pypi.python.org/pypi/pfits.
If you want the bleeding-edge source tree, or are interested in source development, you can checkout a copy from http://github.com/AaronParsons/pfits using GIT. See GitPfits for more information about using GIT.
Installation
Resolving Dependencies
PFITS requires Python >= 2.4 (and < 3.0 for now). You also need to have numpy >= 1.2 installed on your system.
Installing with Root Permission
If you used easy_install, and everything worked, then you're set. Otherwise, download the PFITS package, open it up, and then run (with root permission):
python setup.py install
Installing without Root Permission
Once dependencies have been solved, run the following command:
python setup.py install --install-lib "module_dir" --install-scripts "scripts_dir"
where "module_dir" and "scripts_dir" are 2 directories you define. "module_dir" will hold the python module for the package you install, and "scripts_dir" will hold any scripts associated with the package. If you take this second route, you should also run (for bash)
export PYTHONPATH="module_dir"
so that python can find the modules. You should also add "scripts_dir" to your path:
export PATH=$PATH:"scripts_dir"
To avoid having to type these lines every time you open a console, add them to your .bashrc file.
Documentation
There are several options for obtaining information about the usage of PFITS:
online code documentation generated automatically from docstrings in the source code
this wiki, which you are welcome to join and contribute to (see EditingThisWiki). Feel free to add and contribute to the list of topics below:
PfitsFaq - a place to post (and answer) questions
PfitsCookBook - a repository for example code snippets and explanations
- you may also send emails to aparsons at astron berkeley edu (with dots between astron, berkeley, and edu).
Contributing Code
PFITS is open-source software released under the GNU Public License. It may be freely used and modified. If you want to contribute to PFITS, you may:
Get a copy of the latest source code git (see GitPfits for instructions)
- Make your edits (writing unit tests for any new features), and then check that you haven't broken any other unit tests.
- Contact a primary developer (currently, Aaron Parsons: aparsons at astron berkeley edu) with an emailed patch. These patches, which may be produced automatically with git, will be merged into the primary source code branch.
