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.setlineartransform - Function Up: coordsys - Tool Previous: coordsys.setepoch - Function


coordsys.setincrement - Function



Package general
Module images
Tool coordsys


Set the increment


Synopsis
setincrement(value, type)


Arguments

value in Increments
    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 si) allows you to set a new increment. You should not do this on "stokes" axes unless you are an adept or a big risk taker.

You can set the increments either for all axes (type=unset) or for just the axes associated with a particular coordinate type.

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

In addition, you can also supply the increments as a quantity of vector of doubles. For example dq.quantity([-1,2],'arcsec').

You can recover the current increments with function increment.



Example
- cs := coordsys(direction=T, spectral=T)
- rv := cs.increment(format='q')
- rv
[__*0=[value=-1, unit='], __*1=[value=1, unit='], __*2=[value=1000, unit=Hz]] 
-
- rv2 := dq.quantity('4kHz');
- cs.setincrement(value=rv2, type='spec')
- cs.increment(type='spec', format='q')
[value=4000, unit=Hz] 
-
- cs.increment(format='q')
[__*0=[value=-1, unit='], __*1=[value=1, unit='], __*2=[value=4000, unit=Hz]] 
-
- cs.setincrement (value="-2' 2' 2e4Hz")
- cs.increment(format='q')
[__*0=[value=-2, unit='], __*1=[value=2, unit='], __*2=[value=20000, unit=Hz]]

In the example we first recover the increments as a vector of quantities. We then create a quantity for a new value for the spectral coordinate increment. Note we use units of kHz whereas the spectral coordinate is currently expressed in units of Hz. We then set the increment for the spectral coordinate. We then recover the increment again; you can see 4kHz has been converted to 4000Hz. We also show how to set the increment using a string interface.





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