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.setrestfrequency - Function Up: coordsys - Tool Previous: coordsys.setreferencepixel - Function


coordsys.setreferencevalue - Function



Package general
Module images
Tool coordsys


Set the reference value


Synopsis
setreferencevalue(value, type)


Arguments

value in Reference value
    Allowed: Vector of doubles, vector of quantities, quantity of vector of doubles, vector of string, record
type in Which coordinate type ?
    Allowed: String from "direction", "stokes", "spectral", "linear", "tabular" or unset
    Default: All


Returns
T or fail



Description

Each axis associated with the Coordinate System has a reference value, reference pixel and an increment (per pixel). These are used in the mapping from pixel to world coordinate.

This function (short-hand name srv) allows you to set a new reference value. You should not do this on "stokes" axes unless you are an adept or a big risk taker.

You may supply the reference value in all of the formats described in the formatting discussion.

You can recover the current reference value with function referencevalue.

Note that the value argument should be one of the specified possibilitioes. Especially a measure will be accepted, but will have a null effect, due to the interpretation as a generic record.



Example
- cs := coordsys(direction=T, spectral=T)
- rv := cs.referencevalue(format='q')
- rv
[__*0=[value=0, unit='], __*1=[value=0, unit='], __*2=[value=1.415e+09, unit=Hz]] 
-
- rv2 := rv[3];
- rv2.value := 2.0e9;
- cs.setreferencevalue(type='spec', value=rv2)
- cs.referencevalue(format='n')
[0 0 2e+09]
To set a new direction reference value, the easiest way, given a direction measure dr would be:
- cs.setreferencevalue(type='direction', value=dm.getvalue(dr))

In the example we first recover the reference value as a vector of quantities. We then select out the value for the spectral coordinate, change it, and set it back in the Coordinate System. We then recover the reference value again, but this time just as a vector of doubles. In the case of the dircetion, we set the value from a known direction measure.



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