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

Perry Greenfield perry at stsci.edu
Thu May 3 14:19:19 EDT 2012

I didn't mean to say that it should be mostly or entirely different. I  
would like to see  a great deal of commonality actually (preferably  
sharing the same base class for coordinate transformations for example).

I'd like to expand on what I would like to see, but I'm not sure I  
will have time today. Perhaps tomorrow.


On May 3, 2012, at 1:39 PM, David Berry wrote:

> 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
> >
> >

More information about the AstroPy mailing list