astropy/astropy — pull request #47 by iguananaut (2011-11-03 20:56:25+00:00)
Title: Add PyFITS as astropy.io.fits

This branch isn't quite ready for merging, for a number of reasons. But since it will happen eventually I figured I would open the pull request. Now is a good time to do so since this branch has astropy.io.fits fully functioning, at least in that all the tests run/pass.

To give some background on this pull request, this branch is based off of a different branch (https://github.com/iguananaut/astropy/tree/fits) which contains the entire history from PyFITS's SVN repository. However, for inclusion into Astropy all the previous SVN history (up to the last revision merged into Astropy from PyFITS which was r1202) was squashed into a single commit, and rebased on top of Astropy's master. I then applied my additional changes from the fits that get astropy.io.fits fully functioning on top of that. Sorry if that makes no sense--if anyone's really interested I can try drawing a graph of what happened.

Some things I need to do before this is merged:

* Bring up to date with the latest changes from PyFITS's trunk. There are also some changes in development branches that are coming down the line pretty soon and I would like to get those merged in too as some of them are fairly important.

* The documentation still needs work--I've yet to clean up most of it.

And some other open questions that need discussing:

* PyFITS includes a module called py3kcompat (now at astropy.io.fits.py3kcompat) containing various hacks to support Python 2/3 cross-compatibility. A lot of these hacks may or may not be desirable to have in Astropy at all. Others, I think would be useful. Most of the hacks are actually monkey-patches to Numpy that fix a few bugs it has in Python 3. At any rate I'd appreciate if this module were looked at and discussed.

* Likewise, the pyfits.util/astropy.io.fits.util module contains a number of generally useful utility functions and classes. Some of them are FITS-specific, but most, I believe, are not. It might be worth moving a lot of it into someplace under astropy.utils, but the details are up in the air. I also need to see if there are any redundancies between pyfits and pywcs where utility functions/python 3 hacks are concerned.