[AstroPy] astropy docs: importing standards

Erik Bray embray at stsci.edu
Tue Jun 19 18:23:18 EDT 2012

On 06/19/2012 01:57 PM, Joe Harrington wrote:
> I propose that we skip the arduous debates
> those communities went through and just adopt their solution by defining
> some importation standards:
> import astropy as ap
> import astropy.io as api

^--- Please not this.  The fact that this abbreviates to "api" is very 
confusing, considering that "API" already has a specific meaning.  I 
think many people would be confused by this.

> There are other abbreviations we could use, including:
> import astropy.io.fits as pf
> or
> import astropy.io.fits as pyfits

One standard we discussed for astropy is this:

 >>> from astropy.io import fits
 >>> fits.open(...)

Likewise for wcs one would use:

 >>> from astropy import wcs

Unfortunately not all of the documentation has been updated to follow 
that convention consistently.  I meant to do as much for the 
astropy.io.fits docs, but dropped the ball on that--something to do for 
the next release.

In any case, I agree there should be some conventions for this and they 
should be documented and endorsed.


Erik B.

More information about the AstroPy mailing list