[AstroPy] Co-ordinating Python astronomy libraries?
Wed Jun 30 18:37:15 CDT 2010
Dear James and AstroPy -
Thanks for your note, and prompting!
My collegues and I have been writing data analysis related tools
for a some time now. We are all astronomers, and in addition to general
analysis tools we have a growing library of astro utilities. I'd to
make others aware of these, both because they may be useful and because
more eyes will find more bugs. We would also welcome collaborators.
So far we have hosted our own site because the tools are often so
general rather than astronomy specific, but if there is interest
we could migrate or mirror some of these to the astrolib svn archive.
As the tools mature we have been putting them at this google sites
Example astronomy codes currently are WCS utilities (wcsutil),
cosmology calculations (cosmology), coordinate transformations (coords),
and heirarchical triangular mesh sky search tools (htm).
Of more general interest may be the numpy_util, stat, random, ostools,
io, and integrate sub-packages. In addition to new things, there are a
lot of routines derived from IDL, the Goddard IDL astronomy libraries
and the SDSSIDL and IDLUTILS packages. In particular, the structure
routines in those IDL packages have correspondence to recarray
routines in our packages.
For those writing C/C++ extensions, the include/NumpyVector.h template
class designed to simplify working with 1-d numpy arrays. There is
also a NumpyVoidVector for arrays whose type is determined at runtime.
The recfile package is incorporated into esutil
(http://code.google.com/p/recfile/) and is used for efficient io of rec
files (recfile and sfile sub-packages).
I would say that a primary focus of the Astro tools is on using
numerical python arrays, especially recarrays. For example, the
coordinate transformation and WCS codes take arrays and return arrays.
l,b = coords.eq2gal(ra,dec)
ra,dec = wcs.image2sky(x,y)
where everything here can be an array.
This is opposed to the other libraries out that work with coordinates as
objects. There are clearly tradeoffs; we generally read data from FITS
tables or databases as numerical python arrays and so it is more natural
to work with data that way. I would say this is complimentary to the
In addition to above sub-packages, a few more are very close to
* pgnumpy: a numerical python interface to postgres
* numpydb:a numerical python interface to berkeley db.
* columns: A simple, efficient column-oriented, pythonic database
with indexing provided by numpydb.
* sdsspy: Tools for working with SDSS data.
* mangle: tools for working with mangle masks.
I hope people find these useful,
Erin Scott Sheldon
Brookhaven National Laboratory
on behalf of Brian Gerke and Amy Kimball
On Wed, Jun 30, 2010 at 5:48 PM, James Turner <email@example.com> wrote:
> Dear Python users in astronomy,
> At SciPy 2009, I arranged an astronomy BoF where we discussed the
> fact that there are now a number of astronomy libraries for Python
> floating around and maybe it would be good to collect more code into
> a single place. People seemed receptive to this idea and weren't sure
> why it hasn't already happened, given that there has been an Astrolib
> page at SciPy for some years now, with an associated SVN repository:
> After the meeting last August, I was supposed to contact the mailing
> list and some library authors I had talked to previously, to discuss
> this further. My apologies for taking 10 months to do that! I did
> draft an email the day after the BoF, but then we ran into a hurdle
> with setting up new committers to the AstroLib repository (which has
> taken a lot longer than expected to resolve), so it seemed a bad
> time to suggest that new people start using it.
> To discuss these issues further, we'd like to encourage everyone to
> sign up for the AstroPy mailing list if you are not already on it.
> The traffic is just a few messages per month.
> We (the 2009 BoF group) would also like to hear on the list about
> why people have decided to host their own astronomy library (eg. not
> being aware of the one at SciPy). Are you interested in contributing
> to Astrolib? Do you have any other comments or concerns about
> co-ordinating tools? Our motivation is to make libraries easy to
> find and install, allow sharing code easily, help rationalize
> available functionality and fill in what's missing. A standard
> astronomy library with a single set of documentation should be more
> coherent and easier to maintain. The idea is not to limit authors'
> flexibility of take ownership of their code -- the sub-packages
> can still be maintained by different people.
> If you're at SciPy this week, Perry Greenfield and I would be happy
> to talk to you. If you would like to add your existing library to
> Astrolib, please contact Perry Greenfield or Mark Sienkiewicz at
> STScI for access (contact details at http://scipy.org/AstroLib).
> Note that the repository is being moved to a new server this week,
> after which the URLs will be updated at scipy.org.
> James Turner (Gemini).
> Bcc: various library authors
> AstroPy mailing list
More information about the AstroPy