1.1.3 Convert a numeric mixed coordinate
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 is 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 clarifies the use of this function.
Arguments
| Inputs |
| ||
| coordin |
| Input coordinate, as a numeric vector
| |
| allowed: | doubleArray |
|
| Default: |
|
|
| absin |
| Are input coordinate elements absolute ?
| |
| allowed: | boolArray |
|
| Default: | true |
|
| dopplerin |
| Input doppler type for velocities
| |
| allowed: | string |
|
| Default: | radio |
|
| unitsin |
| Input units, string vector
| |
| allowed: | stringArray |
|
| Default: | Native |
|
| absout |
| Are output coordinate elements absolute ?
| |
| allowed: | boolArray |
|
| Default: | true |
|
| dopplerout |
| Output doppler type for velocities
| |
| allowed: | string |
|
| Default: | radio |
|
| unitsout |
| Output units
| |
| allowed: | stringArray |
|
| Default: | Native |
|
| shape |
| Image shape, integer vector
| |
| allowed: | intArray |
|
| Default: | -1 |
|
Example
In this example we convert from a vector of absolute pixels to a mixture of
pixel/world and abs/rel.
"""
# print "\t----\t convert Ex 1 \t----" csys=cs.newcoordsys(direction=T, spectral=T) # 3 axes cout=csys.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 #[10.0, 1140.0058038878046, 1139.1354056919731] # """ |
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2008 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Updated daily during alpha development.