[AstroPy] Re: functional interface for PyFITS?

Perry Greenfield perry at stsci.edu
Tue Mar 22 19:38:13 CST 2005


First, I'm heartened to see all the discussion this
question engendered.

1) It's very clear that a functional interface is very
much desired and needed.

So we will go ahead and implement a initial version of
something close to what was proposed quickly. Yes, we'll 
add a getheadervalue function as well, and try the approach
of using a keyword flag to add a header return object to
the getdata function (while keeping the getheader function
as well). We welcome any further suggestions about what
would be useful functions.

2) There is some disagreement about whether to support
appending extension numbers to the filename string.

I'm inclined to be skeptical for the importance of supporting
this. After all, is:

getdata("file.fits",3)

really much more to type than

getdata("file.fits[3]")?

(ahem)
 
Besides, the former lends itself far more easily to iteration
(inefficient as it may be to repeatedly open and close the file,
but that's beside the issue) with variables. I'm inclined to
put this feature off until I see a more convincing use case
than familiarity with IRAF or CFITSIO usage). I suppose it 
may argue for providing a convenience function to parse such
strings to pull out the useful elements to be used with PyFITS
but I don't think we need to make this a built in behavior
of these pyfits functions--yet anyway.

Perry




More information about the AstroPy mailing list