[AstroPy] API question: Instantiating of time/coord and similar
tim.jenness at gmail.com
Thu May 3 17:17:43 EDT 2012
On Thu, May 3, 2012 at 11:53 AM, Wolfgang Kerzendorf
<wkerzendorf at gmail.com> wrote:
> But AST doesn't handle unit conversion (e.g. from Kelvin to eV) which are
> also coordinate transformations, because it has a different focus (namely
> astronomical images and now spectra). For now, we have made the
> distinctions: time, celestial coordinates, SI units, world coordinate
> systems for array based data.
> That doesn't mean, we don't want them working together: you give a world
> coordinates system a pixel coordinate, it gives back a celestial coordinate
> (with units degrees) which I then can easily convert to galactic
> coordinates. For example
> mycoord = myimage.wcs.pix2world(200,300)
> mycoord.units is in degrees
What happens if you have a 2d image with 3d coordinates (for example
an IFU)? Does mycoord know that it has 3 coordinates and only two of
them are relating to the sky wcs?
Can mycoord be converted back to a pixel position or is the mapping
back to image completely lost?
> mytime = time.from_jd(245423423423)
> mytime.to_utc -> will give back a datetime object
> mycoord = coord.from_equatorial(200, 20)
> mycoord.units (is degrees).
> mycoord.to_galactic -> gives back a tuple with galactic coordinates in
can mycoord convert to AZEL? (ie does it retain the observer location
and the epoch).
Joint Astronomy Centre
More information about the AstroPy