scan

Macro library containning scan macros for the macros server Tango device server as part of the Sardana project.

class dNscan(*a, **kw)[source]

same as aNscan but it interprets the positions as being relative to the current positions and upon completion, it returns the motors to their original positions

class ascan(*args, **kwargs)[source]

Do an absolute scan of the specified motor. ascan scans one motor, as specified by motor. The motor starts at the position given by start_pos and ends at the position given by final_pos. The step size is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(motor, start_pos, final_pos, nr_interv, integ_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a2scan(*args, **kwargs)[source]

two-motor scan. a2scan scans two motors, as specified by motor1 and motor2. Each motor moves the same number of intervals with starting and ending positions given by start_pos1 and final_pos1, start_pos2 and final_pos2, respectively. The step size for each motor is: (start_pos-final_pos)/nr_interv The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(motor1, start_pos1, final_pos1, motor2, start_pos2, final_pos2, nr_interv, integ_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a3scan(*args, **kwargs)[source]

three-motor scan . a3scan scans three motors, as specified by motor1, motor2 and motor3. Each motor moves the same number of intervals with starting and ending positions given by start_pos1 and final_pos1, start_pos2 and final_pos2, start_pos3 and final_pos3, respectively. The step size for each motor is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, nr_interv, integ_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a4scan(*args, **kwargs)[source]

four-motor scan . a4scan scans four motors, as specified by motor1, motor2, motor3 and motor4. Each motor moves the same number of intervals with starting and ending positions given by start_posN and final_posN (for N=1,2,3,4). The step size for each motor is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, m4, s4, f4, nr_interv, integ_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class amultiscan(*args, **kwargs)[source]

Multiple motor scan. amultiscan scans N motors, as specified by motor1, motor2,…,motorN. Each motor moves the same number of intervals with starting and ending positions given by start_posN and final_posN (for N=1,2,…). The step size for each motor is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(*args, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class dmultiscan(*args, **kwargs)[source]

Multiple motor scan relative to the starting positions. dmultiscan scans N motors, as specified by motor1, motor2,…,motorN. Each motor moves the same number of intervals If each motor is at a position X before the scan begins, it will be scanned from X+start_posN to X+final_posN (where N is one of 1,2,…) The step size for each motor is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(*args, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class dscan(*args, **kwargs)[source]

motor scan relative to the starting position. dscan scans one motor, as specified by motor. If motor motor is at a position X before the scan begins, it will be scanned from X+start_pos to X+final_pos. The step size is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(motor, start_pos, final_pos, nr_interv, integ_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class d2scan(*args, **kwargs)[source]

two-motor scan relative to the starting position. d2scan scans two motors, as specified by motor1 and motor2. Each motor moves the same number of intervals. If each motor is at a position X before the scan begins, it will be scanned from X+start_posN to X+final_posN (where N is one of 1,2). The step size for each motor is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(motor1, start_pos1, final_pos1, motor2, start_pos2, final_pos2, nr_interv, integ_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class d3scan(*args, **kwargs)[source]

three-motor scan . d3scan scans three motors, as specified by motor1, motor2 and motor3. Each motor moves the same number of intervals. If each motor is at a position X before the scan begins, it will be scanned from X+start_posN to X+final_posN (where N is one of 1,2,3) The step size for each motor is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts.

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, nr_interv, integ_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class d4scan(*args, **kwargs)[source]

four-motor scan relative to the starting positions a4scan scans four motors, as specified by motor1, motor2, motor3 and motor4. Each motor moves the same number of intervals. If each motor is at a position X before the scan begins, it will be scanned from X+start_posN to X+final_posN (where N is one of 1,2,3,4). The step size for each motor is (start_pos-final_pos)/nr_interv. The number of data points collected will be nr_interv+1. Count time is given by time which if positive, specifies seconds and if negative, specifies monitor counts. Upon termination, the motors are returned to their starting positions.

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, m4, s4, f4, nr_interv, integ_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class mesh(*args, **kwargs)[source]

2d grid scan. The mesh scan traces out a grid using motor1 and motor2. The first motor scans from m1_start_pos to m1_final_pos using the specified number of intervals. The second motor similarly scans from m2_start_pos to m2_final_pos. Each point is counted for for integ_time seconds (or monitor counts, if integ_time is negative). The scan of motor1 is done at each point scanned by motor2. That is, the first motor scan is nested within the second motor scan.

prepare(m1, m1_start_pos, m1_final_pos, m1_nr_interv, m2, m2_start_pos, m2_final_pos, m2_nr_interv, integ_time, bidirectional, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

run(*args)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class fscan(*args, **kwargs)[source]

N-dimensional scan along user defined paths. The motion path for each motor is defined through the evaluation of a user-supplied function that is evaluated as a function of the independent variables. -independent variables are supplied through the indepvar string. The syntax for indepvar is “x=expresion1,y=expresion2,…” -If no indep vars need to be defined, write “!” or “*” or “None” -motion path for motor is generated by evaluating the corresponding function ‘func’ -Count time is given by integ_time. If integ_time is a scalar, then the same integ_time is used for all points. If it evaluates as an array (with same length as the paths), fscan will assign a different integration time to each acquisition point. -If integ_time is positive, it specifies seconds and if negative, specifies monitor counts.

IMPORTANT Notes: -no spaces are allowed in the indepvar string. -all funcs must evaluate to the same number of points

>>> fscan x=[1,3,5,7,9],y=arange(5) 0.1 motor1 x**2 motor2 sqrt(y*x+3)
>>> fscan x=[1,3,5,7,9],y=arange(5) [0.1,0.2,0.3,0.4,0.5] motor1 x**2 motor2 sqrt(y*x+3)
prepare(*args, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

run(*args)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class scanhist(*args, **kwargs)[source]

Shows scan history information. Give optional parameter scan number to display details about a specific scan

run(scan_number)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class ascanc(*args, **kwargs)[source]

Do an absolute continuous scan of the specified motor. ascanc scans one motor, as specified by motor.

prepare(motor, start_pos, final_pos, integ_time, slow_down, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a2scanc(*args, **kwargs)[source]

two-motor continuous scan

prepare(motor1, start_pos1, final_pos1, motor2, start_pos2, final_pos2, integ_time, slow_down, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a3scanc(*args, **kwargs)[source]

three-motor continuous scan

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, integ_time, slow_down, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a4scanc(*args, **kwargs)[source]

four-motor continuous scan

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, m4, s4, f4, integ_time, slow_down, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class dscanc(*args, **kwargs)[source]

continuous motor scan relative to the starting position.

prepare(motor, start_pos, final_pos, integ_time, slow_down, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class d2scanc(*args, **kwargs)[source]

continuous two-motor scan relative to the starting positions

prepare(motor1, start_pos1, final_pos1, motor2, start_pos2, final_pos2, integ_time, slow_down, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class d3scanc(*args, **kwargs)[source]

continuous three-motor scan

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, integ_time, slow_down, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class d4scanc(*args, **kwargs)[source]

continuous four-motor scan relative to the starting positions

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, m4, s4, f4, integ_time, slow_down, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class meshc(*args, **kwargs)[source]

2d grid scan. scans continuous

prepare(m1, m1_start_pos, m1_final_pos, slow_down, m2, m2_start_pos, m2_final_pos, m2_nr_interv, integ_time, bidirectional, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

run(*args)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class ascanct(*args, **kwargs)[source]

Do an absolute continuous scan of the specified motor. ascanct scans one motor, as specified by motor. The motor starts before the position given by start_pos in order to reach the constant velocity at the start_pos and finishes at the position after the final_pos in order to maintain the constant velocity until the final_pos.

prepare(motor, start_pos, final_pos, nr_interv, integ_time, latency_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a2scanct(*args, **kwargs)[source]

Two-motor continuous scan. a2scanct scans two motors, as specified by motor1 and motor2. Each motor starts before the position given by its start_pos in order to reach the constant velocity at its start_pos and finishes at the position after its final_pos in order to maintain the constant velocity until its final_pos.

prepare(m1, s1, f1, m2, s2, f2, nr_interv, integ_time, latency_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a3scanct(*args, **kwargs)[source]

Three-motor continuous scan. a2scanct scans three motors, as specified by motor1, motor2 and motor3. Each motor starts before the position given by its start_pos in order to reach the constant velocity at its start_pos and finishes at the position after its final_pos in order to maintain the constant velocity until its final_pos.

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, nr_interv, integ_time, latency_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class a4scanct(*args, **kwargs)[source]

Four-motor continuous scan. a2scanct scans four motors, as specified by motor1, motor2, motor3 and motor4. Each motor starts before the position given by its start_pos in order to reach the constant velocity at its start_pos and finishes at the position after its final_pos in order to maintain the constant velocity until its final_pos.

prepare(m1, s1, f1, m2, s2, f2, m3, s3, f3, m4, s4, f4, nr_interv, integ_time, latency_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

class meshct(*args, **kwargs)[source]

2d grid scan . The mesh scan traces out a grid using motor1 and motor2. The first motor scans in contiuous mode from m1_start_pos to m1_final_pos using the specified number of intervals. The second motor similarly scans from m2_start_pos to m2_final_pos but it does not move during the continuous scan. Each point is counted for integ_time seconds (or monitor counts, if integ_time is negative). The scan of motor1 is done at each point scanned by motor2. That is, the first motor scan is nested within the second motor scan.

prepare(m1, m1_start_pos, m1_final_pos, m1_nr_interv, m2, m2_start_pos, m2_final_pos, m2_nr_interv, integ_time, bidirectional, latency_time, **opts)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

run(*args)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError
class timescan(*args, **kwargs)[source]

Do a time scan over the specified time intervals. The scan starts immediately. The number of data points collected will be nr_interv + 1. Count time is given by integ_time. Latency time will be the longer one of latency_time and measurement group latency time.

prepare(nr_interv, integ_time, latency_time)[source]

Macro API. Prepare phase. Overwrite as necessary. Default implementation does nothing

run(*args)[source]

Macro API. Runs the macro. Overwrite MANDATORY! Default implementation raises RuntimeError.

Raises:RuntimeError