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.coordinatetype - Function Up: coordsys - Tool Previous: coordsys.convert - Function


coordsys.convertmany - Function



Package general
Module images
Tool coordsys


Convert many numeric mixed coordinates


Synopsis
convertmany(coordin, absin, dopplerin, unitsin, absout, dopplerout, unitsout, shape)


Arguments

coordin in Input coordinate
    Allowed: Numeric matrix
absin in Are input coordinate elements absolute ?
    Allowed: Boolean vector
    Default: All T
dopplerin in Input doppler type for velocities
    Allowed: String
    Default: 'radio'
unitsin in Input units
    Allowed: String vector
    Default: Native
absout in Are output coordinate elements absolute ?
    Allowed: Boolean vector
    Default: All T
dopplerout in Output doppler type for velocities
    Allowed: String
    Default: 'radio'
unitsout in Output units
    Allowed: String vector
    Default: Native
shape in Image shape
    Allowed: Integer vector
    Default: Unused


Returns
Numeric matrix or fail



Description

This function converts between many mixed pixel/world/abs/rel numeric coordinates. See function convert for more information.

The only diffference with that function is that you provide a matrix holding many coordinates to convert and a matrix of many converted coordinates is returned.



Example
- cs := coordsys(direction=T, spectral=T)    # 3 axes
-
- p := [15,20,30];                           # absolute pixel coordinate
- cin := array (p, 3, 10);                   # 10 conversions each of length 3
- cin[3,] := 1:10;                           # spectral pixel runs from 1 to 10
- cin
[[1:3,]
    15 15 15 15 15 15 15 15 15 15
    20 20 20 20 20 20 20 20 20 20
    1  2  3  4  5  6  7  8  9  10] 
-
- cout := cs.convertmany (coordin=cin,     
                          absin=[T,T,T],
                          unitsin="pix pix pix",
                          absout=[T,F,T],
                          dopplerout='optical',
                          unitsout="pix deg km/s");
-
- cout
[[1:3,]
    15          15          15          15          15          15          15          15          15          15
    0.316668279 0.316668279 0.316668279 0.316668279 0.316668279 0.316668279 0.316668279 0.316668279 0.316668279 0.316668279
    1145.30291  1145.09023  1144.87756  1144.66488  1144.4522   1144.23953  1144.02685  1143.81418  1143.6015   1143.38883] 
-
- cout[,1]                                     # First coordinate
[15 0.316668279 1145.30291] 
-
- cout[,10]                                    # 10th coordinate
[15 0.316668279 1143.38883]





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