[AstroPy] API question: Instantiating of time/coord and similar

Tim Jenness tim.jenness at gmail.com
Wed May 2 23:58:04 EDT 2012


On Wed, May 2, 2012 at 8:18 PM, James Turner <jturner at gemini.edu> wrote:
>> Of course, that still requires a sensible API... so I think we want to
>> focus on a user-friendly API that is properly documented first (that's
>
> Yes, I think that is important (in addition to an API that's flexible
> enough for application developers).
>
>> One further note: astropy.coords cannot require external libraries
>> other than numpy (at least not for primary functionality). One of the
>> key design components of the astropy core is that this is so - that
>> has been discussed at length, and widely agreed on, given all the
>> distribution challenges involved.  But affiliated packages are free to
>> have whatever dependencies they want.
>
> So that's a key point but I think it still leaves the GPL issue
> to address... You mention that there are many libraries, but I suspect
> (without reviewing them all) that most (perhaps all) of the others

For example a modified wcslib is included in AST but the wcslib
functionality is only a minor part of the coordinate handling.

> don't contain certain AST functionality that I consider quite
> fundamental for the type of thing I want to do and would really like
> to see tightly integrated in the Python infrastructure I use. If I sit

That's important because there is a risk you end up with a lowest
common denominator API. You want an API that will stretch the
affiliates.

One part of AST worthy of study is its approach to plotting. It may
seem unrelated to world coordinates but the plotting infrastructure of
AST is very powerful. It supports a plugin system so you can provide
the code that knows how to draw lines and arcs and text but AST
handles where to put the lines and the text (essentially you tell AST
the bounds of your plot and map it to your coordinates in your
frameset). David Berry wrote a matplotlib backend and has demos of it
working

 http://dsberry.github.com/starlink/node5.html

> down, study AST and implement a Python version of the algorithm, I
> will probably still be bound by the GPL (unless I'm only looking at
> the manual and not the code), so am I right in thinking you wouldn't
> accept that code?
>

No-one has ever asked us about AST's license. It was a triumph to
allow it to be shipped with GPL when it first came out (and that was
mainly driven by Mark Calabretta's wcslib being GPL). We can
definitely try to work out how to get it changed to a looser license
(the main issue being to find out which person you have to talk to and
whether they even care) but I assume wcslib would have to change with
it.

-- 
Tim Jenness



More information about the AstroPy mailing list