JdClient - Java Data Acquisition Client


The program is written in Java and was compiled under the Java 1.2 from Sun Microsystems. Newer version of Java, Java 2, was also used successfully to run the program. However there were some minor malfunctions noticed with the release 2, which didn't impair the main functional parts of the program, mainly related to the changes introduced to the graphical user interface API.

Download

Client is available for download from the network data server (NDS) access page.

Configure as Triana Unit

JdClient can be used as Triana unit. You need to put jdclient.jar and xml.jar on the java CLASSPATH. Unit class name is DaqInput. There is a number of supporting classes, all named starting with DaqInput. All these should be placed into the unit directory.

Command Line Interface

There is a separate class, entitled JdClientCommand, used to run the JdClient from the command line without the GUI. There are scripts jdcmd and jdcmd.bat written to run it. JdClientCommand reads preferences from the resource file .jdclientrc located in user's home directory. This file is shared with the JdClient program (the one with GUI interface) and DaqInput Triana unit. This allows you to configure acquisition process in the GUI and then use command line version to actually acquire the data.

There is a number of command line flags supported.

All missing command line data acquisition parameters are determined from the preferences read from the resource file in the user's home directory.

Main Window

The main program window looks like this:

There is a list of channels, which will be acquired when Start button is pressed. On the bottom of the window there is a network connection status line. When the program is just started it says that it has disconnected from the server -- this is normal, it needs to connect to the server to get the channels configuration. Then it disconnects from it and waits for user commands.

The program reads preferences from the $HOME/.jdclientrc file. On the backward systems without the notion of the user home directory, like some well-known Microsoft operating systems, this file is usually created in the root directory: Java system property "user.home" is used to get the directory name, so it is up to the Java machine implementation as to where to place this file. The preferences are saved upon the program exit, so all the configuration is restored the next time you start the program.

Network Config

Upon the startup the program connects to the data acquisition server (DAQD), and gets the list of known data channels. There is network parameter configuration dialog, which is opened by menu Edit, then Preferences, then Network... selection. This is how the network configuration dialog window looks like:

There are two text entry lines. The one on the bottom is for the DAQD server hostname and port number. Usually you just need to change the hostname to connect or change connection to certain data acquisition server. The one on the top is for the image map, which is a graphical channel name selector. This points to the URL, where the appropriate images are stored.

Channel Selection, Decimation

After you have connected to the server, you should proceed to one of the channel selection dialogs. Those are available at menu Edit, then Channels, then List... or Image Map.... Image map is a graphical channel selector. It may not reflect server channels correctly. List selector is always up to date with the server channels -- those are loaded from the server each time the program starts or connects to the DAQD server.

When you are done selecting the channels, they appear in the main window's list. Now you may wish to decimate data rates for selected channels before you start getting the data. Decimation dialog is opened at the menu Edit, then Decimate.... The dialogs provide a selection for the new rate. This rate applies to all channels or, if there is one or more channels selected, to the channel selection in the main window's channel list.

Acquisition and File Config

Now you are done with the channel selection and ready to do data acquisition configuration (selecting period for which you wish to acquire the data), and file configuration (how to save the data and where to create new file(s)). First you should open up the data acquisition preferences dialog window. This is done from the menu Edit, then Preferences, then Acquisition.... The window looks like this:

There are three areas, selectable with the radio buttons. These correspond to the three main data acquisition methods this program supports: You can enter time in seconds or as years, months, days, hours, minutes and seconds. The format is converted back and force automatically.

Lastly, the file configuration must be specified. The default file config is to create one file in current directory. This can be changed with the file preferences dialog, which is reached by Edit, then Preferences, then File.... This window looks like this:

The directory is the one where the file(s) will be created. It should exist and must be writable. The format is the one of the output data formats supported by the JdClient. Default is the comma separated values, which is generally useful for the import into the spreadsheets and such. Note that the binary format is much more efficient. File creation rules specify how to create new output data files. There are two check boxes. This gives four different permutations, ie. four different creation modes. Default is nothing checked. This creates one file. If the first box is checked, the new file is created per specified time period. If the second one is checked, the new file is created for each data channel that appears in the main list. If both are selected -- both rules apply.

Data Output format

Output files are named as follows: timestamp + channel name + format suffix. Channel name is only added to the file name if new file is created per data channel. Timestamp specify the start of the data acquisition time period. Suffix signify selected data saving format. These are the examples of the file names:
572992575.csv
572992593.csv
573002688_IFO_CMRO.csv
573002688_IFO_DMRO.csv
573002689_IFO_CMRO.csv
573002689_IFO_DMRO.csv
573002690_IFO_CMRO.csv
573002690_IFO_DMRO.csv

The format of the data file created depends of the data format selected. Binary format is in the form sent by the server. This is described in the DAQD server protocol manual. Text formats follow the same pattern. Following is the file created by the acquisition of two data channels, IFO_DMRO and IFO_CMRO from the 40 meter server, decimated down to 16 samples per second. This shows the data acquired for 4 seconds and saved into the same file for both channels; comma separated values:

IFO_DMRO,572814782,344,360,344,345,346,346,346,349,360,345,344,347,346,351,349,346
IFO_CMRO,572814782,2023,2088,2035,2048,2063,2057,2052,2077,2092,2050,2043,2059,2062,2040,2071,2055
IFO_DMRO,572814783,344,361,347,348,347,348,366,346,360,349,363,348,347,351,346,349
IFO_CMRO,572814783,2027,2103,2058,2059,2058,2069,2131,2055,2088,2077,2108,2067,2060,2086,2053,2077
IFO_DMRO,572814784,361,351,348,351,349,349,360,348,348,351,360,362,364,365,363,349
IFO_CMRO,572814784,2081,2083,2073,2083,2074,2081,2095,2061,2070,2032,2089,2102,2112,2123,2108,2069
IFO_DMRO,572814785,350,360,350,362,349,348,360,364,362,350,363,351,364,360,363,361
IFO_CMRO,572814785,2053,2091,2079,2100,2076,2068,2092,2115,2144,2082,2106,2084,2122,2095,2109,2097
IFO_DMRO,572814786,366,367,363,367,367,361,360,367,366,362,364,361,367,364,363,361
IFO_CMRO,572814786,2109,2135,2110,2135,2125,2141,2138,2146,2132,2147,2164,2146,2176,2165,2159,2147
The first column is the channel name. Second one is the timestamp for the data, GPS seconds. Then, the data samples for one second period (16 of them in this case) follow up until the end of the line.

Controls

Now you are ready to start data acquisition. This is done simply by pressing on the Start button. The GUI controls are disabled in the main window while it is in the data acquisition mode. At any time the acquisition process can be stopped by pressing Stop button. For time limited mode, the process will stop automatically, when configured data volume is accumulated.
Alex Ivanov <aivanov@ligo.caltech.edu>
Last modified: Mon Mar 8 11:05:24 PST 1999