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.topixel - Function Up: coordsys - Tool Previous: coordsys.toabs - Function


coordsys.toabsmany - Function



Package general
Module images
Tool coordsys


Convert many numeric relative coordinates to absolute


Synopsis
toabsmany(value, isworld)


Arguments

value in Relative coordinates
    Allowed: Numeric matrix
isworld in Is coordinate world or pixel ?
    Allowed: T, F, unset
    Default: unset


Returns
Numeric matrix or fail



Description

This function converts many relative coordinates to absolute. It exists so you can efficiently make many conversions (which would be rather slow if you did them all with toabs). Because speed is the object, the interface is purely in terms of numeric matrices, rather than being able to accept strings and quanta etc. like toabs can.

When dealing with world coordinates, the units of the numeric values must be the native units, given by function units.



Example
- cs := coordsys(direction=T, spectral=T)    # 3 axes
-
- rv := cs.referencevalue();                 # reference value
- w := cs.torel(rv)                          # make relative
- inc := cs.increment();                     # increment
- idx := 1:100;
- off := inc[3] * idx;                       # offset for third axis
- wrel := array (w, 3, 100);                 # 100 conversions each of length 3
- wrel[3,] +:= off;                          # Make spectral axis values change
-
- wabs  := cs.toabsmany (rel, T)             # Convert
- wabs[,1]                                   # First absolute coordinate
[0 0 1.415001e+09]  
- wabs[,100]                                 # 100th absolute coordinate
[0 0 1.415002e+09]
This example uses world coordinates.


next up previous contents index
Next: coordsys.topixel - Function Up: coordsys - Tool Previous: coordsys.toabs - 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