| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 1488 |
|
| Package | general | |
| Module | measures | |
| Tool | measures |
| v | in | measure to be converted | |
| Allowed: | measure | ||
| rf | in | output reference code | |
| Allowed: | coded string | ||
| off | in | optional output offset | |
| Allowed: | measure | ||
| Default: | F | ||
| qv | in | optional quantity (with multiple values possible) | |
| Allowed: | quaantity | ||
| Default: | F | ||
- print a := dm.epoch('utc', 'today') # a time
[type=epoch, refer=utc, m0=[value=50451.2, unit=d]]
- dm.measure(a, 'tai') # convert to IAT
[type=epoch, refer=tai, m0=[value=50451.2, unit=d]]
- dm.doframe(a) # set time in frame
T
- dm.doframe(dm.observatory('ATCA')) # set position in frame
T
- print b:=dm.direction('j2000', dm.toangle('0h'), '-30deg') # a direction
[type=direction, refer=j2000, m0=[value=0, unit=rad],
m1=[value=-0.523599, unit=rad]]
- dm.measure(b, 'azel') # convert to AZEL
[type=direction, refer=azel, m0=[value=-1.35242, unit=rad],
m1=[value=0.846695, unit=rad]]
- print dm.angle(dm.getvalue(dm.measure(b, 'azel'))[1]),
+ dm.angle(dm.getvalue(dm.measure(b, 'azel'))[2]) # show as angles
-077.29.18 +048.30.43
In the following the qv argument is used.
# Fill the frame with necessary information
- dm.doframe(dm.epoch('utc','today'))
T
- dm.doframe(dm.observatory('atca'))
T
- dm.doframe(dm.direction('mars'))
T
# Make a list of frequencies to be converted
- a:=dq.unit([1,1.1,1.2,1.3],'GHz')
- a
[value=[1 1.1 1.2 1.3] , unit=GHz]
# Make a frequency measure. Although any can be used, it is advisable
# to use an element of the list, to make sure all units are correct
- m:=dm.frequency('lsrk',dq.unit(dq.getvalue(a)[1], dq.getunit(a)))
# Convert all
- dm.measure(m,'lsrd',qv=a)
[type=frequency, refer=LSRD, m0=[value=999995118, unit=Hz]]
# And check
- a
[value=[0.999995118 1.09999463 1.19999414 1.29999365] , unit=GHz]