IDL Command Line Scripts for collecting data, moving motors, etc.

Epics allows command line scripts to be written to automate various data collection and other sequences. To date, (June, 2007), seven have been written, all of which have several things in common.

Most of these operate in the same way:

  1. Determine the optimum press position for collecting images and diffraction data
  2. Identify the vertical position for imaging as ZIM, and for diffraction ZDIFF1 (let's use 1.0 for ZIM and 1.1 for DIFF1)
  3. Move the press to that position, for imaging
  4. Start_Epics on the imaging computer and enter all the necessary parameters (filename, path, exposure time, etc.)
  5. Load IDL and enter at the command line (for the first example) imaging_and_diffraction_1, 1.0, 1.1
  6. The computer will move the Z position of the press to the ZIM position, open the slit, take an exposure, close the slit, move to the ZDIFF1 position, take a diffraction pattern, and then repeat the sequence until it is stopped.

Imaging_and_diffraction_2 and _3 operate in the same way, except that there are two or three diffraction positions (for various parts of the sample).

Imaging_and_diffraction_new and Imaging_and_diffraction_scan appear to be identical and are used to scan the sample in both Y and Z during the diffraction data collection (imaging is done as above). The entries for both are imaging_and_diffraction_new, ZIM, ZDIF1, YDIF1, ZRANGE, YRANGE, where ZRANGE and YRANGE are the range of the Z and Y scans.

diffraction_and_scan allows for a single Y-scan across the sample during diffraction. Enter diffraction_and_scan, ORIG, INT where ORIG is the center of the Y-scan, and INT is the increment (+ or -) for the scan. The press will move from ORIG+INT to ORIG-INT back and forth until the collection time is over.

Imaging_and_diffraction_1, Imaging_and_diffraction_2, Imaging_and_diffraction_3, Imaging_and_diffraction_new, and Imaging_and_diffraction_scan all assume that the correct "closed" width for the slit is 0, and the correct "open" width is 1. It also assumes the positions are also 0, both for open and closed. The width values can be changed by editing the script before you run it, but the positions cannot.

Imaging_and_diffraction_1a, allows the open width to be more specifically controlled, including the open and closed positions. It must be customized before use.

The code for each of these five scripts is listed below:

imaging_and_diffraction_1.pro

imaging_and_diffraction_1a.pro

imaging_and_diffraction_2.pro

imaging_and_diffraction_3.pro

imaging_and_diffraction_new.pro

imaging_and_diffraction_scan.pro

diffraction_and_scan.pro