[SciPy-User] Co-ordinating Python astronomy libraries?
Sat Jul 3 18:14:01 CDT 2010
Dear AstroPy list and James,
Thanks for your efforts to do this coordination - clearly there's
quite a bit out there doing similar work.
For the last couple years I (and a few others) have been working on
Astropysics (http://packages.python.org/Astropysics/ and source code
at https://launchpad.net/astropysics). This initially spun out of my
personal need for some of the utilities these other projects discussed
(e.g. IDL astron-like functions), but I've been turning it in a
slightly different direction. Astropysics now is being written as a
more "pythonic" way of doing the same tasks instead of starting from
cloning IDL procedural techniques. I'm trying to leverage all the
existing tools that have been written in python for other domains
(e.g. Enthought Traits to easily make good GUIs, sphinx to make useful
documentation, distribute to make packaging easier). Further, where
useful, I use object-oriented techniques instead of the procedural
approach people familiar with IDL and IRAF are used to. The idea is
to start doing things on "Spectrum" and "CCDImage" objects instead of
passing arrays into functions and so on, and each astronomer can then
sub-class these classes to do whatever they want. The aim here is to
eliminate the tendancy for people to take public codes and change them
internally, leading to some very painful efforts in disentangling
So far, Astropysics includes the following modules:
* constants – physical constants and cosmological calculations
* coords – coordinate classes and coordinate conversions
* models – model and data-fitting classes and tools
* objcat – flexible, dynamically updated object catalog
* ccd – image processing tools
* spec – spectrum and SED classes and tools
* phot – photometry/flux measurement classes and tools
* obstools – miscellaneous tools for observation
* io – data input/output classes and tools
* plotting – astronomy-oriented matplotlib and mayavi plotting tools
* pipeline – classes for data reduction and analysis pipelines
* utils – utility classes and functions
And these GUI tools, which require Enthought Traits (and Enthought
chaco for plots in the GUI):
* Spylot – Spectrum Plotter
* Fitgui – Interactive Curve Fitting
* Spectarget – MOS Targeting
I'm making a concerted effort to document everything in a consistent
manner using sphinx (http://sphinx.pocoo.org) - the resulting
documents (http://packages.python.org/Astropysics/) end up being much
I also try to bind in python wrappers around external tools like
sextractor, Mike Blanton's kcorrect, MOS mask design tools, and
galfit (planned) ... this happens mostly as I need them for my own
science. But this cuts down on the time re-implementing standard
programs that aren't necessarily worth re-working.
There are two main things left before I consider it "releasable" in
terms of the baseline functionality: First, it needs WCS support to be
integrated in the coords framework, and second, the objcat package
should have a web server module that lets you show/edit the catalog
over the internet instead of within python. Another major goal I'd
like to do when I or someone else gets a chance is something like ATV
(http://www.physics.uci.edu/~barth/atv/) utilizing the same TraitsGUI
framework that the other gui tools are written in.
I hope this explains the direction I have in mind for astropysics. As
far as I can tell, I have a slightly different philosophy - I'm trying
to set up something of a framework of my design, rather than a
function library. This is why I have not been working on adding it to
astropy, because astropy seems much more like the traditional
library... That and I'm not a fan of the Trac project management
system. At any rate, I think there's definitely room for all in the
community. And if anyone likes what they see, feel free to drop me a
line if you want to contribute.
Center For Cosmology
University of California, Irvine
On Wed, Jun 30, 2010 at 2:48 PM, James Turner <firstname.lastname@example.org> 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
> SciPy-User mailing list
More information about the SciPy-User