scan

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

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.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['motor4', 'Moveable', None, 'Moveable 3 to move'], ['start_pos4', 'Float', None, 'Scan start position 3'], ['final_pos4', 'Float', None, 'Scan final position 3'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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. Syntax: amultiscan [[mot01 1 10][mot02 2 2]] 10 1 Without brackets it does not work.

param_def = [['motor_start_end_list', [['motor', 'Moveable', None, 'Moveable to move'], ['start', 'Float', None, 'Starting position'], ['end', 'Float', None, 'Final position']], None, 'List of motor, start and end positions'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(*args, **opts)[source]

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

class aNscan(name='', parent=None, format=None)[source]

N-dimensional scan. This is not meant to be called by the user, but as a generic base to construct ascan, a2scan, a3scan,…

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.

param_def = [['motor', 'Moveable', None, 'Moveable to move'], ['start_pos', 'Float', None, 'Scan start position'], ['final_pos', 'Float', None, 'Scan final position'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['motor4', 'Moveable', None, 'Moveable 3 to move'], ['start_pos4', 'Float', None, 'Scan start position 3'], ['final_pos4', 'Float', None, 'Scan final position 3'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 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.

param_def = [['motor_start_end_list', [['motor', 'Moveable', None, 'Moveable to move'], ['start', 'Float', None, 'Starting position'], ['end', 'Float', None, 'Final position']], None, 'List of motor, start and end positions'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(*args, **opts)[source]

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

class dNscan(name='', parent=None, format=None)[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 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.

param_def = [['motor', 'Moveable', None, 'Moveable to move'], ['start_pos', 'Float', None, 'Scan start position'], ['final_pos', 'Float', None, 'Scan final position'], ['nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(motor, start_pos, final_pos, nr_interv, integ_time, **opts)[source]

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

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)
hints = {'allowsHooks': ('pre-scan', 'pre-move', 'post-move', 'pre-acq', 'post-acq', 'post-step', 'post-scan'), 'scan': 'fscan'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

env = ('ActiveMntGrp',)

a set of mandatory environment variable names without which your macro cannot run

param_def = [['indepvars', 'String', None, 'Independent Variables'], ['integ_time', 'String', None, 'Integration time'], ['motor_funcs', [['motor', 'Moveable', None, 'motor'], ['func', 'String', None, 'curve defining path']], None, 'List of motor and path curves']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 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.

hints = {'allowsHooks': ('pre-scan', 'pre-move', 'post-move', 'pre-acq', 'post-acq', 'post-step', 'post-scan'), 'scan': 'mesh'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

env = ('ActiveMntGrp',)

a set of mandatory environment variable names without which your macro cannot run

param_def = [['motor1', 'Moveable', None, 'First motor to move'], ['m1_start_pos', 'Float', None, 'Scan start position for first motor'], ['m1_final_pos', 'Float', None, 'Scan final position for first motor'], ['m1_nr_interv', 'Integer', None, 'Number of scan intervals'], ['motor2', 'Moveable', None, 'Second motor to move'], ['m2_start_pos', 'Float', None, 'Scan start position for second motor'], ['m2_final_pos', 'Float', None, 'Scan final position for second motor'], ['m2_nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time'], ['bidirectional', 'Boolean', False, 'Save time by scanning s-shaped'], ['m2_correct_drift', 'Boolean', {'___optional_parameter__': True}, 'Send position to second motor(a.k.a. slow motor) during first motor(a.k.a. fast motor) scan']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(m1, m1_start_pos, m1_final_pos, m1_nr_interv, m2, m2_start_pos, m2_final_pos, m2_nr_interv, integ_time, bidirectional, m2_correct_drift, **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 dmesh(*args, **kwargs)[source]

2d relative grid scan. The relative mesh scan traces out a grid using motor1 and motor2. If first motor is at the position X before the scan begins, it will be scanned from X+m1_start_pos to X+m1_final_pos using the specified m1_nr_interv number of intervals. If the second motor is at the position Y before the scan begins, it will be scanned from Y+m2_start_pos to Y+m2_final_pos using the specified m2_nr_interv number of intervals. Each point is counted for the 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. Upon scan completion, it returns the motors to their original positions.

hints = {'allowsHooks': ('pre-scan', 'pre-move', 'post-move', 'pre-acq', 'post-acq', 'post-step', 'post-scan'), 'scan': 'dmesh'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

env = ('ActiveMntGrp',)

a set of mandatory environment variable names without which your macro cannot run

param_def = [['motor1', 'Moveable', None, 'First motor to move'], ['m1_start_pos', 'Float', None, 'Scan start position for first motor'], ['m1_final_pos', 'Float', None, 'Scan final position for first motor'], ['m1_nr_interv', 'Integer', None, 'Number of scan intervals'], ['motor2', 'Moveable', None, 'Second motor to move'], ['m2_start_pos', 'Float', None, 'Scan start position for second motor'], ['m2_final_pos', 'Float', None, 'Scan final position for second motor'], ['m2_nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time'], ['bidirectional', 'Boolean', False, 'Save time by scanning s-shaped'], ['m2_correct_drift', 'Boolean', {'___optional_parameter__': True}, 'Send position to slow motor during fast move']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(m1, m1_start_pos, m1_final_pos, m1_nr_interv, m2, m2_start_pos, m2_final_pos, m2_nr_interv, integ_time, bidirectional, m2_correct_drift, **opts)[source]

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

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_points. Count time is given by integ_time. Latency time will be the longer one of latency_time and measurement group latency time.

hints = {'allowsHooks': ('pre-scan', 'pre-acq', 'post-acq', 'post-scan'), 'scan': 'timescan'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

param_def = [['nb_points', 'Integer', None, 'Number of scan points'], ['integ_time', 'Float', None, 'Integration time'], ['latency_time', 'Float', 0, 'Latency time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(nb_points, 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

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

rscan. Do an absolute scan of the specified motor with different number of intervals for each region. It uses the gscan framework.

hints = {'allowsHooks': ('pre-scan', 'pre-move', 'post-move', 'pre-acq', 'post-acq', 'post-step', 'post-scan'), 'scan': 'rscan'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

param_def = [['motor', 'Moveable', None, 'Motor to move'], ['start_pos', 'Float', None, 'Start position'], ['regions', [['next_pos', 'Float', None, 'next position'], ['region_nr_intervals', 'Integer', None, 'Region number of intervals']], None, 'List of tuples: (next_pos, region_nr_intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(motor, start_pos, regions, integ_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 r2scan(*args, **kwargs)[source]

r2scan. Do an absolute scan of the specified motors with different number of intervals for each region. It uses the gscan framework. All the motors will be drived to the same position in each step

hints = {'allowsHooks': ('pre-scan', 'pre-move', 'post-move', 'pre-acq', 'post-acq', 'post-step', 'post-scan'), 'scan': 'r2scan'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

param_def = [['motor1', 'Moveable', None, 'Motor to move'], ['motor2', 'Moveable', None, 'Motor to move'], ['start_pos', 'Float', None, 'Start position'], ['regions', [['next_pos', 'Float', None, 'next position'], ['region_nr_intervals', 'Integer', None, 'Region number of intervals']], None, 'List of tuples: (next_pos, region_nr_intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(motor1, motor2, start_pos, regions, integ_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 r3scan(*args, **kwargs)[source]

r3scan. Do an absolute scan of the specified motors with different number of intervals for each region. It uses the gscan framework. All the motors will be drived to the same position in each step

hints = {'allowsHooks': ('pre-scan', 'pre-move', 'post-move', 'pre-acq', 'post-acq', 'post-step', 'post-scan'), 'scan': 'r3scan'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

param_def = [['motor1', 'Moveable', None, 'Motor to move'], ['motor2', 'Moveable', None, 'Motor to move'], ['motor3', 'Moveable', None, 'Motor to move'], ['start_pos', 'Float', None, 'Start position'], ['regions', [['next_pos', 'Float', None, 'next position'], ['region_nr_intervals', 'Integer', None, 'Region number of intervals']], None, 'List of tuples: (next_pos, region_nr_intervals'], ['integ_time', 'Float', None, 'Integration time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(motor1, motor2, motor3, start_pos, regions, integ_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 a2scanc(*args, **kwargs)[source]

two-motor continuous scan

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['integ_time', 'Float', None, 'Integration time'], ['slow_down', 'Float', 1, 'global scan slow down factor (0, 1]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['integ_time', 'Float', None, 'Integration time'], ['slow_down', 'Float', 1, 'global scan slow down factor (0, 1]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['motor4', 'Moveable', None, 'Moveable 3 to move'], ['start_pos4', 'Float', None, 'Scan start position 3'], ['final_pos4', 'Float', None, 'Scan final position 3'], ['integ_time', 'Float', None, 'Integration time'], ['slow_down', 'Float', 1, 'global scan slow down factor (0, 1]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 ascanc(*args, **kwargs)[source]

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

param_def = [['motor', 'Moveable', None, 'Moveable to move'], ['start_pos', 'Float', None, 'Scan start position'], ['final_pos', 'Float', None, 'Scan final position'], ['integ_time', 'Float', None, 'Integration time'], ['slow_down', 'Float', 1, 'global scan slow down factor (0, 1]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['integ_time', 'Float', None, 'Integration time'], ['slow_down', 'Float', 1, 'global scan slow down factor (0, 1]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['integ_time', 'Float', None, 'Integration time'], ['slow_down', 'Float', 1, 'global scan slow down factor (0, 1]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['motor4', 'Moveable', None, 'Moveable 3 to move'], ['start_pos4', 'Float', None, 'Scan start position 3'], ['final_pos4', 'Float', None, 'Scan final position 3'], ['integ_time', 'Float', None, 'Integration time'], ['slow_down', 'Float', 1, 'global scan slow down factor (0, 1]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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.

param_def = [['motor', 'Moveable', None, 'Moveable to move'], ['start_pos', 'Float', None, 'Scan start position'], ['final_pos', 'Float', None, 'Scan final position'], ['integ_time', 'Float', None, 'Integration time'], ['slow_down', 'Float', 1, 'global scan slow down factor (0, 1]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(motor, start_pos, final_pos, 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

hints = {'allowsHooks': ('pre-scan', 'pre-move', 'post-move', 'pre-acq', 'post-acq', 'post-step', 'post-scan'), 'scan': 'mesh'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

env = ('ActiveMntGrp',)

a set of mandatory environment variable names without which your macro cannot run

param_def = [['motor1', 'Moveable', None, 'First motor to move'], ['m1_start_pos', 'Float', None, 'Scan start position for first motor'], ['m1_final_pos', 'Float', None, 'Scan final position for first motor'], ['slow_down', 'Float', None, 'global scan slow down factor (0, 1]'], ['motor2', 'Moveable', None, 'Second motor to move'], ['m2_start_pos', 'Float', None, 'Scan start position for second motor'], ['m2_final_pos', 'Float', None, 'Scan final position for second motor'], ['m2_nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time'], ['bidirectional', 'Boolean', False, 'Save time by scanning s-shaped']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 dmeshc(*args, **kwargs)[source]

2d relative continuous grid scan. The relative mesh scan traces out a grid using motor1 and motor2. If first motor is at the position X before the scan begins, it will be continuously scanned from X+m1_start_pos to X+m1_final_pos. If the second motor is at the position Y before the scan begins, it will be discrete scanned from Y+m2_start_pos to Y+m2_final_pos using the specified m2_nr_interv number of intervals. The scan considers the accel. and decel. times of the motor1, so the counts (for the integ_time seconds or monitor counts, if integ_time is negative) are executed while motor1 is moving with the constant velocity. Upon scan completion, it returns the motors to their original positions.

hints = {'allowsHooks': ('pre-scan', 'pre-move', 'post-move', 'pre-acq', 'post-acq', 'post-step', 'post-scan'), 'scan': 'dmeshc'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

env = ('ActiveMntGrp',)

a set of mandatory environment variable names without which your macro cannot run

param_def = [['motor1', 'Moveable', None, 'First motor to move'], ['m1_start_pos', 'Float', None, 'Scan start position for first motor'], ['m1_final_pos', 'Float', None, 'Scan final position for first motor'], ['slow_down', 'Float', None, 'global scan slow down factor (0, 1]'], ['motor2', 'Moveable', None, 'Second motor to move'], ['m2_start_pos', 'Float', None, 'Scan start position for second motor'], ['m2_final_pos', 'Float', None, 'Scan final position for second motor'], ['m2_nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time'], ['bidirectional', 'Boolean', False, 'Save time by scanning s-shaped']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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

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 acquiring the last point.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['nr_interv', 'Integer', None, 'Number of scan intervalsNegative value indicate skipping the last point.'], ['integ_time', 'Float', None, 'Integration time'], ['latency_time', 'Float', 0, 'Latency time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 acquiring the last point.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['nr_interv', 'Integer', None, 'Number of scan intervals. Negative value indicate skipping the last point.'], ['integ_time', 'Float', None, 'Integration time'], ['latency_time', 'Float', 0, 'Latency time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 acquiring the last point.

param_def = [['motor1', 'Moveable', None, 'Moveable 1 to move'], ['start_pos1', 'Float', None, 'Scan start position 1'], ['final_pos1', 'Float', None, 'Scan final position 1'], ['motor2', 'Moveable', None, 'Moveable 2 to move'], ['start_pos2', 'Float', None, 'Scan start position 2'], ['final_pos2', 'Float', None, 'Scan final position 2'], ['motor3', 'Moveable', None, 'Moveable 3 to move'], ['start_pos3', 'Float', None, 'Scan start position 3'], ['final_pos3', 'Float', None, 'Scan final position 3'], ['motor4', 'Moveable', None, 'Moveable 4 to move'], ['start_pos4', 'Float', None, 'Scan start position 4'], ['final_pos4', 'Float', None, 'Scan final position 4'], ['nr_interv', 'Integer', None, 'Number of scan intervals. Negative value indicate skipping the last point.'], ['integ_time', 'Float', None, 'Integration time'], ['latency_time', 'Float', 0, 'Latency time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 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 acquiring the last point.

param_def = [['motor', 'Moveable', None, 'Moveable name'], ['start_pos', 'Float', None, 'Scan start position'], ['final_pos', 'Float', None, 'Scan final position'], ['nr_interv', 'Integer', None, 'Number of scan intervals.Negative value indicate skipping the last point.'], ['integ_time', 'Float', None, 'Integration time'], ['latency_time', 'Float', 0, 'Latency time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 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.

hints = {'allowsHooks': ('pre-scan', 'pre-configuration', 'post-configuration', 'pre-move', 'post-move', 'pre-acq', 'pre-start', 'post-acq', 'pre-cleanup', 'post-cleanup', 'post-scan'), 'scan': 'meshct'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

env = ('ActiveMntGrp',)

a set of mandatory environment variable names without which your macro cannot run

param_def = [['motor1', 'Moveable', None, 'First motor to move'], ['m1_start_pos', 'Float', None, 'Scan start position for first motor'], ['m1_final_pos', 'Float', None, 'Scan final position for first motor'], ['m1_nr_interv', 'Integer', None, 'Number of scan intervals. Negative value indicate skipping the last point.'], ['motor2', 'Moveable', None, 'Second motor to move'], ['m2_start_pos', 'Float', None, 'Scan start position for second motor'], ['m2_final_pos', 'Float', None, 'Scan final position for second motor'], ['m2_nr_interv', 'Integer', None, 'Number of scan intervals'], ['integ_time', 'Float', None, 'Integration time'], ['bidirectional', 'Boolean', False, 'Save time by scanning s-shaped'], ['latency_time', 'Float', 0, 'Latency time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
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 rscanct(*args, **kwargs)[source]

Do an absolute continuous scan of the specified motor.

rscanct scans one motor, as specified as motor. For the first region 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 next_pos in order to maintain the constant velocity until the next_pos. Then it will do the same for other regions but the start position is the next_pos from the previous region.

Each region may have a different number of intervals, as specified as region_nb_intervals. The integration time is common to all regions.

hints = {'allowsHooks': ('pre-scan', 'pre-configuration', 'post-configuration', 'pre-move', 'post-move', 'pre-acq', 'pre-start', 'post-acq', 'pre-cleanup', 'post-cleanup', 'post-scan'), 'scan': 'rscanct'}

Hints to give a client to perform special tasks. Example: scan macros give hints on the types of hooks they support. A GUI can use this information to allow a scan to have sub-macros executed as hooks.

param_def = [['motor', 'Moveable', None, 'Motor to move'], ['start_pos', 'Float', None, 'Start position'], ['regions', [['next_pos', 'Float', None, 'Next position'], ['region_nb_intervals', 'Integer', None, 'Region number of intervals']], None, 'List of tuples: (next_pos, region_nb_intervals'], ['integ_time', 'Float', None, 'Integration time'], ['latency_time', 'Float', 0, 'Latency time']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
prepare(motor, start_pos, ends_intervals_list, int_time, 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 scanhist(*args, **kwargs)[source]

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

param_def = [['scan number', 'Integer', -1, 'scan number. [default=-1 meaning show all scans]']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
run(scan_number)[source]

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

Raises:

RuntimeError

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

Calculate basic statistics of the enabled and plotted channels in the active measurement group for the last scan. If no channel is selected for plotting it fallbacks to the first enabled channel. Print stats and publish them in the env. Also compatible for multi-dimensional scans e.g. a2scan, when statistics are calculated for each motor participating in the scan if not selected differently with the motor parameter.

env = ('ActiveMntGrp',)

a set of mandatory environment variable names without which your macro cannot run

param_def = [['channel', [['channel', 'ExpChannel', None, ''], {'min': 0}], None, 'List of channels for statistics calculations'], ['motor', [['motor', 'Motor', None, ''], {'min': 0}], None, 'List of motor for statistics calculations']]

This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:

  1. a simple parameter object

  2. a parameter repetition object

A simple parameter object is a sequence of:

  1. a string representing the parameter name

  2. a member of Macro.Type representing the parameter data type

  3. a default value for the parameter or None if there is no default value

  4. a string with the parameter description

Example:

param_def = ( ('value', Type.Float, None, 'a float parameter' ) )

A parameter repetition object is a sequence of:

  1. a string representing the parameter repetition name

  2. a sequence of parameter information objects

  3. a dictionary representing the parameter repetition semantics or None to use the default parameter repetition semantics. Dictionary keys are:

    • min - integer representing minimum number of repetitions or None for no minimum.

    • max - integer representing maximum number of repetitions or None for no maximum.

    Default parameter repetition semantics is { 'min': 1, 'max' : None } (in other words, “at least one repetition” semantics)

Example:

param_def = (
    ( 'motor_list', ( ( 'motor', Type.Motor, None, 'motor name') ), None, 'List of motors')
)
run(channel, motor)[source]

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

Raises:

RuntimeError