It is written in IDL[1] programming language and external Channel Access(CA) interface functions defined in the ezcaIDL[2] sharable library. It is a complete mouse driven program using the IDL's widgets and event handler.
The data catcher is an easy to use data acquisition tool for EPICS 3.12.2 and newer scan record[3]. Currently it provides 1D/2D real-time plot features while scan is progressing, and automatically saves the scan data at the end of each scan. It provides simple statistic calculation for peak, centroid, and full width half peak (FWHP). It provides plug-in to the simple data fit package. It also provides very flexible 1D/2D post scan data viewing and report features. Simple on-line help is also available.
A special viewer package written in IDL is also released with data catcher R2.2.2. For viewing data acquired by the data catcher the viewer is recommanded because it is more efficient than using the data catcher.
Data catcher is available on sun4 and solaris at APS. Although in this report the solaris is used in the system setup example, which is equally applicable to the sun4 system.
With simple setup modification, viewer can be easily ported to any other operating system or platform which IDL supports. Porting catcher to other operating system requires that the CA has to be ported first.
The initiation of scan can be internally invoked by the start button of scan setup window of the data catcher or externally invoked by any other CA clients, e.g. medm[4].
At the end of each scan only the arrays for the defined (non zero) positioners and detectors are automatically saved. In addition to scan data, a user can use the environment file to save additional operating parameters. At the normal termination of data catcher the new configuration file will be automatically saved. At the restart of data catcher this configuration file will be used.
The default setup for data catcher is acquisition on, automatic save on, real-time displaying on. It operates in two modes: data acquisition and viewing. The program is initially in the data acquisition (i.e. data capture) mode. A user can temporarily select the viewing data mode to examine the scan data previously captured. At the end of view data mode it automatically returns to the data acquisition mode.
The acquisition mode supersedes the view data mode. During the 1D viewing mode if the data catcher detects that the scan is invoked by an outside CA client, it will close the 1D viewing mode right away and yields to the data acquisition mode.
There are three view data modes: 1D, 2D and 1D overlay. The view 1D data mode supports various 1D line plot, plot captions, flexible selection of any detectors, generating post script plot and ASCII reports. Currently the view 2D data mode provides TV, SURFACE, CONTOUR, SHOW3, and XSURFACE plot for 2D image data. The 1D overlay mode supports simple 1D plot for multiple scans.
The catcher can be started in different operation mode such as no save or view only mode. In view only mode, a user can start the data catcher as a data browser without turning on the data acquisition. In no save mode, a user can start the data catcher as a real-time scan data display without saving the scan data. If two copies of data catcher are running at the same time and they both are trying to write to the same output file, if any one detects that the other one already wrote the new data on the file then it will be automatically turned to no save operation.
Currently the data catcher is composed of the following subprogram packages:
The script file catcher automatically invokes the IDL data catcher, catcher_v1, for user. It can be run from any directory as long as the directory name
`/usr/local/epics/extensions/bin/HOST_ARCH'
is included in the user search path. At APS the HOST_ARCH can be either sun4 or solaris which depends on the user's operating system.
The catcher provides few command line options to let the user override the default settings. The default file names assumed are: `catch1d.config' for configuration file, `catch1d.trashcan.xdr' for data file, and `catch1d.env' for environment file.
At the very first time of running the data catcher in a directory a user can override the default setting on the command line through using the keyword options(for example refer the appendix section). If the configuration file is found by the data catcher, the configuration file overrides the command line specification. If the internal file selection dialog is used, it overrides the configuration file specification.
The command line syntax, and the optional keyword are shown in the appendix.
Catcher_v1 is a stand alone complete IDL program. It can be run directly from the IDL prompt by issue the IDL command CATCHER_V1 as long as the environment is properly set and the path `/usr/local/epics/extensions/bin/solaris' is in the IDL search path. The default file names used are `catch1d.trashcan.xdr', `catch1d.config', and `catch1d.env'.
Catcher_v1 automatically saves the 2D images at the end of 2D scan. It provides the view 2D feature by directly invoking the view2d program.
Now the script program catcher automatically setup the environment and load this program into IDL for user, the simplest way of starting the data catcher is through this script file.
The command line syntax, and the optional keyword are shown in the appendix.
It provides flexible 1D scan data accessing and displaying, simple statistical calculation, and easy curve fitting. It provides automatically hard copy plot generation and various simple ASCII report generation functions.
View1d is a stand alone complete IDL program. It supports the 1D data either in the native binary format or XDR platform independent binary format. It can be run directly from the IDL prompt by issue the IDL command VIEW1D as long as the environment is properly set and the path `/usr/local/epics/extensions/bin/solaris' is in the IDL search path. The default scan file assumed is `catch1d.trashcan'.
The command line syntax, and the optional keyword can be found from the web page link:
View2d is a stand alone complete IDL program. It supports the image data either in native binary format or XDR platform independent format. It can be run directly from the IDL prompt by issue the IDL command VIEW2D as long as the environment is properly set and the path `/usr/local/epics/extensions/bin/solaris' is in the IDL search path. The default image file assumed is `catch1d.trashcan.image'.
It is assumed that the image data is automatically generated by the 2D scan of the data catcher. 2D image generated by other package can be converted into view2d format and then displayed by this program.
The command line syntax, and the optional keyword can be found from the web page link:
View1d_overlay is a stand alone complete IDL program. It supports the 1D data either in the native binary format or XDR platform independent binary format. It can be run directly from the IDL prompt by issue the IDL command VIEW1D_OVERLAY as long as the environment is properly set and the path `/usr/local/epics/extensions/bin/solaris' is in the IDL search path. The default scan file assumed is `catch1d.trashcan'.
The command line syntax, and the optional keyword can be found from the web page link:
Ez_fit is a stand alone complete IDL program. It can be run directly from the IDL prompt by issue the IDL command EZ_FIT as long as the environment is properly set and the path `/usr/local/epics/extensions/bin/solaris' is in the IDL search path. In data catcher the scan data is automatically plug into the ez_fit by 1D detector selection or 2D image array.
The command line syntax, and the optional keyword can be found from the web page link:
The command line syntax, and the optional keyword can be found from the web page link:
This will start the data catcher with complete default features. It includes real-time plot, data acquisition, saving acquired data, real-time text window, viewing old data option, listening to new data, etc.
catcher -n
This will start the data catcher with all the default options except that the acquired data will not be saved. It is assumed that there is another version of data catcher is running and the new scan data is automatically saved by that run.
catcher -v
This will start the data catcher as a data browser/viewer, no data acquisition will be done. It will only access the viewing features of the data catcher, no data acquisition is performed by this option.
User should know that it is better to use viewer than `catcher -v' because it is more efficient.
4 Maximum positioners allowed in scan record
4000 Maximum data points can be requested in 1D scan
1000x1000 Maximum image array allowed
10000 Maximum number of 2D images allowed in 2D image file
15 Maximum number of detector images associated with a 2D scan
The configuration file normally is automatically generated/updated by the data catcher at the termination time if the scan record is properly connected. The modification of configuration file by the user is not recommanded unless if he/she really knows what he/she is doing.
All the report files created by the data catcher are always stored in the directory where the data catcher was invoked. Normally the data file and environment file are also stored in the same directory but the user may change the default data directory by the file selection dialog.
The important files used by the data catcher include environment file, configuration file, data file, index file, image data file, and report files. They are briefly described in the following.
The `catch1d.env' provides the flexible feature of saving additional IOC setting values with the scan data. It should contain a complete list of environment PV variables to be saved with the 1D scan. For each PV name defined in the `catch1d.env' file the field value and field description is saved with the scan data.
A complete list of environment values plus a subset of important fields of the scan record will be saved for each reference case. For subsequent scans only those values changed from the reference case will be saved, or the PV name is prefixed by `*' will always be saved.
The reference case is defined as the data catcher is ready for acquiring new scan data, i.e. whenever the set up for a new scan PV names is called. PV name setup is automatically called at the initial start-up of the data catcher, at the close of the viewing mode, and at the user changing the scan record positioner and detector names.
If the description is not specified for a given PV name in `catch1d.env', then the description from the record's `.DESC' field will be used in the output data file. Any line begins with # in the first column will be treated as a comment line. Any PV name is prefixed by an `*' in the env.file, it will always be saved with each scan.
The existence of the environment file is optional for the data catcher. If it is not given on the command line, `catch1d.env' is assumed.
<UserID:scan1>.NPTS NPTS Number of Points : <UserID:scan1>.P1PV P1PV Positioner # 1 PV Name : <UserID:scan1>.R1PV R1PV Readback # 1 PV Name : <UserID:scan1>.P1SM P1SM Positioner # 1 Step Mode : <UserID:scan1>.P2PV P2PV Positioner # 2 PV Name : <UserID:scan1>.R2PV R2PV Readback # 2 PV Name : <UserID:scan1>.P2SM P1SM Positioner # 2 Step Mode : <UserID:scan1>.P3PV P3PV Positioner # 3 PV Name : <UserID:scan1>.R3PV R3PV Readback # 3 PV Name : <UserID:scan1>.P3SM P3SM Positioner # 3 Step Mode : <UserID:scan1>.P4PV P4PV Positioner # 4 PV Name : <UserID:scan1>.R4PV R4PV Readback # 4 PV Name : <UserID:scan1>.P4SM P4SM Positioner # 4 Step Mode : <UserID:scan1>.D1PV D1PV Data Detector # 1 PV Name : <UserID:scan1>.D2PV D2PV Data Detector # 2 PV Name : <UserID:scan1>.D3PV D3PV Data Detector # 3 PV Name : <UserID:scan1>.D4PV D4PV Data Detector # 4 PV Name : <UserID:scan1>.D5PV D5PV Data Detector # 5 PV Name : <UserID:scan1>.D6PV D6PV Data Detector # 6 PV Name : <UserID:scan1>.D7PV D7PV Data Detector # 7 PV Name : <UserID:scan1>.D8PV D8PV Data Detector # 8 PV Name : <UserID:scan1>.D9PV D9PV Data Detector # 9 PV Name : <UserID:scan1>.DAPV DAPV Data Detector # A PV Name : <UserID:scan1>.DBPV DBPV Data Detector # B PV Name : <UserID:scan1>.DCPV DCPV Data Detector # C PV Name : <UserID:scan1>.DDPV DDPV Data Detector # D PV Name : <UserID:scan1>.DEPV DEPV Data Detector # E PV Name : <UserID:scan1>.DFPV DFPV Data Detector # F PV Name : <UserID:scan1>.T1PV T1PV Trigger # 1 PV Name : <UserID:scan1>.T1CD T1CD Trigger # 1 Command : <UserID:scan1>.T2PV T2PV Trigger # 2 PV Name : <UserID:scan1>.T2CD T2CD Trigger # 2 Command :
Be aware of that configuration file will be updated only at the normal exit of data catcher and meanwhile the scan record is properly connected at the exiting time.
The contents of `catch1d.config' include scan record name, the data directory and the data file name where the last scan data was saved, and important scan setup fields of the scan record. Be aware that the `catch1d.config' only remembers the very last status of the data catcher when you normally exit the program.
The configuration variable can be parsed by the data catcher include the following:
scanData.pv - gives the monitoring 1D scan record name
scanData.y_pv - gives the monitoring 2D scan record name
scanData.y_handshake - gives the 2D scan handshake pv name
scanData.path - specifies the last data directory accessed by the data catcher
scanData.trashcan - specifies the data file name was last used by the data catcher
scanData.envfile - specifies the environment file used by the data catcher
scanData.config - specifies the configuration file used by the data catcher
If the scanData.debug=`1' is set in the configuration file, the diagonostic status output will be printed by the data catcher in the startup terminal window.
; Generated by CATCHER_V1(R2.2.2)
scanData.pv='cha:scanRec3SC'
scanData.y_pv='cha:scanRec4SC'
scanData.path='/tmp_mnt/home/oxygen6/CHA1/test/idl/catcher'
scanData.trashcan='catch1d.trashcan'
scanData.envfile='catch1d.env'
scanData.config='catch1d.config'`
If configuration file is prepared by user, the user has to ensure that the scanData.config specified filename must be the same as the external file name.
If the 1D scan data is created by the File selection dialog then it will be saved in native binary format. If the 1D scan file is directly created by modifying the configuration file or by command line keyword specification then it will be saved in XDR binary format. Earlier versions generated data files are all in native binary format.
The 2D scan image file is always saved in native binary format.
Porting data to platform independent format please refer the following URL for data conversion.
VIEWER
How the data is recorded for 1D and 2D scan are given in this section. This will provide the user with necessary information in the case of post acquisition data processing in extracting data from the data file for non IDL applications.
For each scan the following pieces of information are recorded. They include the version number, 1D scan PV name, positioner, detector arrays, plot legends, environment arrays, etc.
labels(0:29,0:18) - stored PV names for 4 positioners and 15 detectors
labels(0:29,19:37) - stored PV descriptions for 4 positioners and 15 detectors
labels(0:29,38:56) - stored PV engineering units for 4 positioners and 15 detectors
strings(0) - Plot title
stirngs(1) - Plot x label
strings(2) - Plot y label
strings(3) - Scan data file name
strings(4) - Time stamp and user ID
strings(5) - Comment string
seqno(0) - 1D scan number, zero based sequence number
seqno(1) - 1D scan starting reference case number
seqno(2) - 2D scanning sequence number, Y loop index number
seqno(3) - 2D scan number, zero based sequence number
seqno(4) - 2D scanning indicator ( 1 is on, 0 is off)
seqno(5) - 2D scan requested number of data points
seqno(6) - 2D scan current acquired number
seqno(7) - Y positioner value at given 2D scan number
env(0:29,i) - PV name, up to 30 characters
env(30:69,i) - Value string, up to 40 characters
env(70:109, i) - Description, up to 40 characters
The scan data index file is also automatically generated by the data catcher. This index file reduces the wait time in reading and greatly improves the scan data access time of the data catcher. The index file is written in unformatted binary array by the data catcher, it contains filename, filesize, no of scans, and byte offsets array for the scans.
For 2D scan, each detector defined for the inner scan record possesses its own 2D image. Complete set of 2D images data is sequentially appended at the end of 2D scan.
name(0:59,0) - Inner scan PV name
name(0:59,1) - Outer scan PV name
name(0:59,2) - 1D data file name
name(0:59,3) - 1D scan positioner 1 PV name
name(0:59,4) - 2D scan positioner 1 PV name
name(0:59,5) - Detector 1 PV name
qno(0) - 1D scanno at the end of 2D scan
qno(1) - Image X width (1D scan requested NPTS)
qno(2) - Image Y height (2D scan actually acquired points)
qno(3) - Detector number of the 2D image
qno(4) - 2D scanno
qno(5) - Max Y height (2D scan requested NPTS)
Three types of 1D scan report can be generated: full header, abbreviated header, or no header. At the no header case only the positioner and detector arrays are listed.
The 2D ASCII file for the given image can be generated by suffix the `catch1d.trashcan.xdr.image' with zzzz where zzzz is the 4 digit image sequence number in the 2D image file. If the ASCII file already exists in the data directory the default file name view2d.data will be used.
The user interface will be discussed in the following groups: File, Setup, Plot Options, Help, ViewData, Drawing Area, Report Generation, Zoom, Statistic, Detectors, and Image menu. They are briefly described here. The purpose here is to provide the user with adequate knowledge in running this program.
In general the text field can be modified by directly typing in the field or simple text copy and paste. No text widget event generated until the carriage return is entered in the text field or some acceptance button is pressed. If the push button's label is suffixed with the `...' which implies that there is a pop up dialog window or widget application program associated with it.
The general messages generated by the data catcher are listed in the terminal window where the IDL was invoked. Wherever it is applicable, the popup message window is adopted to show self explanatory information, warning or error messages.
If no configuration file is found the following message window pops up
Note: There is no configuration file found. You first have to set up the scan PV name by using the Setup->Scan ... menuFor normal operation, a user has to first set up the scan PV name to be listened to by the data catcher. At the normal exit of data catcher the new configuration file will be created by the data catcher.
If the configuration file is found in the startup directory then the following checks will be done. At the end of initialization, the data catcher will check whether there is any scan data held in the scan record. If either the scan record is empty or the scan record is busy with data taking then the data catcher is ready for data taking right away.
If the scan record holds scan data and it is idling, and the timestamp of the scan record is newer than the last scan data set from the saved file, then the following message window
Notice: At TimeStamp = MON DD, YYYY HH:MM:SS Scan record "cha:scanRecSC" holds scanned data. If you desired, you may enter Y to save this data before you do any new scan. Get Scan Data and Save (Y/N) ? Y Accept Cancelwill pop up. If no save is to be done, just select the Cancel button right away. If the scan data is to be saved just select the Accept button , the new scan data will be saved and plot will be updated, then the data catcher will be ready for normal operation.
The File menu provides the `New', `Open', `Close', `Save As', `GetScanData + Save...', `Copy', and `Quit' options. If the user uses the script program `catcher' with file specification on the command line, he may never need to use any other option except the `Quit' to exit the data catcher program. The configuration file supersedes the command line data file specification. The File menu supersedes the configuration file data file specification.
This menu is not accessible while either the scan is going on or the view 1D dialog is opened.
For a selected file, the message window pops up and shows the path name, data file name, number of scan found. If an existing scan data file is selected, the drawing area will be updated by the last scan from the selected file, and a question to ask the user to confirm whether it is okay to append the future scan data to the selected file. The default option is appending to the file. If `N' is entered, a user will have to re-select the desired file.
The `Quit' is the only correct way of terminating the data catcher. This provides the safeguard for integrity of the data file.
At the normal acquisition mode, every item on this menu is setable by the user.
If the data catcher is started in a no save mode, then the item `AutoSave' option is not available from this menu. The data catcher can display the old scan data from the data file or display the real-time live data but it will not save the new data to the data file. When the data catcher is operated in the no save mode, a big `No Save' label will be shown on the upper right hand corner of the main window.
If the data catcher is started as a data browser, i.e. view only option, then only the item `Color ...' option is available from this menu. When the data catcher is operated in the view only mode, a big `View Only' label will be shown on the upper right hand corner of the main window.
The plot will be automatically scaled to the maximum data range plus 5% margin in both ends. The plot title and labels will be generated directly from the EPICS database. The plot will be stamped with the file name, scan number, time as the scan initiated, and the user name.
This menu consists of eight selection items: `Colors', `Lines', `Symbols', `Grid', `Err Bars', `Y scale', `Ranges ...', and `Labels ...' They provide flexible controls on the line plot for the 1D scan data.
Selects the colors or BW plot option. The Colors option reloads the rainbow plus white color table into data catcher. The defaults option is colors.
Plots data as different line style or as solid line only. It defaults to different line style.
Data plotted as line only, symbol only, or both.
Turns grid lines off or on. It defaults to grid lines off.
Turns error bar (10%) option off or on. It defaults to off.
Y axis uses linear or log scale. It defaults to linear scale.
The Help pull down menu consists of five selection items: `Version ...', `Release Note ...', `Help ...', `Catcher Html ...', and `ezcaIDL Html ...'. The last two items open netscape window and are only available at the view only mode.
Note if the netscape window is opened by this menu it temporarily grabs the control from the IDL and it interrupts the data catcher's normal execution. For normal operation of the data catcher, the user should close the netscape window right after viewing the document.
The Print pull down menu consists of two selection items: `Plot', and `Report ...'.
The Zoom pull down menu consists of five selection items: `Zoom To Box', `Zoom In/Out', `Calc Slopes', `Auto Scale (Refresh)', and `User Scale ...'. Be aware that the Zoom in the drawing area must always be terminated by the right mouse button.
Steps:
Move mouse into the drawing area
Mouse buttons function:
Left: drag the box
Middle: resize the box
Right: zoom to the box
Steps:
Move mouse into the drawing area
Mouse buttons function:
Left: zoom in to 1/2 scale
Middle: zoom out to 2 times
Right: terminate zoom in/out mode
Steps:
Move mouse into the drawing area
Mouse buttons function:
Left: pick the start point
Middle: pick the end point
Right: quit slope calc mode
The top left hand corner contains the data file name. The top right hand corner contains the scan #. The bottom left hand corner contains the time stamp when this scan started and a comment line. The bottom right hand corner contains the user name.
The plot title, xlabel, ylabel and comment can be changed by the user through using the `Plot Options->Labels ...' option. The default scan record database name, description and engineering units will be used for the plot. A user always can use the Plot Labels ... dialog to modify the plot specification at the view data mode.
The plot ranges can be automatically scaled or user specified. The default is auto-scaled, with a 5% margin. A user can use the Plot Ranges ... dialog to modify the user scale plot ranges Xmin, Xmax, Ymin, and Ymax in the user-scaled plot.
Note, if the user scale plot is selected and the data is outside the user plot ranges, then no data will be show on the plot. The data will always be properly plotted by the auto-scale plot option.
The selection button indicates whether the detector will be plotted or not. If it is pressed in, the corresponding detector data will be plotted. The default set up with detector 1 and 2 are selected.
The positioner 1 array is used for default X axis selection. If an undefined positioner array is selected by the user then the index array will be used for the X array.
Image drop list consists of `Small', `Large', and 15 detector entries. This 2D real-time image indicator will show the progressing of 2D scan. The small 2D image strip will plot each detector image in 60x60 pixels area. The large 2D image strip will plot each detector image in 120x120 pixels area. The single detector picked then the image window with 200x200 pixels shows only the image associated with the selected detector.
At 2D scanning, the small or large image pan choice contains 15 detector image area. It clearly reflects all detectors currently has been defined in scan record. Image drop list defaults to small strip.
Click the Left Mouse Button (LMB) on the drawing area will draw a cross-hair and pops up a XY-COORD dialog. It contains a label of the reference positioner number (based on the X axis), two text fields, a `GoTo ...' button, and a `Close' button. The X and Y fields show the intersection coordinates of the cross hair. Press the `GoTo ...' button pops up the set positioner locations dialog. Press the `Close' button terminates the query of cursor location.
The X field can be modified by the user through typing in the field. The `GoTo ...' dialog will reflect the final value entered in the X field.
The set positioner dialog displays a list of all the positioner location(s) corresponding to the drawing area cross-hair cursor ( or user modified X value), and a question whether to set the new motor position(s) accordingly, an `Accept' , and a `Cancel' button. If the user press the carriage return for `Y' or the `Accept' button, then a channel access array put for all the specified positioner(s) will be issued and the hardware physically drives the positioner(s) to the new location(s). The `Cancel' button closes the dialog.
It contains a row of widgets for 1D scan control, a row of widgets for 2D scan control, a row of widgets for alternate 2D scan handshake, an `Ok' button, and a `Close' button.
The `Ok' button accepts all the text fields and properly sets up the data catcher for monitoring the future scan. The `Close' button closes this dialog and let outside CA clients have sole control of scanning.
The control of scanning consists of two buttons: `Start' and `Stop'. The `Start' button initiates the 1D scan and displays the real-time plot of captured data at the drawing area. The `Stop' button aborts the scan before the normal completion of 1D scan.
The control of scanning consists of two buttons: `Start' and `Stop'. The `Start' button initiates the 2D scan and displays the real-time 1D plot of captured data at the drawing area, and pops up a detector image window to show the 2D image data. The `Stop' button aborts the 2D scan before the normal completion of 2D scan.
The plot labels dialog contains two information labels: the scan number, and the data file name. They reflects where the plot data come from. Plot setup dialog consists of four text fields which allows the user to modify the plot title, xlabel, ylabel, and comment.
The data catcher prepares the plot title, x and y labels directly form the EPICS database, they can be modified by the text fields defined in this dialog. In addition a plot comment text fields up to 60 characters can be specified.
The text field entered will be in effect by carriage return or until either the `Apply' or `Done' is pressed. The `Done' button will also close the dialog. If the `Cancel' button is pressed, it terminates the modification and closes the dialog.
It consists of Xmin, Xmax, Ymin, Ymax text fields and three push buttons. Slider bars are provided for the easy task of entering the plot ranges. A user can type directly into thes fields.
The `User Scale' button takes the X and Y ranges and replots the data. Data falls outside the plot ranges will not be shown in the user scale plot. However, in realtime mode only the Y range is used by the realtime plot.
The `Auto Scale' button re-plots the whole data range plus 5% margins.
The `Done' button closes the dialog.
View 1D yields to the real-time scanning. Scan can be initiated by any CA clients. The View 1D dialog will be automatically closed by the data catcher if the real-time scanning is detected.
As the view 1D dialog is opened, the File pull down menu is inaccessible. A user has to explicitly close the view 1D dialog, in order to access the File menu. For example, a user wants to quit the data catcher, he has to close the view 1D dialog first, then uses File->Quit menu.
View 1D dialog consists of: a label describes the current file opened for viewing, a label gives the ranges of scan data found in the file, a text field shows the selected record # from the opened file, a slider bar for selecting the desired scan record, and two sets of push buttons. They can be divided into scan selection control and output control.
The slider bar allows you freely to view any valid scan #.
Press `First' to view the scan # 1.
Press `Next' to view the next scan #.
Press `Prev' to view the previous scan #.
Press `Last `to view the last scan #.
Press `Done' to close the view mode.
The `Print Plot', `Modify Plot', `ASCII View', and `ASCII Print' buttons will be active only if the selection control has been activated and the selected scan data has been loaded into the data catcher.
Press `Print Plot' generates the postscript plot file `catch1d.ps' and sends it to the user default printer.
Press `Modify Plot' allows you to modify the plot labels according to your changes.
Press `ASCII View' saves the ASCII scan data in `<filename>.tmp' file and calls the XDISPLAY program to display the file.
Press `ASCII Print' sends the file `<filename>.tmp'to the user's default printer. It is accessible only if the `ASCII View' has been pressed for the selected scan #.
This dialog consists of 6 rows of widgets: Header Options, Data File Name, Start Scan #, End Scan #, Output File Name, Action Buttons.
If none option is selected, only the scan #, and the name, description, engineering units, data array for all defined positioners and detectors are reported.
If the abbreviated header option is selected, the version, scan record name, full path data file name, timestamp, user ID, comment are included in the ASCII data report.
If the full header option is selected, in addition of the abbreviated headers the environment variables, descriptions, values, the plot specifications are also included in the report.
The `Generate Report' button accepts the user specifications and generates the report and saves in the output file name. During the report generation, the `View Report', and `Print report' are inaccessible.
The `View Report' button runs the XDISPLAY program to view the ASCII report.
The `Print Report' button sends the ASCII report to the user's default printer.
The `Done' button closes the dialog.
The procedure for running a 1D scan is given below:
Generally a user can use other tools, e.g. medm, to initialize or reset the scan record.
database(scanRec) { record(ao, "UserID:xposController1AO") { field(FLNK, "UserID:detector1CC.PROC") field(DOL, "1") field(PREC, "2") field(DRVH, "100") field(DRVL, "-100") } record(ao, "UserID:xposController2AO") { field(FLNK, "UserID:detector2CC.PROC") field(DOL, "1") field(PREC, "2") field(DRVH, "100") field(DRVL, "-100") } record(calc, "UserID:detector1CC") { field(FLNK, "UserID:dwellDelayPD.PROC") field(CALC, "90*(SIN(a))") field(INPA, "UserID:xposController1AO.VAL NPP MS") field(INPB, "1") field(PREC, "1") } record(calc, "UserID:detector2CC") { field(FLNK, "UserID:dwellDelayPD.PROC") field(CALC, "(a>10)&&(a<20)?b*TAN(a):0") field(INPA, "UserID:xposController2AO.VAL NPP MS") field(INPB, "1") field(PREC, "1") } record(pulseDelay, "UserID:dwellDelayPD") { field(UNIT, "Milliseconds") field(DLY, "10") field(WIDE, "0.2") field(TTYP, "Software") field(STV, "Enable") field(PREC, "3") } record(scan, "UserID:scanRecSC") { field(EVNT, "5") field(SCAN, ".1 second") field(PRIO, "HIGH") field(MPTS, "512") field(P1PV, "UserID:xposController1AO") field(P2PV, "UserID:xposController2AO") field(D1PV, "UserID:detector1CC") field(D2PV, "UserID:detector2CC") field(NPTS, "101") field(P1SP, "0.") field(P1EP, "10.") field(P2SP, "10.") field(P2EP, "20.") } }
At the normal termination of data catcher, the configuration file and data index file will be automatically updated.
To restore the damaged file the following procedure should be taken:
1)Make sure to access the developer license version of data catcher ( in run time version no IDL prompt is allowed.) catcher -D 2) To get the IDL> prompt at the IDL session window by typing in the Cntl-C and then point the mouse to any of the data catcher window Cntl-C 3) Determine the number of good 1D scans saved in the file (Starting from data catcher R2.2 the newly created data file will be saved in XDR format). The keyword /XDR is required if the data was saved in XDR format. IDL> u_openr,unit,'catch1d.dat' [,/XDR] IDL> salvage_read,unit,no Note: A list of scans successfully read in by the salvage_read is printed in the IDL session 4) Salvage the file up to the very last scan successfully read in IDL> salvage_trashcan_problem,'catch1d.dat',no IDL> u_close,unit Note: A new file `catch1d.dat' will be created and the original damaged file will be renamed as `catch1d.dat.bk' 5) Remove the corresponding old index file and restart the data catcher IDL> $rm `catch1d.dat.index' IDL> retall IDL> xmanager
Assigns the configuration file to be used. The file name should begin with an alphabetic character and must separate with the option keyword -c(onfig) with a blank space.
If this option is not specified, the default file `catch1d.config' will be used. At the normal completion a new version of configuration will be saved or updated in the directory where the data catcher was invoked.
-d file.data
Assigns the acquisition data file to be used. The file name should begin with alphabetic character and must separate with the option keyword -d(ata) with a blank space.
If this option is not specified, the default file `catch1d.trashcan' will be used. If the configuration file exists, then the data file specified in the configuration file overrides this default.
-e file.env
Assigns the environment file to be used. The file name should begin with alphabetic character and must separate with the option keyword -e(nv) with a blank space. This file allows additional environment variables to be saved with the acquired scan data.
If this option not specified, the default file `catch1d.env' will be used. The default directory of the environment file is the same as that the data catcher is invoked. If the same name environment file is found in the data directory then that file overrides the default one.
-h
Gives the command line help page.
-n
Starts the data catcher in no save mode, new scan data will be displayed in this mode but they will not be saved in the data file. Normally when there is another copy of data catcher already running with default setting and a user has to examine the saved or life data on another session he can use this option. The configuration file will not be updated if this -n(osave) option is specified on command.
-v
Starts the data catcher as view only mode, in this mode the data catcher can only access the view old data functions. It will not listen to the new scan data at all. Normally it is assumed that there is no data acquisition to be done by this option. The configuration file will not be updated for this -v(iewonly) operation mode.
-D
This option overrides the using of default IDL run time license by the developer IDL license at APS.
catcher -D
Start with default settings
catcher
Start as view only
catcher -v
Override the default setting for config, env, and data file, the `test' is used for this example
First time creation:
catcher -c test.config -d test.data -e test.env
Restart with the configuration file `test.config':
catcher -c test.config
Currently, this program can capture both 1D and 2D scan data through setting monitor on the EPICS scan record. During data acquisition it also provides real-time plotting. Post acquisition it also provides primitive 1D and 2D post data plot and analysis. Each scan record can support up-to four positioners and fifteen detectors."
Specifies the configuration file to be saved when data catcher is normally terminated. If not specified, the default configuration file name `catch1d.config' is assumed.
DATA='data.file'
Specifies the data file name to be used for appending new captured scan data. If not specified, the default data file name `catch1d.trashcan' is assumed.
ENVFILE='env.file'
Specifies the environment (process variables) file to be saved with the captured scan data. If not specified, the default environment file name `catch1d.env' is assumed.
NOSAVE=n
Specifies whether the data catcher should be started in a nosave mode. If n=1 no save is turned on.
VIEWONLY=v
Specifies whether the data catcher should be started as a data browser only. If v=1 then viewonly is assumed.
GROUP=group_leader
The widget ID of the group leader of the widget. If this keyword is specified, the death of the group leader results in the death of catcher_v1.
A simplified UNIX script file catcher can be used for starting up this program. For help on catcher enter "catcher -h" at the UNIX prompt.
IDL> catcher_v1
Start as view only
IDL> catcher_v1, /viewonly
Override the default setting for config, env, and data file, the `test' is used for this example.
First time creation:
IDL> catcher_v1, config='test.config', envfile='test.env', data='test.data'
Restart with the configuration file `test.config'
IDL> catcher_v1, config='test.config'
Currently, this program provides TV, SURFACE, CONTOUR, SHOW3, and XSURFACE plot. It also provides simple xz, yz line plot and data value query information.
The widget ID of the group leader of the widget. If this keyword is specified, the death of the group leader results in the death of view2d.
FILE='image.file'
The input image file name. If this keyword is specified, the file should contain the image data which must be in the data catcher created format. If it is not specified, view2d assumed that the default file `catch1d.trashcan.image' is used. A user can use the file open menu to specify the desired input image file.
The window generated by this routine will be re-sizable by the window manager.
Depress the `Print' button will generate a postscript copy of the graph.
Normally it accepts two parameters X and Y. If the first parameter is not used then the data array is plotted on the ordinate versus the point number on the abscissa. Multiple curves (or variables) can be stacked into the second parameter as a two dimensional array, the first dimension gives the number of data points in each curve, the second dimension gives the number of curves to be plotted.
The vector array for X abscissa.
Y
The Y data array for curve plot. The Y array can contain more than one curve, the first dimension gives the number of data to be plotted for the curve, the second dimension gives the number of curves to be plotted.
Optional output. The widget ID of the top level base returned by the PLOT1D.
ID_DRAW
Optional output. The widget ID of the drawing area used by the PLOT1D.
Set this keyword to specify the plot title string.
XTITLE = `x label'
Set this keyword to specify the xtitle string.
YTITLE = `y label'
Set this keyword to specify the ytitle string.
COLOR=n
Set this keyword to specify the color number used in the plot routine.
SYMBOL=1
Set this keyword to specify data plotted as symbol, set to -1 data plot as symbol and connected with line.
XLOG=1
Set this keyword to specify a logarithmic X axis.
YLOG=1
Set this keyword to specify a logarithmic Y axis.
XRANGE=[xmin, xmax]
Set this keyword to specify the desired data range for the X axis.
YRANGE=[ymin,ymax]
Set this keyword to specify the desired data range for the Y axis.
XMARGIN= [left, right]
Set this keyword to specify the left and right margin, default xmargin=[10,3]
YMARGIN=[top,bottom]
Set this keyword to specify the bottom and top margin default ymargin=[5,3]
THICK=n
Set this keyword to specify the line thickness for the axes and the line plot.
LINESTYLE=1
Set this keyword to turn on different line style used.
XSTYLE
Set this keyword to control x axis in IDL plot routine.
XSTYLE
Set this keyword to control Y axis in IDL plot routine.
LEGEND=legends(n_curve)
Set the legend strings corresponding to curves drawn.
XYLEGEND=[xloc, yloc]
Set the x, y location of the legend strings,% from the lower left corner from the graph window, default xylegend=[0.75, 0.35].
COMMENT=footnotes(n)
Set this keyword to write n lines of footnotes on the graph.
STAMP=1
Set this keyword to put the time stamp and user ID on the plot.
WTITLE='wtitle'
Set this keyword to specify the window title string, default to `Plot1d'.
WIDTH=width
The initial window width at the creation time, which default to 250 pixel.
HEIGHT=height
The initial window height at the creation time, which default to 250 pixel.
GROUP=group_leader
The widget ID of the group leader of the widget. If this keyword is specified, the death of the group leader results in the death of plot1d.
BUTTON=1
Set this keyword if no print and close buttons to be created by the plot1d.
CLEANUP=1
Set this keyword the plot1d window can only be destroyed by the close button not by the window manager.
IDL> x = !pi * indgen(100)/25
IDL> PLOT1D, x, sin(x)
Create a re-sizable line plot with title specifications.
IDL> PLOT1D, x, sin(x), title='title', xtitle='xtitle', ytitle='ytitle'
Plot two curves with different line style and legend at default location.
IDL> x=indgen(100)
IDL> y=make_array(100,2)
IDL> y(0,0)=sin(x * !pi / 50)
IDL> y(0,1)=cos(x * !pi / 50)
IDL> PLOT1D,x,y,legend=[`line1','line2'],/linestyle
Same as the above example plus symbol and a specified legend location.
IDL> x=indgen(100)
IDL> y=make_array(100,2)
IDL> y(0,0)=sin(x * !pi / 50)
IDL> y(0,1)=cos(x * !pi / 50)
IDL> PLOT1D,x,y,/linestyle,symbol=-1, $
legend=[`line1','line2'], xylegend=[0.5,0.9]
Plot x, y array plus two lines of comment and a time stamp on the graph.
IDL> PLOT1D,x,y,comment=[`Comment line1','Comment line2'], /stamp
References
/usr/local/epics/extensions/doc/ezcaIDLRef.html
http://www.aps.anl.gov/asd/controls/epics/EpicsDocumentation/WWWPages/EpicsFrames.html