Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: coordsys.toabsmany - Function Up: coordsys - Tool Previous: coordsys.telescope - Function


coordsys.toabs - Function



Package general
Module images
Tool coordsys


Convert relative coordinate to absolute


Synopsis
toabs(value, isworld)


Arguments

value in Relative coordinate
    Allowed: Numeric vector, vector string, vector quantum, record
isworld in Is coordinate world or pixel ?
    Allowed: T, F, unset
    Default: unset


Returns
Same as input or fail



Description

This function converts a relative coordinate to an absolute coordinate. The coordinate may be a pixel coordinate or a world coordinate.

If the coordinate is a pixel coordinate, it is supplied as a numeric vector. If the coordinate is a world coordinate, you may give it in all of the formats described in the formatting discussion.

If the coordinate value is supplied by a Coordsys tool function (e.g. toworld) then the coordinate 'knows' whether it is world or pixel (and absolute or relative). However, you might supply the value from some other source as a numeric vector (which could be world or pixel) in which case you must specify whether it is a world or pixel coordinate via the isworld argument.



Example
- cs := coordsys(direction=T, spectral=T)
-
- aw := cs.toworld([100,100,24], 's')
- rw := cs.torel(aw)
- aw2 := cs.toabs(rw)
-
- aw
23:53:23.781 +01.39.00.821 1.415023e+09 Hz 
- rw
5.943285e+03 arcsec 5.940821e+03 arcsec 2.300000e+04 Hz 
- aw2
23:53:23.781 +01.39.00.821 1.415023e+09 Hz

This example uses world coordinates.



Example
- cs := coordsys(direction=T, spectral=T)
-
- ap := cs.topixel()           # Reference value
- rp := cs.torel(ap)
- ap2 := cs.toabs(rp)
-
- ap
[1 1 1] 
- rp
[0 0 0]
- ap2
[1 1 1]
This example uses pixel coordinates.





next up previous contents index
Next: coordsys.toabsmany - Function Up: coordsys - Tool Previous: coordsys.telescope - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01