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

Eric Emsellem emsellem at obs.univ-lyon1.fr
Fri May 5 03:20:36 EDT 2006


Hi,

just to make things clear there (trying at least), I don't want to get 
tied to Iraf or Midas here although these are very nice tools indeed. 
Iraf is full of very useful and complex routines but is not (I think) , 
easy to use even in a python environment. The fact that pyraf exists is 
great, but to me it is not achieving what it should I think, partly just 
because it was not meant as a python module originally. And the 
graphics/display are not convincing (although again, things like ds9 are 
powerful and are very useful tools). As for Midas, it has the advantage 
to be much simpler (and also powerful) but clearly lacks the speed, is 
kind of clumsy in terms of data addressing and lack a good 
display/graphics environment.

> PyFITS already does a good job of handling FITS files, but it is very
> generic and tied to the FITS structure. I would like to work with data
> objects that 'know more' about their own properties and contain methods
> for doing WCS transformations etc. 

This is exactly what I am talking about; I would like to use the power 
of python + numpy + .. to design a direct and easy way to address e.g. 
Fits files, work with the data (with all the power of python), be able 
to display/plot things then, and be able to (easily) write back the 
result. This means indeed to create new classes which would provide 
direct access to methods, ufuncs, but also embedded structures and info. 
One example is to be able to open a Euro3D cube, plot a slice, perform 
some operation on part of the cube, or merge it with another cube (the 
function being then able to check the consistent nature of the cubes) 
taking into account e.g. flagged pixels and variance, and maybe write 
back the result on disk either as another Euro3D cube, or some other 
formatted file on disK.

The classes I am developing so far are indeed another layer on top of 
pyfits (in fact it inherits from HDUlist), which is very probably the 
best thing available for dealing with fits files. The fact that I am for 
the moment tied to fits files is just that this format is widely used in 
astronomy. We may switch to something else at some point, but we will 
always have to address binary data, associated flags, associate 
coordinates, variance, etc. (whatever you can think of which is useful 
to understand your data).

I agree with you Peter that things can be worked out by just using 
pyfits/pyraf/matplotlib+.... These are fantastic assets! But even using 
these things everyday I am still everytime looking at some simple 
example of how to deal with the data before being able to write a new 
script or module. And I find the everyday use not efficient enough.
So I may consider spending time to develop something which will help me 
to be more efficient later on (not sure about the total gain there, but 
at least I would have learn a little more of python hopefully!)

Eric

-- 
====================================================================
Eric Emsellem                             emsellem at obs.univ-lyon1.fr
                            Centre de Recherche Astrophysique de Lyon
9 av. Charles-Andre                        tel: +33 (0)4 78 86 83 84
69561 Saint-Genis Laval Cedex              fax: +33 (0)4 78 86 83 86
France                    http://www-obs.univ-lyon1.fr/eric.emsellem
====================================================================



More information about the AstroPy mailing list