[AstroPy] Draft specification for PyFITS functional interface

Paul Barrett barrett at stsci.edu
Wed Mar 30 13:42:00 CST 2005

laidler at stsci.edu wrote:
> After some iterations among the STScI group, here is a draft
> specification for these convenience functions. 
> Proposed specifications for functional user interface for PyFITS
> 29 March 05
> Functions to include:
> --------------------
> Reading: getdata, getheader, getval
>   getdata returns a numarray (image extension) or recarray(table
>   extension) object by default; if the keyword argument
> 'header' is
>   specified with a value other than None, it returns a
> (data,header)
>   tuple. .
>   getheader returns a PyFITS header object.
>   getval returns a variable of the correct type containing the
> data.
> Writing: writeto, update, append
>   Return nothing.
> Informational: info
>   Returns a (multiline) string.

I'm wondering if these convenience functions aren't better off in a 
separate python module that imports pyfits.  This approach would keep 
the pyfits interface simple and objected-oriented, and would signal that 
the procedural interface is being used.  Command line versions of these 
convenience functions could also exist, so that users could easily 
extract information from a FITS file.

  -- Paul

Paul Barrett, PhD      Space Telescope Science Institute
Phone: 410-338-4475    ESS/Science Software Branch
FAX:   410-338-4767    Baltimore, MD 21218

More information about the AstroPy mailing list