Extended IDL Help

sscan__define.pro

At APS this program is installed in /usr/local/epics/extensions/idllib directory for R3.14. This program allows the user to use ssscn object to access or view any 1D/2D/3D data array from the MDA scan files.

In order to access sscan object from other IDL program, a suser has to make sure the following environment variable is set before invoking IDL:

      setenv EPICS_EXTENSIONS  /usr/local/epics/extensions 
      setenv IDL_STARTUP $EPICS_EXTENSIONS/idllib/viewer_startup.pro 
This program can be accessed directly from the IDL prompt. An example of using IDL to create an sscan object, and then use the object method image2d to access the 2D images are given below:
    idl
    IDL> @os.init
    IDL> loadct,39
    IDL> .run sscan__define
    IDL> file='/home/beams/CHA/Yorick/data/2idd_0002.mda'
    IDL> v = obj_new('sscan',file=file)
    IDL> v->image2d

List of Routines


Routine Descriptions

SSCAN::DET

[Next Routine] [List of Routines]
 NAME:
 	sscan::det

 PURPOSE:
	This method returns the defind detects for the specified rank.

 OUTPUT:
	ID_DEF:	returns the indicator vector of defined detectors
	IP_DEF:	returns the indicator vector of defined positioners
	
 KEYWORDS:
	RANK:	specify the axis rank, default is same as the scan dimension

 EXAMPLE:
	This example returns the indicater vector of defined vector of the rank 2
	v->det,id_def,rank=2

(See sscan__define.pro)


SSCAN::GET

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
 	sscan::get

 PURPOSE:
	This method allows the user to extract scan data info of an opened mda 
	scan file through using the keyword specifications.

 CALLLING SEQUENCE:
	Obj->[sscan::]get,DA1D=da1d,DA2D=da2d,...

 KEYWORD:
  PA1D	    -	extract positioner vector array of outer most scan 
  PA2D	    -	extract positioner vector array of inner scaan 
  PA3D	    -	extract positioner vector array of inner most scan
  DA1D	    -	extract detector 1D vector array
  DA2D	    -	extract detector 2D image array
  DA3D	    -	extract detector 3D volume array
  LABELS   -	extract name,desc,units labels[89*3,3] of 4PIs+85DIs 
  ID_DEF   -	extract indicator id_def[89,3] of defined 4PIs+85DIs 
  RANK     -   return dimension or rank of scan
  XDESC    -	extract X positioner description 
  YDESC    -	extract Y positioner description
  ZDESC    -	extract Z detector names description

 EXAMPLE:
	In this example extracts the 8th image from the 2D data array from the 
	/home/beams/CHA/Yorick/data/2idd_0002.mda file, then displays the 
	extracted image by the plot2d program. 

	v = obj_new('sscan',file='/home/beams/CHA/Yorick/data/2idd_0002.mda')
	v->get,da2d=da2d
	im = da2d(*,*,7)
	plot2d,im
	

(See sscan__define.pro)


SSCAN::IMAGE2D

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sscan::image2d

 PURPOSE:
	This method allows the user to use mouse-drive image2d program to 
	analyze any 2D image arrray extracted from a 2D/3D scan mda file.
	User can easily access ROI, Calibration, panimage subprograms.

 CALLING SEQUENCE:
	Obj->[sscan::]image2d

 EXAMPLE:
	v = obj_new('sscan',file='/home/beams/CHA/Yorick/data/2idd_0002.mda')
 	v->image2d

(See sscan__define.pro)


SSCAN::INIT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sscan::Init

 PURPOSE:
	This function create a sscan object from a selected mda file. If
	file name keyword is not specified then the mda file selection 
	dialog will be used to select the desired mda file.
	The object created can be used by various methods defined in the
	program.

 CALLING SEQUENCE:
	Obj = obj_new('sscan' [,FILE=file ,PATH=path,...])

 KEYWORD:
   file  - specifies input mda file used
   path  - dialog_pickfile will be used to select the mda file with
           specified path directory
 HD_pos  - returns array of positioner info
 HD_det  - returns array of detector info 
 HD_trg  - returns array of trigger info 

 EXAMPLE:
 	This example creates a sscan object v with known mda file:

	   v = obj_new('sscan',file='/home/beams/CHA/data/xxx/cha_0001.mda')

	This example first uses the file selection dialog to pick a mda file 
	from the specified path directory, then creates a sscan object for 
	the selected file:

	   v = obj_new('sscan',path='/home/beams/CHA/data/xxx')

(See sscan__define.pro)


SSCAN::PANIMAGE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sscan::panimage

 PURPOSE:
	This method allows the user flexiblely to display the panimage of the 
 	2D data array extracted from a 2D/3D scan mda file. A user can easily 
	generate the panimage output in various combination and format.

 CALLING SEQUENCE:
	Obj->[sscan::]panimage

 EXAMPLE:
	v = obj_new('sscan',file='/home/beams/CHA/Yorick/data/2idd_0002.mda')
 	v->panimage

(See sscan__define.pro)


SSCAN::PLOT1D

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sscan::plot1d

 PURPOSE:
	This method allows the user to use plot1d to view the extracted
	1D array from any 1D/2D/3D scan mda file. By default, all the 
	detectors defined will be plotted by plot1d. A user has great
 	flexibility in plot re-configuration by pressing the PlotOptions...
 	dialog.

 CALLING SEQUENCE:
	Obj->[sscan::]plot1d [,SCAN=scan]

 KEYWORD:
 	SCAN:	specify the 2D/3D zero based scan index number (applicable
		to 2D/3D scan only)
		If specified, then the 1D array extracted from the 
		da2D array is plotted.
		If not specified, by default the da1D array is plotted.

 EXAMPLE:
	Following example extracts all the detectors from the da1D data array 
	from the  given scan mda file  

	  v = obj_new('sscan',file='/home/beams/CHA/Yorick/data/2idd_0002.mda')
 	  v->plot1d

	Following example extracts all detectors from the da2D data array for 
	3D scan # 10.

	  v = obj_new('sscan',file='/home/beams/CHA/Yorick/data/2idd_0002.mda')
 	  v->plot1d,scan=10

(See sscan__define.pro)


SSCAN::PLOT2D

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sscan::plot2d

 PURPOSE:
	This method allows the user to use mouse-drive plot2d program to 
	analyze a selected 2D image from 2D array extracted from a 2D/3D 
	scan mda file. User can easily access PICK1D, ROI, Calibration 
	subprograms.

 CALLING SEQUENCE:
	Obj->[sscan::]plot2d,ID

 INPUT: 
	ID   -  zero based image index number, default to 0

 EXAMPLE:
	Use plot2d to extract the 16th 2D image from the 2D image array.

	v = obj_new('sscan',file='/home/beams/CHA/Yorick/data/2idd_0002.mda')
 	v->plot2d,15

(See sscan__define.pro)


SSCAN::PRINT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sscan::print

 PURPOSE:
	This method print out the brief info about the extracted sscan object 
	of the user specified mda file.

 CALLING SEQUENCE:
	Obj->[sscan::]print

 EXAMPLE:
	v = obj_new('sscan',file='/home/beams/CHA/data/xxx/cha_0001.mda')
 	v->print

(See sscan__define.pro)


SSCAN::VIEW3D_2D

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sscan::view3d_2d 

 PURPOSE:
	This method allows the user to display 3D data array from a 3D scan. 
	It calls view3d_2d program which allows the user to slice any cross
	section from any axis. It calls the sum image program and allows the 
	user flexible to re-define the range of index includeed in sum image 
	calculation. Various image subprograms are vailable in veiwe3d_2d.

 CALL SEQUENCE:
	v->view3d_2d,ID

 INPUT:
	ID:	Specify the zero based seq # , default to 0
		Integer ID can not exceed number of DIs defined in the inner 
		most scan record for a 3D scan
 
 EXAMPLE:
	Following example get the second 3D array from the 3D scan file.

	v = obj_new('sscan',file='/home/beams/CHA/Yorick/data/2xfm_0020.mda')
 	v->view3d_2d,1

(See sscan__define.pro)


SSCAN__DEFINE

[Previous Routine] [List of Routines]
 1) Object method allows the user to access 1D/2D/3D data from the sscan 
     object

	@os.init
	.run sscan__define.pro
 	v = obj_new('sscan',file='/home/beams/CHA/data/xxx/cha_0001.mda')

    Pick mda file from the specified input directory

 	v = obj_new('sscan',path='/home/beams/CHA/data/xxx')

	v->get,da1d=da1d,da2d=da2d,....
		extract data array and descs info

	v->plot1d,scan=id
               where id zero based line seq #

	v->plot2d,id
               where id zero based image seq #

	v->image2d
		pass 2D image array to image2d program
	v->panimage
		pass 2D image array to panimage program
 	v->view3d_2d
		pass 3D data array to 3D slicer view3d_2d program
	v->pickfile
		use file selection to pick another mda file

 2) The ILD widget program sscan allows the user view data through 
    packaged idl program 
   
       sscan 

(See sscan__define.pro)