Extended IDL Help

sscan.pro

At APS this program is installed in /usr/local/epics/extensions/idllib directory for R3.14. This program allows the user to view any 1D/2D/3D scan MDA files. This program can be directly plugged into any IDL program.

List of Routines


Routine Descriptions

READ_SCAN

[Next Routine] [List of Routines]
 NAME:
       READ_SCAN

 PURPOSE:
       This function reads any 1D/2D/3D scan file and returns a scan pointer 
       paramenter which consists of few heap pointers to point to the data 
	extracted from the MDA scan file.
 
       If succeeds, it returns the scan number, otherwise it returns -1.

 CATEGORY:
       Function.

 CALLING SEQUENCE:

       scanno = READ_SCAN(Filename,Scan, ...)

 INPUTS:
       Filename:    Input XDR scan filename
 
 KEYWORD PARAMETERS:
       DUMP :  Set this keyword to specify the plot title string.

       PICKDET: Specify the detector # , if specified only the 3D array
                for the specified detector is returned 
                If -1 is specified, no 3D data array is returned for
                the 3D scan
       LASTDET: [1,1,1] set the initial temp detector numbers for
                3D scan record, it returns the last detector # 
                defined in each scan record
                If pickDet is defined, then the lastDet[0]=1 will be 
                returned for 3D scan
       HEADER: Set this keyword to specify the xtitle string.

 OUTPUTS:
       SCAN: The scan data structure composed of heap data pointers.
             
             scanno   -  integer pointer of scan number
             dim      -  integer pointer of scan dimension 
             npts     -  pointer of requested data point vector (dim)
             cpt      -  pointer of current data point vector (dim)
             id_def   -  pointer of defined Pi & Di integer array (85,dim)
             pv       -  pointer of PV names string array  (85,dim)
             labels   -  pointer to PV labels string array (85*3,dim)
             pa       -  pointer to positioner array pointer  (dim)
             da       -  pointer to detecor array pointer  (dim)

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
 RESTRICTIONS: Required scan filename which is automatically saved
               by the scan record by IOC. The filename follows the
               special sequential rule which is ended with '.scan' type.

 EXAMPLES:
         filename = '/home/beams/CHA/data/xxx/cha:_0001.scan'
         scanno = read_scan(filename,Scan)
          
 MODIFICATION HISTORY:
       Written by:     Ben-chin K. Cha, July 27, 2004.

(See sscan.pro)


SSCAN

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	SSCAN

 PURPOSE:
	This program allows the user to view any 1D/2D/3D scan MDA file
	generated by the sscan record. It let the user easily to access any 
	1D/2D/3D data and display the data graphically. It provide various
	graphic output features and provide simple 1D/2D analysis tools.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	SSCAN [,FILE=file, GROUP=group]

 INPUTS:
	None.

 KEYWORD PARAMETERS:
	FILE:	specify the input MDA file name
	GROUP:  specify the parent widget ID
	
 OUTPUTS:
	None.

 SIDE EFFECTS:
	The appropriate subprograms image2d, view3d_2d, scan2d_roi,...
	will be popped up for extracted data arrays.

 MODIFICATION HISTORY:
        Written by:     Ben-chin K. Cha, July 27, 2004.

(See sscan.pro)


SSCAN_READ

[Previous Routine] [List of Routines]
 NAME:
	SSCAN_READ

 PURPOSE:
	This routine returns the SSD data structure of an input MDA file.  
	If no file specified on the command line a MDA file selection dialog 
	pops up.

 CATEGORY:
	Widget.
	
 CALLING SEQUENCE:
	SSCAN_READ, SSD [,FILE=file, ...]

 INPUTS:
 	None.

 KEYWORD PARAMETERS:
	FILE:	specify the known MDA input file
		If file is given no file selection dialog pop up 
	PATH:	specify the MDA directory for the file selection dialog
		If not specified, current working directory assumed
	ECHO:   if specified the appropriate plot window pops up
	PICK3D: specify the 3D data seq # , default is 0
 	HEADER: if specified only the complete set of scan headers are read
	DATA:	extract data array from the file
	ERROR:  read error indicator, 0 - success, -1 - fail
	ZSLICE: specify the slice number from the data array, default 1

 RESTRICTION:
	The MDA file must be XDR file created automatically by the sscan
	record.

 OUTPUTS:
	SSD:	returns the data structure extracted from a MDA file

 MODIFICATION HISTORY:
	Written by: 	Ben-chin K. Cha, July 27,2004

(See sscan.pro)