Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: quanta.define - Function Up: quanta - Tool Previous: quanta.canon - Function


quanta.convert - Function



Package general
Module quanta
Tool quanta


convert a quantity to another unit


Synopsis
convert(v, out)


Arguments

v in quantity to convert
    Allowed: quantity or string
    Default: '1'
out in unit to convert to
    Allowed: string or quantity
    Default: ''


Returns
quantity


Description
convert converts a quantity to another unit. If no output unit given, conversion is to canonical units



Example
- tu := dq.quantity('5Mm/s')		# specify a quantity
- tu
[value=5, unit=Mm/s] 
- dq.convert(tu, 'pc/a')		# convert it to parsec per year
[value=0.00511356, unit=pc/a] 
- dq.convert(tu)			# convert to canonical units
[value=5e+06, unit=m.s-1]





next up previous contents index
Next: quanta.define - Function Up: quanta - Tool Previous: quanta.canon - 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