VIEWER for Data Catcher [TOC]




INTRODUCTION

The data viewer is a stand-alone EPICS scan data displaying system that is written in pure IDL language. It is able to directly process the files generated by the data catcher. It also provides the option of converting the machine-dependent binary data into platform-independent XDR binary form. The data viewer is more efficient than the data catcher in viewing the 1D/2D data because no external channel access monitoring is involved. Data catcher uses 32 colors only. The viewer uses as many colors as are available for the workstation when the viewer is invoked.

Now catcher and viewer supports both native binary format and XDR format. They can automatically figure out the format of data is saved on UNIX system.

PROGRAM PACKAGE

The data viewer is written in IDL language and is composed of three major sub-program modules: view1d, view1d_overlay, view2d, and dcviewer. It operates on the same set of data files generated by the data catcher developed at APS/XFD.

The ez_fit curve fitting package can also be accessed from the view1d or view2d program by selecting the desired data.

The complete program package of data viewer consists of following files:

os.init			- Operating system configuration file
dcviewer.pro		- Data Catcher Viewer main driver 
view1d.pro		- Data Catcher 1D scan data viewer
view1d.init		- View1d variables initialization file 
view1d_overlay.pro	- Data Catcher 1D scan overlay data viewer
view2d.pro		- Data Catcher 2D image viewer
view2d.init		- View2d variables initialization file 
view2d_help.txt		- View2d simple on line help file
viewer 			- Unix script file to invoke data viewer
viewer_startup.pro	- IDL_STARTUP file used by IDL unix system
viewer_startup.win	- IDL_STARTUP file used by IDL window system
xdisplayfile.pro	- X terminal window to display the text file
cw_term.pro		- X terminal window to display the text file plus rename
rename_dialog.pro	- File rename dialog
u_read.pro		- Routines for read/write 1D/2D binary data
catch1d.tbl		- Color table used by data viewer
plot1d.pro		- General purpose multi-line 1D plot package 
plot2d.pro		- General purpose 2D plot package 
ez_fit.pro		- Easy fit curve fitting package written for IDL
fit_statistic.pro       - Common FWHM calculation routines 
scan1d__define.pro      - Object metheds for accessing 1D data
scan2d__define.pro      - Object metheds for accessing 2D data
scan2d_convert.pro      - Object metheds for write/read TIFF/GIF data
scan2d_overlay.pro      - A image overlaying method for 2D image data
scan2d_roi.pro          - 2D ROI statistic program
calibra                 - Unix script to invoke stand-alone calibration program
calibdrv.pro            - 1D/2D calibration setup program
calibra_factor.pro      - 1D/2D calibration program
calibra_pick1d.pro      - Column/row selection program coupled with calibration
multiroi_pick.pro       - Mutiple 2D ROI statistic program
colorbar.pro		- Colorbar configuration program
panimage.pro		- Various panImage routines 
xdr_open.pro		- XDR open/read/write routines up to 4D arrays
assignname_read.pro	- program to assign new preferred detector name 
The viewer and viewer_startup.pro files are specially written for the solaris/sun UNIX system for easy startup of data viewer. For the W2000 system, the IDLDE's file preferences dialog should be used to set up the startup file and environment. The operating system configuration file is defined in os.init. The current setting works for the UNIX and W2000 operating systems. It is assumed that for the UNIX operating system the data viewer is installed under the $EPICS_EXTENSIONS/bin/$HOST_ARCH directory; for W2000, the data viewer is installed under the C:\IDL directory.

IDL_STARTUP [TOC]

The os.init is the IDL startup file required for running data catcher and data viewer. The system commands used by the catcher and viewer are defined in this file. They can be tailored to correspond to different operating systems. Currently only the UNIX and W2000 systems have been considered and fully tested.

VIEW1D [TOC]

View1d is a generic IDL program specially written for displaying the 1D scan data that were captured by the APS/XFD data catcher for the EPICS scan record. It shares the same input data files saved by the data catcher. Starting from catcher R2.2.2B and later version both the 1D and 2D data are automatically saved in the XDR binary format. The default data saved by the earlier versions of data catcher are in unformatted binary form which must be converted to XDR format in order to port to PC. If the 1D scan data are saved in XDR binary form, then the data are platform independent. For clarity, it is recommanded that the file name convention adopted for XDR-type ends with a .xdr string.

Two examples are given below to show how to run view1d in IDL. Example 1 shows the input file is specified on the command line. Example 2 will use the file selection dialog to pick the desired file. Be aware that on W2000 the file must be already converted or saved in platform-independent XDR format.

Run view1d : idl IDL> @os.init IDL> view1d,data='scan.dat' ; example 1 IDL> view1d ; example 2

VIEW2D [TOC]

View2d is a generic IDL program specially written for displaying the 2D image data that were captured by the APS/XFD data catcher for the EPICS scan record. It shares the same image file saved by the data catcher. If the 2D image data are saved in XDR binary form, then the data are platform independent. Starting from catcher R2.2.2b 2D image data is automatically saved in XDR format. The default data saved by the earlier version of data catcher are unformatted binary data which must be converted to XDR format in order to port to PC. For clarity, it is recommanded that the file name convention adopted for the XDR-type data ends with a .xdr string.

Two examples are given below to show how to run view2d in IDL. Example 1 specifies the image file on the command line. Example 2 will use the file selection dialog and the input data format option to pick the desired file. On W2000 the image file must be already in platform-independent XDR format.

Run view2d : idl IDL> @os.init IDL> view2d,file='scan.dat.image' ; example 1 IDL> view2d ; example 2

DCVIEWER [TOC]

Dcviewer is an integrated data catcher viewing program. It integrates view1d, view1d_overlay and view2d into a single system. It also provides the option of converting binary data saved by the data catcher to the platform-independent XDR format. It requires that view1d, view1d_overlay and view2d have been installed in the same directory.

Two examples are given below to show how to run dcviewer in IDL. Example 1 lets the user freely access the view1d, view1d_overlay or view2d. Example 2 shows how to invoke the bi2xdr subprogram of the dcviewer to convert the non XDR data to the platform-independent XDR format. (Starting from the catcher R2.2.2b all the data are automatically saved in XDR format.) The optional program bi2xdr must be accessed on the operating system where the raw data was originally captured, e.g. at the APS/XFD, this means the sun or solaris system. On W2000 data must be already converted or saved in XDR format.

Run dcviewer : idl IDL> @os.init IDL> dcviewer ; example 1 IDL> dcviewer,/XDR ; example 2

VIEWER2.5 NEW FEATURES (June 13, 2001)

Starting from viewer2.5.zip the sample data for catcher 1D and 2D scans are stored under the DATA sub-directory. The user interface is changed slightly, now a user can assign the detector names through assignname_read before running VIEW2D program.

The scan2d_roi program with the option of saving filter ROI in the intermediate file with file type suffixed with '_roi.pickfltr'. The intermediate file can be loaded into the multiroi_pick program for refineing the selected ROI.

A 'Change X Axis' sub-menu is added on the 'File' menu in VIEW2D program. A user can display the image data with different positioner values with this new feature.


UNIX OPERATING SYSTEM [TOC]

DOWNLOADING TAR FILES

  • Download the complete viewer package for IDL5.3 and later : Viewer2c9.Tar.gz (Sept 02, 2003 - Updated)
  • Extract the Tar File:

    gunzip Viewer2c9.Tar.gz tar xvf Viewer2c9.Tar
    Refer to the program package section for a complete list of files in 'TarViewer'.
    
    

  • Download the sample 1D and 2D data package: DCSamples.Tar.gz
  • Extract the Tar File:

    gunzip DCSamples.Tar.gz tar xvfFF DCSamples.Tar
    The UNIX tar file 'TarDCSamples' constists of the following files:
    junk2			- 1D scan data in XDR format
    junk2.image		- 2D image data in XDR format
    viewer_startup.win	- viewer startup file for window system
    
    where all data files are generated in XDR format on the UNIX system. The viewer_startup.win is the IDL startup file can be used for W2000 system.

    COMMAND SYNTAX

    Two cases of UNIX installation are considered here. In the first case, the data viewer is installed under the normal system installation. (At APS it is installed under the /usr/local/epics/extensions/bin/$HOST_ARCH directory.) In the second case, the data viewer is installed in a private data directory.

  • Run Viewer under normal installation:
  • setenv EPICS_EXTENSIONS /usr/local/epics/extensions ( Setup the environment variable EPICS_EXTENSIONS to /usr/local/epics/extensions ) ( Make sure the $EPICS_EXTENSIONS/bin/$HOST_ARCH is in your command search path ) viewer ( Startup the data viewer )

  • Run Data Catcher Viewer with private installation :
  • cd viewer/directory ( Assumed viewer package is installed in private viewer/directory ) setenv IDL_STARTUP viewer_startup.pro idl ( Startup the idl ) IDL> dcviewer ( Startup the data viewer )

    W2000 OPERATING SYSTEM [TOC]

    Two ways of downloading the W2000 viewer are available either by zip file or by individual files. If user has WinZip tool on his/her PC, then he/she can simply download the viewer2.5.zip file. If the user does not have WinZip tool on his/her PC, then uses the downloading individual files method.