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.time - Function Up: quanta - Tool Previous: quanta.fits - Function


quanta.angle - Function



Package general
Module quanta
Tool quanta


show an angle as a formatted string


Synopsis
angle(v, prec, form, showform)


Arguments

v in value to output
    Allowed: angle quantity or string
prec in number of digits shown
    Allowed: numeric
    Default: 0
form in formatting information
    Allowed: coded string array
    Default: ''
showform in show square brackets and separating ,
    Allowed: bool
    Default: F


Returns
string


Description
angle converts an angle quantity to a formatted string. The formatting information is a precision (0 is default, 6 includes +-ddd.mm.ss) and a string array of codes (no-case, minimax match): Codes include:
clean
delete leading/trailing superfluous separators
no_d
do not show degrees part
no_dm
do not show degrees and minutes part
dig2
show only 2 digits of degrees in angle format
time
show as time (hh:mm:ss.ttt) rather than as angle
If a multi-dimensional value is given for the value v, the returned value is a string vector of a length equal to last dimension. Each string has a number of fields equal to the number of elements in all earlier dimensions. If the showform is T, each vector element is surrounded by a pair of square brackets if there is more than one entry, and fields are separated by a ','.



Example
- tu := dq.quantity('5.7.12.345678')		# define an angle
- tu
[value=5.1201, unit=deg] 
- dq.angle(tu)    				# default output
+005.07.12 
- dq.angle(tu, prec=7)				# 7 digits
+005.07.12.3 
- dq.angle(tu, prec=4)				# 4 digits
+005.07. 
- dq.angle(tu, form="tim no_d")		# as time, no hours shown
:20:29





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