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

Tim Jenness tim.jenness at gmail.com
Wed May 2 17:59:19 EDT 2012


On Wed, May 2, 2012 at 2:35 PM, Perry Greenfield <perry at stsci.edu> wrote:
>
> On May 2, 2012, at 5:17 PM, Tim Jenness wrote:
>
>> On Wed, May 2, 2012 at 2:04 PM, Perry Greenfield <perry at stsci.edu> wrote:
>>>
>>>
>>> On May 2, 2012, at 4:42 PM, Tim Jenness wrote:
>>>
>>>> On Wed, May 2, 2012 at 1:03 PM, Perry Greenfield <perry at stsci.edu>

>>
>> AST goes a step further and adds the ability to connect these frames
>> together using mappings. A simple mapping would be from a pixel grid
>> to a sky coordinate but you can stack mappings and frames together so,
>> for example, a pointing correction can be inserted as a ShiftMap
>> between the two frames as an additional mapping. You can then stack
>> additional frames and mappings together for as much complexity as you
>> want. There are many frames and mappings available by default.
>>
> Sure. But what keeps you from associating frames with specific coordinate
> values? In that case, the object that holds both knows how to convert the
> values to another frame.
>

Well, the specific coordinate value is distinct from the frame
definition and from the mappings. The AST approach is to create a
FrameSet object which encapsulates the frames and the associated
mappings and then you would supply a coordinate (or multiple
coordinates) to a conversion method and it would return the translated
coordinates.

You could have a higher level object that held the specific input
coordinate and the frameset but you'd ordinarily want to reuse that
frameset for more than one location.

-- 
Tim Jenness



More information about the AstroPy mailing list