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:



  popup.jpg (52087 byte)
 

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


data_setup.jpg (47143 byte)

and defines the following fields:

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 Select Wave Panel 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 Position legend and Remove legend 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, as described before..


jScope and Images


It is 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 bitmap images. 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:

image_setup.jpg (36233 byte)
 

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:

frame_popup.jpg (144626 byte)

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 (MdsDataProvider)

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=N:\\Taliercio\\Applicazioni JAVA\\jScope\\config_scope
jScope.cache_directory=
jScope.cache_size=
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]
jScope.default_server = 4
jScope.data_server_1.name = Jet MDSPlus data
jScope.data_server_1.class = JetMdsDataProvider
 jScope.data_server_2.name=TWU data
jScope.data_server_2.class=TwuDataProvider
jScope.data_server_2.browse_class=TextorBrowseSignals
jScope.data_server_2.browse_url=http://ipptwu.ipp.kfa-juelich.de/
jScope.data_server_3.name=Jet data
jScope.data_server_3.class=JetDataProvider
jScope.data_server_4.name = RFX data server
jScope.data_server_4.argument = 150.178.3.80
jScope.data_server_4.class=MdsDataProvider
jScope.data_server_4.browse_class=MdsPlusBrowseSignals
jScope.data_server_4.browse_url=http://pdigi9.igi.pd.cnr.it/wwwai/rfx_jscope.html
jScope.data_server_5 = Ftu data server
jScope.data_server_5.argument = 192.107.51.84:8100
jScope.data_server_5.class = FtuDataProvider
jScope.data_server_6.name = Local MdsPlus data
jScope.data_server_6.class = LocalDataProvider
jScope.data_server_7 = Demo
jScope.data_server_7.class = DemoDataProvider  
The selectable properties of jScope.properties are the following:

The following properties define the data servers available in the jScope environment. The nth data server is defined by the following properties:

How to adapt jScope to a proprietary data acquisition system

Originally developed for MdsPlus, the architectire of jScope is now completely independent from a particular data system. This means that jScope can be adapted to every data system.

For a seamless integration of a new data system into the jScope framework, it suffices to develop the implementation of three Java interfaces. Once such implementations have been added to the jScope classes, and the declaration of the new data server has been added into the property file, the data server can be used to visualize signals and frame sequences with jScope. There is tehrefore no need of chaging any line of code of the core jScope application.

The main interface is DataProvider, which defines a set of methods which need to be implemented. The other two interfaces, WaveData and FrameData, describe a signal and a frame sequence, respectively, as they are returned by the data access methods of DataProvider.

For a complete reference of the methods defined in these interfaces, and on how to implemen them, refer to the javadoc description of DataProvider.

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

jScope related classes

  It is possible to use the plotting classes outside the jScope application. In particular it is possible to define applets for plotting signals, and to integrate plotting classes into other java C/C++ application.
The plotting capabilities are exported by the CompositeWaveDisplay class. Detailed information on how to use CompositeWaveDisplay class is provided here.