[QUANTITY] Data Model for Quantity v0.5
Brian Thomas
brian.thomas at gsfc.nasa.gov
Tue May 11 11:21:10 PDT 2004
On Tuesday 11 May 2004 01:54 pm, David Berry wrote:
> Brian,
>
> > > How can I get the necessary Mapping without the
> > > getCurrentCoordsQuantity() method?
> >
> > From the locator you are using, e.g.
> >
> > Quanity axisFrame = loc.getCurrentCoordsQuantity();
>
> So how would you modify the code example I gave, which was:
>
> public void GridPlotter( StandardQuantity stdQ ){
> Mapping map = stdQ.getCurrentCoordsQuantity().getMapping();
>
> <then proceed to use the Mapping to transform arbitrary positions
> backwards and forwards between pixel coords and current WCS coords>
>
> }
Make the "getMapping()" method require an AxisFrame as an input. e.g.
Mapping map = stdQ.getMapping(frameIWantToUse);
We can also have the empty accessor call ("getMapping()") which returns
the default/first mapping if you like.
=b.t.
>
> David
>
>
>
>
>
> ----------------------------------------------------------------------
> Dr David S. Berry (dsb at ast.man.ac.uk)
>
> STARLINK project | Centre for Astrophysics
> (http://www.starlink.ac.uk/) | University of Central Lancashire
> Rutherford Appleton Laboratory | PRESTON
> DIDCOT | United Kingdom
> United Kingdom | PR1 2HE
> OX11 0QX Tel. 01772 893733
> 01257 273192
--
* Dr. Brian Thomas
* Dept of Astronomy/University of Maryland-College Park
* Code 630.1/Goddard Space Flight Center-NASA
* fax: (301) 286-1775
* phone: (301) 286-6128 [GSFC]
(301) 405-2312 [UMD]
More information about the dm
mailing list