NAME:
BOX_CURSOR
PURPOSE:
Emulate the operation of a variable-sized box cursor (also known as
a "marquee" selector).
CATEGORY:
Interactive graphics.
CALLING SEQUENCE:
BOX_CURSOR, x0, y0, nx, ny [, INIT = init] [, FIXED_SIZE = fixed_size]
INPUTS:
No required input parameters.
OPTIONAL INPUT PARAMETERS:
x0, y0, nx, and ny give the initial location (x0, y0) and
size (nx, ny) of the box if the keyword INIT is set. Otherwise, the
box is initially drawn in the center of the screen.
KEYWORD PARAMETERS:
INIT: If this keyword is set, x0, y0, nx, and ny contain the initial
parameters for the box.
FIXED_SIZE: If this keyword is set, nx and ny contain the initial
size of the box. This size may not be changed by the user.
MESSAGE: If this keyword is set, print a short message describing
operation of the cursor.
OUTPUTS:
x0: X value of lower left corner of box.
y0: Y value of lower left corner of box.
nx: width of box in pixels.
ny: height of box in pixels.
The box is also constrained to lie entirely within the window.
COMMON BLOCKS:
None.
SIDE EFFECTS:
A box is drawn in the currently active window. It is erased
on exit.
RESTRICTIONS:
Works only with window system drivers.
PROCEDURE:
The graphics function is set to 6 for eXclusive OR. This
allows the box to be drawn and erased without disturbing the
contents of the window.
Operation is as follows:
Left mouse button: Move the box by dragging.
Middle mouse button: Resize the box by dragging. The corner
nearest the initial mouse position is moved.
Right mouse button: Exit this procedure, returning the
current box parameters.
MODIFICATION HISTORY:
DMS, April, 1990.
DMS, April, 1992. Made dragging more intutitive.
June, 1993 - Bill Thompson
prevented the box from having a negative size.
04-18-96 bkc Made the box color more visible.
05-28-98 bkc Reset bounding box color
(See vw2d.pro)
NAME:
FUNCTION READ_SCAN,Filename,Scan,Dump=Dump,LastDet=LastDet,PickDet=PickDet,Header=Header
PURPOSE:
This function read any 1D/2D/3D scan file and returns a scan pointer
which consists of few heap pointers to point to the data extracted
from the XDR scan file.
If succeed it returns the scan number, otherwise it returns -1.
CATEGORY:
Function.
CALLING SEQUENCE:
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: Originally written by Eric Boucher
Modify and extended by Ben-chin K. Cha, Mar. 7, 2001.
(See vw2d.pro)
NAME:
VW2D
PURPOSE:
This program provides the EPICS user a convenient IDL 2D scan data
display tool. Its input image file is automatically saved by the
data catcher program CATCHER_V1.
Currently, this program provides TV, SURFACE, CONTOUR, SHOW3, PLOT2D
and SHADE_SURF plot. It also provides simple xz, yz line plot and data
value query information.
CATEGORY:
Widgets.
CALLING SEQUENCE:
VW2D
INPUTS:
None.
KEYWORD PARAMETERS:
GROUP: 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 VW2D.
FILE: The input image file name. If this keyword is specified, the
file should contain the image data must be in the data catcher
created format.
CA: If this keyword is specified, reset 2D positioners is possible
DNAME: If specified, the danme will be used instead of default names
OUTPUTS:
It provides option of postscript plot of drawing area.
COMMON BLOCKS:
None.
RESTRICTIONS:
Drawing area is 460 x 400 pixels.
PROCEDURE:
This program is available as an epics/extensions tool. It can be
directly accessed from the view data menu of the scanSee - DC.
EXAMPLE:
VW2D
MODIFICATION HISTORY:
Written by: Ben-chin K. Cha, 02-27-96.
10-19-98 bkc R3.13.1 new XDR save format
12-04-98 bkc R1.2
Fix the 2D image width problem due to aborted 2D scan
12-15-98 bkc Use color shade values for shade_surf plot
01-12-99 bkc Fix TV plot of Step # option
Fix the problem in plotting the last detector
03-04-99 bkc R1.2b
Replace xsurface by plot2d...
04-09-99 bkc Add color bar
06-09-99 bkc R1.2c
Add 2D ROI statistic menu
02-15-00 bkc R1.2d
Fix problem of saving ascii files, use ASCII subdirectory
Save tiff,gif file in the TIFF, GIF subdirectory
Use default xmax, ymax index
Add caput buttons for 2D positioner setting
Add submenu FWHM on Y, FWHM on DY/DX
04-20-00 bkc R1.2e
Strip out read_scan.pro readScan.pro
06-29-00 bkc R2.0
Support 85 detectors
08-19-00 bkc R2.0.1
Detector name default to database definition
11-19-00 bkc R2.1
Support various sublist of panImage strips
Dynamic picking the sublist of panImage
The GIF is replaced by XDR, IDL 5.4 does not support GIF
02-09-01 bkc R2.2
Created with new version of read_scan.pro.R2
Fix the renew image region
05-29-01 bkc R2.3
Accept both '.scan' or '.mda' suffix for scan files
Add format control on 2D image ASCII data display
06-07-01 bkc R2.4
Assign detector name allowed on command lines
scan2d_roi allow save and read filter range
Mutiroi_pick can read the fileter ROI from scan2d_roi
ScanSee_overlay 1D scan plot is available
06-27-01 bkc R2.5
Add pickx into vw2d
03-08-02 bkc R2.5.1
-Use RMB zoom to set new 2D scan ranges of interest
-Add XL,XR,YL,YR, and Set button for setting new
2D scan ranges.
-Remove YZ, XZ probe
04-22-02 bkc -Remove loadct,39 in os.init, so it remember the last
color table loaded into scanSee
-Modify the user interface for the Image Color Scheme
Close of Image Color Scheme returns autoScaled mode
-Replace D1-DF group button by list widget
-Include X,Y,Z data ranges in saving XDR image
-Fix scan setup allows any scan record name
09-10-02 bkc -R2.5.2
Update the read_scan routine
03-03-03 bkc -R2.5.3
Add timestamp to scan structure
(See vw2d.pro)
NAME:
XSURFACE
PURPOSE:
This routine provides a graphical interface to the SURFACE and
SHADE_SURFACE commands. Different controls are provided to change
the viewing angle and other plot parameters. The command used to
generate the resulting surface plot is shown in a text window.
CATEGORY:
Widgets.
CALLING SEQUENCE:
XSURFACE, Data
INPUT PARAMETERS:
Data: The two-dimensional array to display as a wire-mesh or
shaded surface.
KEYWORD PARAMETERS:
GROUP: The widget ID of the widget that calls XSURFACE. When this
keyword is specified, the death of the caller results in the
death of XSURFACE.
SIDE EFFECTS:
The XMANAGER is initiated if it is not already running.
RESTRICTIONS:
XSURFACE does not accept any of the keywords that the IDL command
SURFACE does.
PROCEDURE:
Create and register the widget with the XMANAGER and then exit.
MODIFICATION HISTORY:
Created from a template written by: Steve Richards, January, 1991.
02-12-96 BKC Modify the Xsurface, returned the base widget ID,
which provides a handle for the calling program
and such that can be managed by the calling program
(See vw2d.pro)