EPICS / IDL EXTENSIONS TOOLS

by Ben-chin Cha
IDL_PROGRAMS - Setup Requirement, Download, Reference Library and Object Reference Library
Image Processors, Postscan Browsers, EPICS/IDLVM Package
CA TOOLS - Unix CA, Window CA, ezcaIDL

CATCHER PACKAGE [TOC]

User's Guide for Data Catcher (html, pdf, ps)

by Ben-chin Cha, Tim Mooney, and Ned Arnold (March 1998-Draft)

An EPICS data acqusitions tool written in IDL language. It is able to monitor 1D or 2D scan. It displays close to realtime plot during scanning. It provides various 1D and 2D plot features and ASCII report generation.

It supports the EPICS 3.12.2 or newer release of scan record. It requires IDL R5.0 or newer. It only been fully tested on Sun4 and Solaries.

VIEWER [TOC]

User's Guide for Downloading Data Viewer

by Ben-chin Cha (7/97-Draft)

Data viewer is an IDL widget program package specially written for the data catcher. It operates on the same set of data files generated by the data catcher. It provides the same set of 1D and 2D scan data viewing, plotting and reporting features. It is targetted for any operating system and no EPICS channel access function calls are involved.

Viewer accepts XDR or native binary data and should run on any platform which IDL supports. Viewer provides an optional feature of converting the native binary data captured at APS into platform independent XDR binary data. It has been fully tested on UNIX and W95 operating systems.

Scan Browser [TOC]

User's Guide for Scansee

User's Guide for SB

Scan browser uses IDL object programming and provides various data extracting and displaying methods for the 1D/2D/3D scan data saved by the IOC in the XDR format. It supports up to 85 detectors. The object type used is called "SCANSEE". The array size is limited by IDL, it can not handle very large image.

To access scan browser on the Unix system just enter the following at the unix prompt:

SB

The complete system consists of the following files. At APS, they are installed in the /usr/local/epics/extensions/bin/solaris directory.

    SB               - Unix script file, it automatically sets up the 
                       IDL and runs the scanSee object
    os.init          - A system dependent file shared by IDL programs 
                       developped at XFD/BCDA.
    ez_fit.pro       - ez_fit program 
    scan2d_roi.pro   - scan 2D ROI widget program
    multiroi_pick.pro - multiple 2D ROI widget program
    read_scan.pro.R2 - IDL routines read the XDR data array saved by the
                       IOC scan software
    readScan.pro.R2  - IDL routines read and allocate the data array 
    scanSee__define.pro.R2  
                     - ScanSee type object program 
    scanSee.pro      - ScanSee 1D/2D/3D scan driver widget program


EZ_FIT [TOC]

User's Guide for Ez_Fit

by Ben-chin Cha (10/17/97)

Ez_Fit integrates various IDL line fitting routines into one single package. It provides the IDL user with a very easy to use line fitting tool. It is a standalone widget application. It can be easily plug into any other IDL program.

It accepts 1D or 2D arrays either directly from the command line or from the input 1D or 2D XDR binary file. It can also accept the spreadsheet column type ASCII input file.

It displays the input data as rows of TV image. It allows the user to select any vector from the TV image and perform any fitting method he/she picks. It lets the user easily get the hardcopy of fitting graph and tabulated data.

It runs under both IDL R4.0.1b or IDL R5.0. It only been fully tested on Sun4 and Solaries. It should also run under W95.

IDL PROGRAMS [TOC]

by Ben-chin Cha ( Updated April 1999)

All IDL programs are installed in the /usr/local/epics/extensions/bin/$HOST_ARCH directory. For proper operation of these programs, a user first has to make sure that the IDL 5.1 or later is used. For example, use IDL 5.2 release, set the following :

     source /usr/local/rsi/idl_5.2/bin/idl_setup

Setup Requirement

In order to access IDL programs installed in the local epics/extensions/bin, a user has to make sure that the following two environment variables are set before invoking IDL :
     setenv EPICS_EXTENSIONS  /usr/local/epics/extensions 

     setenv IDL_STARTUP $EPICS_EXTENSIONS/bin/$HOST_ARCH/viewer_startup.pro 
and make sure the directory /usr/local/epics/extensions/bin/$HOST_ARCH is in his/her IDL search path.

Setup for IDL Channel Access

For EPICS 3.14
It requires that all the channel access sharable libraries are built with EPICS 3.14.5 and newer release. If the IDL Channel Access commands are desired then the following setup must be done first before running IDL 6.0:
 
     source /usr/local/epics/extensions/bin/$EPICS_HOST_ARCH/ezcaidl_setup
 
At APS for EPICS3.14.X the EPICS_HOST_ARCH is set to 'solaris-sparc'.
For EPICS 3.13
It is assumed that that all the channel access sharable libraries are built with EPICS 3.13.1 and newer release. Make sure that the /usr/local/epics/extensions/lib/$HOST_ARCH is defined in his/her LD_LIBRARY_PATH environmental variable. If the IDL Channel Access commands are desired then the following setup must be done first before running IDL 5.5:
 
     source /usr/local/epics/extensions/bin/$HOST_ARCH/ezcaidl_setup
 
At APS for EPICS3.13.X the HOST_ARCH is set to 'solaris'.

Extended IDL Reference Library [TOC]

  • PS_OPEN ... Routines for PostScript plots
  • U_READ ... Routines for unformated binary I/O
  • PLOT1D A general purpose 1D multi-line plot program
  • PLOT2D A general purpose 2D plot program
  • CATCHER_V1 ... Catcher program
  • DCVIEWER ... Data viewer frontend program
  • VIEW1D ... View1d program
  • VIEW2D ... View2d program
  • VIEW1D_OVERLAY View1d Overlay program
  • EZ_FIT ... Ez_fit program
  • TOIMAGE ... ToImage program
  • SCAN2D_ROI ROI program for 2D array
  • MULTIROI_PICK Multiple ROIs program for 2D array
  • CALIBRATION Calibration program for 2D image arrays

    Extended IDL Object Reference Library [TOC]

    by Ben-chin Cha ( Updated 05/02/01)

  • SSCAN ... Class object method for accessing scanSee MDA data directly saved by IOC software

    The above object class is specially written for providing interfacing methods to access the scan data by the other IDL programs. A user can directly load them into his/her IDL program, and he/she should be able to access the scan data freely.

  • SCAN1D ... Class object method for accessing catcher 1D scan data

    Accessing the data catcher acquired 1D data without running the catcher or viewer, the scan1d object classes is specially written for this purpose. A user can directly load them into his/her IDL program, and he/she should be able to access the scan data freely.

  • SCAN2D ... Class object method for accessing catcher 2D image data
    PanImage - Pan images for a given 2D scan # of a 2D scan object
    Overlay - Overlay images for a given 2D scan # of a 2D scan object
    BindImage - Combine images of two different 2D scan # and saved as a new image file
    Tiff/Gif - Read/Write TIF/GIF files for a specified list of images of a 2D scan object

    The scan2d object class is specially written for providing various methods of accessing 2D scan data saved by the catcher. A user can directly load them into his/her IDL program, and he/she should be able to access the scan data freely.

  • NX ... NX Class Object for Accessing the HDF file

    The NX object class privides generic methods for accessing the Nexus/HDF data.

  • OBJ_CLEAN ... Flexible routine for cleaning up IDL objects

    This program provides the user a general purpose IDL Object Cleanup Utility program.


    View2d Interface with AIM: [TOC]

    For information about the image analysis program AIM please refer the following URL:
            http://www.llnl.gov/adiv/projects/aim/ 

    Starting from R2.3a of view2d it provides a new feature of saving a 2D image in the AIM accept save file format. The filename used by the save file is called 'dc2aim.sav' which will be saved in the current working directory where idl is invoked. The image data saved can be directly loaded into AIM program.

    Following steps show how to interface view2d with AIM.

    	-- Setup environments and start up AIM --
    
    setenv IDL_PATH $IDL_PATH':'~cha/epics/extensions/bin/solaris
    setenv IDL_PATH $IDL_PATH':'~dejus/idl/user_contrib/aim_files
    
    
    idl			; invoke IDL from the UNIX prompt
    IDL> aim		; start the AIM program
    
    	-- Use view2d find the desired 2D image --
    
            File->Stop      ; depress File->Stop button in the AIM main window 
    			  will activate the IDL prompt 
    IDL> view2d & retall	; this will load view2d program into IDL 
    	File->Open      ; on view2d  (R2.3a) main window
    				select the desired data catcher 2D image file
    				pick the desired 2D image to be viewed
    				by AIM
    	File->Save Image for AIM    
    			; save the picked image in 'dc2aim.sav' IDL save file
    				in the current working directory
    	File->Quit	; terminate view2d program
    IDL> dc2aim		; get image ncol and nrow info and return to AIM
    			        program main window
    
    	-- Load dc2aim.sav into AIM --
    
    	Open file			; press button in the AIM main window 
    	File type -> IDL save 		; press button in the aim_open window
    						select 'IDL save'
    	Open -> dc2aim.sav		; press Open file selection in the 
    						aim_open window
    						select the 'dc2aim.sav' file
    
    The 2D image will be shown in the AIM main window, then you are ready to
    use any feature of AIM with the newly loaded in image.
    
    You may repeat the steps 'File->Stop' to 'Open->dc2aim.save'    to load
    any desired image from the data catcher 2D image file into AIM.
    
    Hint: Always use the 'File->Stop' from the main AIM main window 
          to activate the IDL prompt , and use the 'retall' at the 
          IDL prompt to activate the widget application.
    
    

  • EZCAIDL & UNIX CA TOOLS [TOC]

    User's Guide for ezcaIDL

    by Mark Rivers (12/12/2012).

    User's Reference Guide for ezcaIDL

    A channel access package for PvWave / IDL which provides channel access interface routines for single or list of process variables. Original written by Mark Rivers, extended by Ben-chin Cha.

    User's Guide for CA Commands

    by Ben-chin Cha (Draft, Modified August 1999)

    A user's guide for channel access commands caget, caput, caGet1, caPut1, caInfo, caInfo1

    Because window PC can not discriminate the difference between the lower case and upper case, e.g. caget/caGet , in order to support the window PC the command name for caGet, caPut has been renamed to caGet1, caPut1. Please refer the on-line help on command syntax.



    User's Guide for aps_wish

    by Ben-chin Cha (6/97-Draft)

    aps_wish provides the TK/TCL users with a set of channel access user interface commands. It can be easily built with epics extensions. To access source codes please directly contact Ben-chin Cha.


    User's Guide for caWingz

    by Ben-chin Cha (4/94)

    A channel access package for Wingz which provides channel access interface routines for single or list of process variables.

    Tim Mooney
    [email protected].
    Last modified 05/01/01
    index