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

David Berry d.berry at jach.hawaii.edu
Thu May 3 13:39:56 EDT 2012


What you say is reasonable, but I don't see that it follows that they need
to be handled differently. Considered as a class, coordinate systems have a
lot of common properties and methods no matter what they describe. Getting
a sufficiently generic base class allows you to extend the system easily.
That's why it was so easy to add support for spectral and time to AST. In
practice it all works out very smoothly.

David

On Thursday, 3 May 2012, Perry Greenfield <perry at stsci.edu> wrote:
>
> On May 3, 2012, at 11:45 AM, David Berry wrote:
>
>> On 3 May 2012 16:39, Wolfgang Kerzendorf <wkerzendorf at gmail.com> wrote:
>>>
>>> Hi all,
>>>
>>> This topic has expanded a lot;-)
>>>
>>> So adressing point 1: Yes, you're technically right. That both of these
things do coordinate transformations. But there are many coordinate
transformations in astronomy and in astropy we don't have a one-size
fits-all mentality about them (in my sense for good reason). For example,
switching between different units, doppler-shifting spectra , etc... all
are technically coordinate transformations, but we treat them differently
and not through one coordinate transformer.
>>
>> Is there a reason for that?
>
> I agree that they are both identical in some respects (and it is worth
considering a common api for at least a good part of both). To me the main
difference is that one is standards focused (dealing with well known
coordinate  systems and the transformations between them, whereas wcs is
dealing more with instrumental effects and transforming from that to world
coordinates (which may be one of the standard systems, but it may not). In
one most of the transforms are simple, as is the geometry. In the other
they can be quite complex. The former usually transforms few distinct
coordinates (yes, you can do big catalogs too), and the latter transforms
large numbers of pixel coordinates in many case.
>
> So I'm not surprised that people come from different directions when
approaching these two issues.
>
>
> Perr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20120503/00e409a4/attachment.html>


More information about the AstroPy mailing list