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.convertmany - Function Up: coordsys - Tool Previous: coordsys.conversiontype - Function


coordsys.convert - Function



Package general
Module images
Tool coordsys


Convert a numeric mixed coordinate


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


Arguments

coordin in Input coordinate
    Allowed: Numeric vector
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 vector or fail



Description

This function converts between mixed pixel/world/abs/rel numeric coordinates. The input and output coordinates are specified via a numeric vector giving coordinate values, a string vector giving units, a boolean vector specifying whether the coordinate is absolute or relative (to the reference pixel) and doppler strings specifying the doppler convention for velocities.

The units string may include pix for pixel coordinates and velocity units (i.e. any unit consistent with m/s).

The allowed doppler strings and definition are described in function summary.

The shape argument is optional. If your Coordinate System from an image, then assign the image shape to this argument. It is used only when making mixed (pixel/world) conversions for Direction Coordinates to resolve ambiguity.

The example will make the use of this function clear.



Example
- cs := coordsys(direction=T, spectral=T)    # 3 axes
-
- cout := cs.convert (coordin=[10,20,30],
                      absin=[T,T,T],
                      unitsin="pix pix pix",
                      absout=[T,F,T],
                      dopplerout='optical',
                      unitsout="pix arcsec km/s");
-
- print 'cout=', cout
[10 1140.0058 1134.82336]
In this example we convert from a vector of absolute pixels to a mixture of pixel/world and abs/rel.





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