jScope

jScope is a Java tool for the display of waveforms. Its concepts derive from the MDSPlus Scope, the MDSplus tool for data visualization. jScope adds new features, such as color support and error bars.
With jScope it is possible to define a set of panels and a set of waveforms is associated with each panel. Once the Waveform(s) have been displayed, it is possible to zoom parts of them, to move a cursor in order to get exact coordinates, and to drag waveforms.

Following is a brief  summary of the options currently available in jScope:

Main Menu bar:


Popup Menu
A popup menu is displayed clicking MB3 mouse button on a panel (except in Copy mode) as follows:

 
 

The first item of this menu defines the contents of the selected panel and activates a setup form. The form is as follows

and defines the following fields:

  • Title: the title of the panel (optional)
  • Signal Label: the string to appear in the legend associated with the signal. If no label is defined, the definition of the Y axis of the signal is displayed.
  •  Y: the y axis of the signal
  •  Y label: the label associated with y axis (optional)
  •  X: the x axis of the signal (optional, see below how jScope handles the case in which no x axis is specified)
  •  X label: the label associated with x axis (optional)
  • Xmin, Xmax, Ymin, Ymax: maximum and minimum values for x and y axis (optional)
  • Experiment: the name of the experiment (pulse file)
  • Shot: the shot number
  • Update event: the name of the event which generates an automaic update (MDSPlus version only)
  • Default node: the default node in expression evaluation (MDSPlus version only)
It is possible to define a set of signals using the form: after filling the fields and pressing <return>, the signal is added to the list. Definitions can be modified by selecting the signal on the list. To add a new signal to the list, select the first item; to remove a signal from the list, select it and press <del>.
Clicking the expand expr button, a popup window is displayed, which allows easier typing of long specifications of the X and Y axis. It is possible then to define maximum and minimum errors for displaying error bars, by clicking button error....  Most fields have a toggle button associated with them: when selected, the value of the corresponding field is taken from the global configuration (see before). For the definition of the shot field it is also possible to use the bottom shot field. In this case a set or a range of shots can be defined: a set is specified by the following syntax: [<sho1>, ,shot2>, ...]; a range by: <first_shot>:<last_shot>. Once a signal has been added to the list, the corresponding color and type of marker can be set first selecting the signal and then using the pull-down menus on the right of the form.
When a signal in the signal list is selected in the Setup data source popup form, it is possible to define the associated marker and color, as well to define wether the interpolating line has to be displayed and the marker step, i.e. the number of data points for each visible marker.

The second item of the Waveform popup menu allows the selection of the associated waveform (indicated by a red border around the selected waveform). Waveform selection is used as a fast way for defining waveforms: in this case the name of the signal can be typed in the bottom Signal text field and inserted in the selected waveform by pressing <Return>. The name refers only to the Y Value field of the Setup popup form; all the other parameters are taken from the global configuration. Multiple waveforms can be inserted by consecutively typing the waveform name and pressing <Return> in the Signal field. If no wave panel is selected and new signals are entered, a new panel is created for each signal.

The other two items of the Waveform popup menu allow the definition of legend for the signals associated with the waveform. The legen can be activated/deactivated and positioned where needed in the waveform window. The associated labels associated with the signals are displayed in the legend. If no label is associated with a given signal, the Y-value name is displayed istead.

The Signals item of the Waveform popup menu allows a rapid activation/deactivation of the currently defined signals. It is useful when dealing with multiple signals to individually define their visibility in the waveform panel.

The Marker, Marker-step, Colors and Interpolate items of the Waveform popup menu are active only in point mode, i.e. when one signal is selected, and allow a rapid definition of the associated graphical configuration without opening the Setup data source popup form.

The other items of the popup list allow rescalings of waveforms, and their meanings are clear from the associated label.

Finally the last item Save as Text writes the displayed waveforms points in a text file.


jScope and Images


It is now possible with jScope to look at sequences of frames (usually produced by a camera) and to correlate them with other waveforms. Using standard jdk, it is possible to look at gif, jpeg and multiframe gifs developed at CMOD. It is also possible to look at other formats by installing the standard java extension JAI (Java Advanced Imaging).
A jScope panel can be connected to a sequence of frames by selecting the is_image check box in the data setup dialog. When image mode is selected, the fields of the setu data dialog are changed and looks like the following:

 

where the fields have the following meaning

and the checkboxes indicate wether the corresponding value is taken from the global setup.
Once the frame sequence has been loaded, the first frame of the sequence is displayed. When in zoom mode, it is possible to enlarge portions of the image. When in point mode, the frame sequence is synchronized with the other displayed waveforms. This means that moving the cursor over a waveform will also update the displayed frame accordingly. When in point mode, <ctrl>MB1 click will proceede one frame further (moving in correspondence the cursor over the other waveforms). Conversely, <shift>MB1 click will go back one frame.
When a panel is displaying a frame sequence, the popup menu will look as follows:

where some frame-specific menu items are defined as follows(the others have the same meaning as when looking at waveforms):


How to integrate frame sequences in jScope using MDSplus

When using a MDSplus data server (mdsip) for getting data in jScope, the following TDI functions must be provided for displaying frame sequences, and will be invoked by jScope in the given sequence:
 

The property file of jScope
When started, jScope looks for the jScope.properties file. This file allows user configuration of jScope and may look as follows:

jScope.directory=E:\\
jScope.default_server=Demo server
jScope.data_server_1=Jet data
jScope.data_server_2=Ftu data:192.107.51.30
jScope.data_server_3=150.178.3.47
jScope.data_server_4=150.178.3.80
jScope.data_server_5=150.178.3.80:8000
jScope.data_server_6=pdigi1.igi.pd.cnr.it:8000

jScope.reversed=false
jScope.grid_mode=Dotted
jScope.x_grid=5
jScope.y_grid=5

jScope.item_color_0=Blak,java.awt.Color[r=0,g=0,b=0]
jScope.item_color_1=Blue,java.awt.Color[r=0,g=0,b=255]
jScope.item_color_2=Cyan,java.awt.Color[r=0,g=255,b=255]
jScope.item_color_3=DarkGray,java.awt.Color[r=64,g=64,b=64]
jScope.item_color_4=Gray,java.awt.Color[r=128,g=128,b=128]
jScope.item_color_5=Green,java.awt.Color[r=0,g=255,b=0]
jScope.item_color_6=LightGray,java.awt.Color[r=192,g=192,b=192]
jScope.item_color_7=Magenta,java.awt.Color[r=255,g=0,b=255]
jScope.item_color_8=Orange,java.awt.Color[r=255,g=200,b=0]
jScope.item_color_9=Pink,java.awt.Color[r=255,g=175,b=175]
jScope.item_color_10=Red,java.awt.Color[r=255,g=0,b=0]
jScope.item_color_11=Yellow,java.awt.Color[r=255,g=255,b=0]
 
 

How to customize jScope to a non MDSplus system

Using jScope in another system requires the implementation of two classes LocalProvider, used to access local data, and NetworkProvider, used to access remote data, both implementing the DataProvider interface.

DataProvider defines the following methods, which must be implemented by both classes:
 


The following methods refer to more specialized tasks, currently supported by MDSplus. Implement them as follows:

public boolean SupportsAsynch() { return false; }
public void addMdsEventListener(MdsEventListener l, String event){}
public void removeMdsEventListener(MdsEventListener l, String event){}
 

Besides implementing the DataProvider interfaces, class LocalProvider must provide a constructor with no arguments, (and will likely define a set of native methods, linking against the data access libraries), while class NetworkProvider must provide a constructor with one String argument, i.e. the IP address of the associated server. Class NetworkProvider will handle the required protocol with the remote data server.
 
 

For further information, contact me at the following e-mail address: manduchi@igi.pd.cnr.it