1.4.1 show an angle as a formatted 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:
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 ’,’.
Arguments
| Inputs |
| ||
| v |
| angle quantity value to output
| |
| allowed: | variant |
|
| Default: |
|
|
| prec |
| number of digits shown
| |
| allowed: | int |
|
| Default: | 0 |
|
| form |
| formatting information in coded string array
| |
| allowed: | stringArray |
|
| Default: |
|
|
| showform |
| show square brackets and separating ,
| |
| allowed: | bool |
|
| Default: | false |
|
Example
"""
# print "\t----\t angle Ex 1 \t----" tu = qa.quantity(’5.7.12.345678’) # define an angle print tu #{’value’: 5.1200960216666669, ’unit’: ’deg’} print qa.angle(tu) # default output #+005.07.12 print qa.angle(tu, prec=7) # 7 digits #+005.07.12.3 print qa.angle(tu, prec=4) # 4 digits #+005.07. print qa.angle(tu, form=["tim","no_d"]) # as time, no hours shown #:20:29 # """ |
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.