ECLI Scans

StepScan extension

ecli_stepscan – PyEpics StepScan extension

class ecli_stepscan.ECLIPositioner(*args, **kwargs)

Modification of the basic StepScan positioner to add movement time statistics

move_to_pos(i, wait=False, timeout=600)

move to i-th position in positioner array

class ecli_stepscan.ECLIScans(shell, config)

PyEpics scan engine plugin for ECLI

post_scan(scan=None)

Post-scan callback from stepscan

pre_scan(scan=None)

Pre-scan callback from stepscan

set_min_scan_number(num)

Each archiver extension should call this function with its last used scan number.

Since extensions that save scan data identify the scan by number, and there can be more than one extension saving data, this is used to avoid conflicting scan numbers.

single_step(scan, point)

Single step (per-point) callback from stepscan

ecli_stepscan.amesh(*args, **kwargs)

%_mesh motor1 start1 end1 points1 motor2 start2 end2 points2 time

Perform a 2D scan of dimension (points1, points2):
motor1 in [start1, end1], with points1 data points (inner loop, fast) motor2 in [start2, end2], with points2 data points (outer loop, slow)

Scan relative to the starting position (dmesh) or utilizing absolute positions (amesh):

for motor2 = start2 to end2, step (end2-start2) / points2:
    for motor1 = start1 to end1, step (end1-start1) / points1:
        wait for [time] secs
        take data point
positional arguments:
motor1 Motor to scan (1) start1 Relative scan starting position for motor1 end1 Relative scan ending position for motor1 points1 Number of points along (start1 to end1) motor2 Motor to scan (2) start2 Relative scan starting position for motor2 end2 Relative scan ending position for motor2 points2 Number of points along (start2 to end2) time Seconds at each point
ecli_stepscan.ascan(*args, **kwargs)

Perform a 1D scan of motor in [start, end] of data_points

Parameters:
  • motor – Motor to scan
  • start – Relative scan starting position for motor
  • end – Relative scan ending position for motor
  • data_points – Number of data points to acquire
  • dwell_time – Seconds at each point
ecli_stepscan.calc_ndim(dim)

Calculate the number of dimensions given a dimension tuple

ecli_stepscan.dmesh(*args, **kwargs)

%_dmesh motor1 start1 end1 points1 motor2 start2 end2 points2 time

Perform a 2D scan of dimension (points1, points2):
motor1 in [start1, end1], with points1 data points (inner loop, fast) motor2 in [start2, end2], with points2 data points (outer loop, slow)

Scan relative to the starting position (dmesh) or utilizing absolute positions (amesh):

for motor2 = start2 to end2, step (end2-start2) / points2:
    for motor1 = start1 to end1, step (end1-start1) / points1:
        wait for [time] secs
        take data point
positional arguments:
motor1 Motor to scan (1) start1 Relative scan starting position for motor1 end1 Relative scan ending position for motor1 points1 Number of points along (start1 to end1) motor2 Motor to scan (2) start2 Relative scan starting position for motor2 end2 Relative scan ending position for motor2 points2 Number of points along (start2 to end2) time Seconds at each point
ecli_stepscan.dscan(*args, **kwargs)

Perform a 1D scan of motor in [start, end] of data_points

Parameters:
  • motor – Motor to scan
  • start – Relative scan starting position for motor
  • end – Relative scan ending position for motor
  • data_points – Number of data points to acquire
  • dwell_time – Seconds at each point
ecli_stepscan.fix_dimensions(d)

Strips off any final 1s in a dimension array

ecli_stepscan.get_grid_point(dim, cpt)

In, for example, a 10x10 scan, there are 100 points. This returns which point in the grid linear point x corresponds to

ecli_stepscan.mesh(*args, **kwargs)

%_mesh motor1 start1 end1 points1 motor2 start2 end2 points2 time

Perform a 2D scan of dimension (points1, points2):
motor1 in [start1, end1], with points1 data points (inner loop, fast) motor2 in [start2, end2], with points2 data points (outer loop, slow)

Scan relative to the starting position (dmesh) or utilizing absolute positions (amesh):

for motor2 = start2 to end2, step (end2-start2) / points2:
    for motor1 = start1 to end1, step (end1-start1) / points1:
        wait for [time] secs
        take data point
positional arguments:
motor1 Motor to scan (1) start1 Relative scan starting position for motor1 end1 Relative scan ending position for motor1 points1 Number of points along (start1 to end1) motor2 Motor to scan (2) start2 Relative scan starting position for motor2 end2 Relative scan ending position for motor2 points2 Number of points along (start2 to end2) time Seconds at each point
ecli_stepscan.scan(*args, **kwargs)

Perform a generic scan

Parameters:
  • positioners – Motors to scan, with absolute position arrays previously set
  • dwell_time – Seconds at each point
  • move_back – Move all positioners back to their starting position post scan
  • command – the command-line command used to start the scan
  • dimensions – the scan dimensions
  • counters – additional counters not normally included (can be a PV name)
  • detectors – additional detectors not normally included
  • triggers – additional triggers not normally included (can be a PV name)
  • run – run the scan (or just return one ready to run)
  • kwargs – passed onto the scan’s ECLI info
Returns:

the scan instance

ecli_stepscan.scan_1d(*args, **kwargs)

Perform a 1D scan of motor in [start, end] of data_points

Parameters:
  • motor – Motor to scan
  • start – Relative scan starting position for motor1
  • end – Relative scan ending position for motor1
  • data_points – Number of data points to acquire
  • dwell_time – Seconds at each point
ecli_stepscan.scan_2d(*args, **kwargs)

Perform a 2D scan of dimension (points1, points2): motor1 in [start1, end1], with points1 data points (inner loop, fast)

motor2 in [start2, end2], with points2 data points (outer loop, slow)

Scan relative to the starting position (dmesh) or utilizing absolute positions (amesh):

for motor2 = start2 to end2, step (end2-start2) / points2:
    for motor1 = start1 to end1, step (end1-start1) / points1:
        wait for [time] secs
        take data point
Parameters:
  • motor1 – Motor to scan
  • start1 – Relative scan starting position for motor1
  • end1 – Relative scan ending position for motor1
  • points1 – Number of data points for motor1
  • motor2 – Motor 2 to scan
  • start2 – Relative scan starting position for motor2
  • points2 – Number of data points for motor2
  • end2 – Relative scan ending position for motor2
  • data_points – Number of data points to acquire
  • dwell_time – Seconds at each point
Returns:

the scan instance

class ecli_stepscan.ECLIScans(shell, config)

PyEpics scan engine plugin for ECLI

post_scan(scan=None)

Post-scan callback from stepscan

pre_scan(scan=None)

Pre-scan callback from stepscan

set_min_scan_number(num)

Each archiver extension should call this function with its last used scan number.

Since extensions that save scan data identify the scan by number, and there can be more than one extension saving data, this is used to avoid conflicting scan numbers.

single_step(scan, point)

Single step (per-point) callback from stepscan

Printing

Outputting scan data to the console is left to other extensions.

ecli_scanprinter – Scan printer ECLI extension

class ecli_scanprinter.ECLIScanPrinter(shell, config)

Scan Writers

Writing scan data to a file is left to other extensions.

ecli_scanwriter_hdf5 – HDF5 scan writer

Note

requires h5py <http://www.h5py.org>

class ecli_scanwriter_hdf5.ECLIScanWriterHDF5(shell, config)

ecli_scanwriter_spec – SPEC-format scan writer

class ecli_scanwriter_spec.ECLIScanWriterSPEC(shell, config)