[AstroPy] Representing astronomical (esp. IFU) datasets as Python objects

James Turner jturner at gemini.edu
Fri May 5 10:19:09 CDT 2006

Hi Eric,

OK - sorry - I wasn't sure that we were talking about exactly the same
thing. It sounds like you're ahead of me on a very similar path. I'd be
happy to send code if it is useful, although I haven't really done a lot
yet, just the bits needed for the script I was writing (mainly simple
WCS stuff). I still have to figure out how all the special methods etc.
work. Anyway, with input from a few people I think a project like this
could be very useful. Do you have other people involved at the moment?

I had avoided inheriting from HDUList, partly because it means having
to understand all the PyFITS internals (which I wasn't really ready for),
as well as keeping up with PyFITS maintenance - but it could make life
easier in some ways. Several times I found myself contorting to avoid
using the private attributes etc.

When I mentioned being 'tied to FITS', I wasn't suggesting using a
different file format - just noting that the way data extensions are
grouped in FITS files may not be exactly what the main program or user
wants to deal with. For example, you might want to open the first SCI
extension of several FITS files in a flat list, grouped with their VAR
& DQ, rather than manipulating whole FITS files (nested lists), each of
which corresponds to some subgroup of extensions. It seemed like the
way to deal with this was to keep an arbitrary list of objects that
each correspond to a SCI HDU, bundled together with its VAR, DQ, WCS
& maybe all the other header info. Those could then be kept either in
a normal list or a special kind of list that manages the mapping to
FITS files (I was wavering back and forth on this, but never did it).



James E.H. Turner
Gemini Observatory Southern Operations Centre,
Casilla 603,		Tel. (+56) 51 205609
La Serena, Chile.	Fax. (+56) 51 205650

More information about the AstroPy mailing list