[AstroPy] Draft specification for PyFITS functional interface

Paul Barrett barrett at stsci.edu
Wed Mar 30 14:05:38 CST 2005


Peter Erwin wrote:
> At 2:42 PM -0500 3/30/05, Paul Barrett wrote:
> 
>> 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.
> 
> 
> Wouldn't that make things more confusing for users, with two modules to 
> worry
> about instead of one?  I like the idea that if I want to do things with 
> FITS files,
> all I need to do is import pyfits; then I can worry about whether I want 
> to use
> a simple functional approach, or something object-oriented, as the need
> arises.

Yes, if you consider them as separate distinct modules.  However, maybe 
we should consider creating a pyfits package which contains the basic OO 
interface as it now stands and adds a procedural interface module and a 
set of command-line programs for convenience.  This approach is similar 
to that used by matplotlib, which I think works well.

  -- 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