Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | measures | |
Tool | measures |
parent | in | parent window | |
Allowed: | window or bool | ||
Default: | F |
Selecting a measures type from the Tool menu will bring up a separate GUI to
manipulate the selected measure (e.g. a direction).
The overall layout of all measure tools
is identical. A top bar with File, Format, Frame and Help menus as described
above.
Below that is an Input part (left-side) and an Output part. On the
input side you can either type the relevant values for your measure in the
top part, and select the
correct reference code from the menu next to the Convert button; or use the
special menus provided in some cases on the middle bar (Source, Planet, OBS,
etc).
The bottom half of the display is reserved
to display the input values in (measure dependent) different formats for the
same entity (e.g. wavelength, energy for a frequency measure). The bottom
half is filled in if a carriage return (or Tab) is entered in an entry field,
or one of the action buttons in the middle bar is used.
The middle bar also contains a 'Frame it' button. This will transfer the
input to the global environment frame, and an Offset button.
The Offset button has a 'set' menu item. If an offset is
set (it is set to the input value, including the reference code), any
subsequent entries in the input field are interpreted as having this offset
(actuation is indicated by turning the button text red). E.g. if in the epoch
GUI you enter 'today' (or 'now'), and press 'Offset--set', the button will
turn red, and the bottom field will show:
Fri-1998/03/13/01:17:53.991 50885/01:17:53.991 50885.0541 dIf you now enter '1h' and hit return, the bottom half will show:
Fri-1998/03/13/02:17:53.991 50885/02:17:53.991 50885.0958 d(check what it means by holding MB3 down). Note that in the direction GUI the offset is maybe contrary to what you expect. Internally directions are direction cosines. Hence offsets are direction cosines as well: a vector with a length of 1, and not offsets in longitude and latitude.
If you now hit 'Frame it', a Frame display will appear showing the last entered time.
The 'Convert' button will convert the input with the selected reference code to the reference code selected on the right-hand side of the display. You can select any output reference code you want from the menu given (although in some cases additional frame information is needed, e.g. the position if you want to convert an UTC to a sidereal time: set it with the Frame menu on the top bar). The top part of the Result window shows the result of the conversion operator in the globally selected format. If you want to see it in another format, in most cases menu buttons next to the displayed result will let you select another format for the display (epoch is the only exception: only displayed in hms). The bottom half of the display shows the result in a variety of fixed formats. Selecting at this stage 'TAI' as output code, and pressing 'Convert' will show on all fields (including top line):
02:18:24.991 Fri-1998/03/13/02:18:24.991 50885/02:18:24.991 50885.0961 dThe middle bar of the Result contains an Offset button. If 'Offset--set' pressed, the INPUT value will be used as offset to display the result. E.g. following the example and setting Offset, if we now type 2h1m in the Input entry and press 'Convert', the result will be:
01:00:60.000 -- rounding on my machine Wed-1858/11/17/01:00:60.000 0/01:00:60.000 0.0423611111 dNote that the result is 2h1m, and not the 30 odd seconds difference you would maybe expect. The offset was given as the time in UTC, but the result is in TAI: the internal mechanism will convert the Offset to the same reference frame(IAT) before applying it, resulting again in a time difference of 2h1m with the offset specified (Note that the bottom conversion of the date is, of course, nonsense).
The Copy button will export the value in the Result window (as a measure) to the clipboard. On the command line you could then use:
- dcb.paste() [type=epoch, refer=TAI, m0=[value=0.0423611111, unit=d]] - dq.time(dm.getvalue(dcb.paste()())[1]) 01:00:60.000Some result bars have also an Info button. It gives a range of selections of additional information that can be displayed. In addition to some fixed ones (e.g. radial velocity in the frequency frame) it also can have a 'User..' one. This allows you to select your own action on the value in the result frame. You have to make a function. The argument of that function is a measure, the result should be a quantity. Let us take an example with the direction frame. We make a function that will take the tan of the right ascension, and multiply it with the HI line frequency (hence the result is a frequency):
- myact := function(cr) { + return dq.mul(dq.constants('HI'), dq.tan(dm.getvalue(cr)[1])); + }On the direction tool GUI we select the SUN as Planet, press Convert. I got (and that depends on the time frame of course, -7 and -3 degrees). Press 'Info--User..', and select 'freq' and type 'myact' in the window that appears, and hit OK. The result is: -175.400989 MHz (play with the button on the right of this to get: -170.91834 cm, -7.25400475e-10 keV, -5.53908615e-17 pc).
A way of starting automatically a GUI interface is by adding the following to your .aipsrc file
measures.default: gui