/** \mainpage \section overview Overview of the DiFX GUI \tableofcontents The DiFX GUI was developed at the United States Naval Observatory as a front end to the DiFX software correlator. It was designed to minimize the effort required to conduct "normal" correlation tasks without crippling the flexibility sophisticated operators require for unique or unusual operations. While it was designed to make running the correlator easier, running the GUI (and reading this documentation) requires some understanding of DiFX and its components. This document contains an end-to-end description of how the DiFX user interface can be used to run DiFX jobs. All steps in the process are described in roughly the sequence they would be employed in actually running a job. Because the GUI has many options that can cause branching paths in step-by-step instructions, what follows is only a description of a "sample" procedure for running a job. The specific needs of individual users, data and installations will likely require approaches that differ some, or possibly a lot. With this in mind, links are provided to other sections of the documentation that may provide additional details on each subject. This document is not a comprehensive tutorial on all of the functionality of DiFX itself. A good place to start looking for that sort of thing is here. \subsection whatItDoes What the GUI Does The GUI allows an operator to perform basic tasks associated with DiFX correlation. It was created for the purpose of processing data from regular, fairly standardized geodetic experiments, and is probably best suited for that kind of work. Specifically, it allows a user starting with radio interferometry data and a ".vex" file to:
applications/guiThe Java archive (".jar") file used to run the GUI itself is in:
applications/gui/gui/dist/gui.jarThis directory also contains a number of other ".jar" files that are necessary to run the GUI. If you want to move the GUI to another disk location it is best to simply copy the complete contents of the "dist" directory. The top-level of this documentation is here:
applications/gui/doc/intro.htmlThe guiServer C++ application is also part of the DiFX software tree, in:
application/guiServerUsing DiFX build procedures (such as difxbuild) will compile guiServer and install it and gui.jar file in the appropriate bin directories. The ".jar" files do not need compilation. \section startup Running the GUI and Connecting to the DiFX Host A single instance of the server application guiServer needs to be run on one of the processing nodes in the DiFX cluster (the processor running guiServer is often referred to in the documentation as the "DiFX Host" or the "DiFX head node"). GuiServer must be run by a user (not root for security reasons) that has read/write permissions over all data directories used by DiFX. This user must also be able to start processes on all other nodes using mpirun. It probably makes most sense to have the user that you normally use to run DiFX from the command line run guiServer. \anchor startingGuiServer GuiServer is run from the command line on the DiFX Host:
guiServer [PORT #]The optional port number is the TCP connection port used to communicate with the GUI. If it is not specified, guiServer will use a default port number (it uses the value given by the DIFX_MESSAGE_PORT environment variable, or 50200 if that is not available). As soon as it is started, guiServer will produce a message indicating the port it is using:
server at port 50200The GUI itself is a Java program that can be run anywhere that a network connection to the DiFX cluster is available. Because the GUI and guiServer communicate using insecure TCP connections there must be no intervening firewalls between them (there are ways to deal with firewalls and in fact run the GUI anywhere - see \ref runningDiFXRemotely "Running DiFX Remotely." Run the GUI using its ".jar" (Java archive) file:
java -jar [GUI DIST PATH]/gui.jarThe "GUI DIST PATH" is the location of the "dist" subdirectory in the gui portion of the DiFX installation tree. Once the GUI is running, the address of the DiFX Host (where guiServer is running) and the port number (what guiServer told you above) can be entered in the Settings menu to connect the two (see \ref controlConnection "DiFX Control Connection" in the Settings documentation for details). A proper connection will be pretty obvious - the \ref guiServerConnectionMonitor "GuiServer Connection Monitor" will turn green, a "connection successful" message will appear, and, assuming you have \ref runMk5daemon "mk5daemon" operating properly, the GUI should start displaying information about the components of the DiFX cluster. \image html connectedTopLevel.png The GUI and guiServer can be started in any order - the GUI will connect as soon as a guiServer becomes available (for the most part - remote connections are sometimes more touchy about this). Any number of GUI sessions can be run simultaneously using the same guiServer, although there are considerations one should take into account to make sure ports are always available. \subsection runMk5daemon Run mk5daemon! For the GUI to work properly it is important that the mk5daemon process be running on every DiFX hardware component (processors, MK5 units, etc.) in the DiFX cluster. The reason for this is that mk5daemon produces the periodic "heartbeats" for each component, including such information as CPU and memory load and read/write operations. Mk5daemon is also important because it is the only way the GUI knows that a component exists and is available as a resource - without it the component will not be utilized in DiFX processing. Your DiFX cluster may be set up such that mk5daemon is started by each component when it boots, but in the event it is not you will need to log into each component (use the DIFX_USER) and start it by typing:
mk5daemon &Soon after mk5daemon is run on a component, the component should appear in the GUI Hardware Monitor (see \ref monitoringTheDiFXCluster "Monitoring the DiFX Cluster Hardware"). \subsection runningDiFXRemotely Running DiFX Remotely The GUI/guiServer communications link, which handles all interaction between the GUI and DiFX, is based on insecure TCP socket connections. This works fine if you run the GUI on the same unrestricted LAN as the software correlator, but breaks down if you move outside firewalls that restrict direct TCP connections. To get around such restrictions, an "ssh tunnel" can be set up through a firewall as long as you can ssh to the firewall. Running a DiFX cluster that is located behind a firewall using a GUI running on a machine outside the firewall can be accomplished using the following steps (the order of which is unimportant):
ssh -N -L [LOCALPORT]:[WHAT FIREWALL CALLS DIFX HEADNODE]:[CONNECTION PORT] USER\@FIREWALL
The Settings section contains settings for Tone, Phase
Calibration
Interval and Delta Clock. The Delta Clock value is often
gleaned
by running a "Clock Pass" on a subset of the experiment's data
(see
some sort of explanation here).
.v2d
and .vex
files that
are created as part of the new experiment, so selections are part of the
experiment creation process. The \ref experimentScanSelection "Scan Selection"
section of the Experiment Editor can be used at any time to view the scans that will be
included in the experiment when it is created as well as which stations are used for
each.
\image html experimentEditor_scanSelection.png
Some of the scan and station selection controls can work at
cross-purposes - effectively they provide more than one way to cause
a scan or a station to be used. When a conflict occurs, the GUI
will give the most recent command precedence (if, for instance, a
command is given that a scan be included in the final experiment
when a previous command eliminated the scan, the GUI will include the
scan).
.vex
Data.vex
data. When the GUI encounters the "-1", it will remove the
station from the scan. This duplicates hardware correlator
behavior. Starting with the .vex
file snippet below, the
final .vex
file will not include the station "Bd" because of the "-1" in
the final column.
\code
scan 128-1703;
start = 2014y128d17h03m34s;
mode = GEOSX8N.8F;
source = 1846+322;
station = Bd : 0 sec : 20 sec : 0 ft : 1A : &n : -1;
station = Ho : 0 sec : 20 sec : 0 ft : 1A : &n : 1;
station = Kk : 0 sec : 20 sec : 0 ft : 1A : &cw : 1;
station = Ny : 0 sec : 20 sec : 0 ft : 1A : &ccw : 1;
station = Ts : 0 sec : 20 sec : 0 ft : 1A : &cw : 1;
endscan;
\endcode
For changes of this type to be recognized, the .vex
file must be
parsed by the \ref experimentEditor "Experiment Editor". You edit the .vex
file
in the \ref vexFileEditor ".vex File Editor" or you can use your favorite text editor.
If you do not want the GUI to pay attention to the "-1" code in this
way, un-check the \ref eliminateStations "Eliminate Stations With \"-1\" Code" box in the Settings menu.
The "Stations" section is primarily set up to change parameters
related to each antenna involved in an experiment, and to select
the
data sources associated with them (see above). However it
also
includes a check box that can be used to completely remove each
station
from the experiment. Any scans that no longer have enough stations
to
form a baseline (i.e. less than two) will be eliminated.
IMAGE
The "Scan/Station Timeline" section provides a visual map of all
scans and the stations used in them in a timeline. It allows
the
selection/deselection of individual stations within scans or the
inclusion of data from different stations based on time.
IMAGE
Somewhat more complex explanation here.
The "Sources" section shows all sources and the stations used to
observe them. It allows sources to be selected and
deselected,
and stations to be selectively used or eliminated from sources.
IMAGE
The Sources section is something of a work in progress, and not something anyone uses at the USNO, so it is a little confused at this point as to what it wants to be. It was developed originally with the idea that astronomical observers would be interested in sources (in geodesy they are uninteresting). Suggestions are welcome.
At any time in the scan/station selection process, the "Scan
Selection" editor will show which scans will be included in the
final
experiment (included scans are green, scans not included are
gray). It allows the user to make selections on a
scan-by-scan
basis by clicking on individual scans, or by turning all scans on
or
off using the "Select All" and "Clear All" buttons.
IMAGE OF SCAN SELECTION PANEL WITH LABELS HERE
The Scan Selection Editor includes a "Time Limits" plot that
shows
all scans from the original .vex file as a time sequence (again,
scans
in green are included, those in gray are not included). The
mouse
wheel can be used to "zoom in" on different time limits, and the
red
and blue triangles can be grabbed and dragged to limit the final
experiment in time. This widget is somewhat redundant with
the
Scan/Station Timeline Editor, but it may be useful to someone.