standard
This is the standard macro module
- class ct(*args, **kwargs)[source]
Count for the specified time on the measurement group or experimental channel given as second argument (if not given the active measurement group is used)
- hints = {'allowsHooks': ('pre-acq', 'post-acq')}
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 = [['integ_time', 'Float', 1.0, 'Integration time'], ['countable_elem', 'Countable', {'___optional_parameter__': True}, 'Countable element e.g. MeasurementGroup or ExpChannel']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class mstate(*args, **kwargs)[source]
Prints the state of a motor
- param_def = [['motor', 'Moveable', None, 'Motor to check state']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class mv(*args, **kwargs)[source]
Move motor(s) to the specified position(s)
- hints = {'allowsHooks': ('pre-move', 'post-move')}
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_pos_list', [['motor', 'Moveable', None, 'Motor to move'], ['pos', 'Float', None, 'Position to move to']], None, 'List of motor/position pairs']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class mvr(*args, **kwargs)[source]
Move motor(s) relative to the current position(s)
- hints = {'allowsHooks': ('pre-move', 'post-move')}
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_disp_list', [['motor', 'Moveable', None, 'Motor to move'], ['disp', 'Float', None, 'Relative displacement']], None, 'List of motor/displacement pairs']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class pwa(*args, **kwargs)[source]
Show all motor positions in a pretty table
- param_def = [['filter', [['filter', 'String', '.*', 'a regular expression filter'], {'min': 1}], ['.*'], 'a regular expression filter']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class pwm(*args, **kwargs)[source]
Show the position of the specified motors in a pretty table
- param_def = [['motor_list', [['motor', 'Moveable', None, 'Motor to move']], None, 'List of motor to show']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class repeat(*args, **kwargs)[source]
This macro executes as many repetitions of a set of macros as specified by nr parameter. The macros to be repeated can be given as parameters or as body hooks. If both are given first will be executed the ones given as parameters and then the ones given as body hooks. If nr has negative value, repetitions will be executed until you stop repeat macro.
Note
The repeat macro has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including removal of the macro) may occur if deemed necessary by the core developers.
- hints = {'allowsHooks': ('body',)}
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 = [['nr', 'Integer', None, 'Nr of iterations'], ['macro_name_params', [['token', 'String', None, 'Macro name and parameters (if any)'], {'min': 0}], None, 'List with macro name and parameters (if any)']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class set_user_lim(*args, **kwargs)[source]
Sets the user limits on the specified motor
- param_def = [['motor', 'Moveable', None, 'Motor name'], ['low', 'Float', None, 'lower user limit'], ['high', 'Float', None, 'upper user limit']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class set_dial_lim(*args, **kwargs)[source]
Sets the dial limits on the specified motor
- param_def = [['motor', 'Motor', None, 'Motor name'], ['low', 'Float', None, 'lower dial limit'], ['high', 'Float', None, 'upper dial limit']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class set_dial_pos(*args, **kwargs)[source]
Sets the USER position of the motor to the specified value (by changing DIAL and keeping OFFSET).
- param_def = [['motor', 'Motor', None, 'Motor name'], ['pos', 'Float', None, 'Position to move to']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class set_user_pos(*args, **kwargs)[source]
Sets the USER position of the motor to the specified value (by changing OFFSET and keeping DIAL) and recalculates the USER limits (can be disabled with the
update_limit
parameter).- param_def = [['motor', 'Motor', None, 'Motor name'], ['pos', 'Float', None, 'Position to move to'], ['update_limit', 'Boolean', True, 'Update the software limit, enabled by default']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class set_step_per_unit(*args, **kwargs)[source]
Set the step_per_unit defined by user. Macro allows to update limits (user and dial) depending on update_limits value.
- param_def = [['motor', 'Moveable', None, 'Motor to update steps_per_unit.'], ['step_per_unit', 'Float', None, 'New step per unit to be applied.'], ['update_limits', 'Boolean', False, 'Update limits.']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class sleep(*args, **kwargs)[source]
This macro waits for a time amount specified by dtime parameter (in seconds). In contrary to Python
time.sleep(dtime)
this macro execution can by interrupted (stopped or aborted).- param_def = [['dtime', 'Float', 0, 'Sleep time in seconds']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class uct(*args, **kwargs)[source]
Count on the active measurement group and update
- param_def = [['integ_time', 'Float', 1.0, 'Integration time'], ['countable_elem', 'Countable', {'___optional_parameter__': True}, 'Countable element e.g. MeasurementGroup or ExpChannel']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class umv(*args, **kwargs)[source]
Move motor(s) to the specified position(s) and update
- hints = {'allowsHooks': ('pre-move', 'post-move')}
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_pos_list', [['motor', 'Moveable', None, 'Motor to move'], ['pos', 'Float', None, 'Position to move to']], None, 'List of motor/position pairs']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class umvr(*args, **kwargs)[source]
Move motor(s) relative to the current position(s) and update
- hints = {'allowsHooks': ('pre-move', 'post-move')}
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_disp_list', [['motor', 'Moveable', None, 'Motor to move'], ['disp', 'Float', None, 'Relative displacement']], None, 'List of motor/displacement pairs']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class wa(*args, **kwargs)[source]
Show all motor positions
- param_def = [['filter', [['filter', 'String', '.*', 'a regular expression filter'], {'min': 1}], ['.*'], 'a regular expression filter']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class wm(*args, **kwargs)[source]
Show the position of the specified motors.
- param_def = [['motor_list', [['motor', 'Moveable', None, 'Motor to see where it is']], None, 'List of motor to show']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- static format_value(fmt, str_fmt, value)[source]
Formats given value following the fmt and/or str_fmt rules.
Parameters
- fmtstr
The value format.
- str_fmtstr
The string format.
- valuefloat
The value to be formatted.
Returns
- str
The string formatted value.
- class tw(*args, **kwargs)[source]
Tweak motor by variable delta
- param_def = [['motor', 'Moveable', 'test', 'Motor to move'], ['delta', 'Float', None, 'Amount to tweak']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class logmacro(*args, **kwargs)[source]
Turn on/off logging of the spock output.
Note
The logmacro class has been included in Sardana on a provisional basis. Backwards incompatible changes (up to and including its removal) may occur if deemed necessary by the core developers
- param_def = [['offon', 'Boolean', None, 'Unset/Set logging'], ['mode', 'Integer', -1, 'Mode: 0 append, 1 new file']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class newfile(*args, **kwargs)[source]
Sets the ScanDir and ScanFile as well as ScanID in the environment.
If ScanFilePath is only a file name, the ScanDir must be set externally via
senv ScanDir
or using the %expconf. Otherwise, the path in ScanFilePath must be absolute and existing on the MacroServer host.The ScanID should be set to the value before the upcoming scan number. Default value is 0.
- hints = {'allowsHooks': ('post-newfile',)}
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 = [['ScanFilePath_list', [['ScanFilePath', 'String', None, '(ScanDir/)ScanFile']], None, 'List of (ScanDir/)ScanFile'], ['ScanID', 'Integer', 0, 'Scan ID']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class plotselect(*args, **kwargs)[source]
select channels for plotting in the active measurement group
- 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 to plot']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class pic(*args, **kwargs)[source]
This macro moves a motor of the last scan to its PEAK position for a given channel. If no channel is given, it selects the first channel from the ScanStats env variable. If no motor is given, it selects the first/only motor from the ScanStats env variable.
- param_def = [['channel', 'ExpChannel', {'___optional_parameter__': True}, 'name of channel'], ['motor', 'Moveable', {'___optional_parameter__': True}, 'name of motor']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )
- class cen(*args, **kwargs)[source]
This macro moves a motor of the last scan to its CEN position for a given channel. If no channel is given, it selects the first channel from the ScanStats env variable.
- param_def = [['channel', 'ExpChannel', {'___optional_parameter__': True}, 'name of channel'], ['motor', 'Moveable', {'___optional_parameter__': True}, 'name of motor']]
This property holds the macro parameter description. It consists of a sequence of parameter information objects. A parameter information object is either:
a simple parameter object
a parameter repetition object
A simple parameter object is a sequence of:
a string representing the parameter name
a member of
Macro.Type
representing the parameter data typea default value for the parameter or None if there is no default value
a string with the parameter description
Example:
param_def = ( ('value', Type.Float, None, 'a float parameter' ) )
A parameter repetition object is a sequence of:
a string representing the parameter repetition name
a sequence of parameter information objects
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') )