pylablib.devices.SmarAct package¶
Submodules¶
pylablib.devices.SmarAct.scu3d module¶
-
class
pylablib.devices.SmarAct.scu3d.
LibraryController
(lib)[source]¶ Bases:
pylablib.devices.utils.load_lib.LibraryController
-
close
(opid)[source]¶ Mark device closing.
Return tuple
(close_result, uninit_result)
with the results of the closing and the shutdown. If library does not need to be shut down yet, setuninit_result=None
-
-
class
pylablib.devices.SmarAct.scu3d.
TDeviceInfo
(device_id, firmware_version, dll_version)¶ Bases:
tuple
-
count
()¶ Return number of occurrences of value.
-
device_id
¶
-
dll_version
¶
-
firmware_version
¶
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
-
pylablib.devices.SmarAct.scu3d.
get_device_info
(idx)[source]¶ Get info of the devices with the given index.
Return tuple
(device_id, firmware_version, dll_version)
.
-
pylablib.devices.SmarAct.scu3d.
get_devices_number
()[source]¶ Get number of connected SCU3D controller
-
class
pylablib.devices.SmarAct.scu3d.
SCU3D
(idx=0, axis_dir='+++')[source]¶ Bases:
pylablib.devices.interface.stage.IMultiaxisStage
SmarAct SCU3D translation stage controller.
Parameters: -
Error
= <Mock name='mock.SmarActError' id='140259587317712'>¶
-
get_device_info
()[source]¶ Get info of the devices with the given index.
Return tuple
(device_id, firmware_version, dll_version)
.
-
get_axis_dir
()[source]¶ Get axis direction convention (a string of 3 symbols which are either
"+"
or"-"
determining if the axis direction is flipped)
-
set_axis_dir
(axis_dir)[source]¶ Set axis direction convention (a string of 3 symbols which are either
"+"
or"-"
determining if the axis direction is flipped)
-
move_macrostep
(axis, steps, voltage, frequency)[source]¶ Move along a given axis by a single “macrostep”, which consists of several regular steps.
voltage (in Volts) and frequency (in Hz) specify the motion parameters. This simulates the controller operation, where one “step” at large step sizes consists of several small steps.
-
move_by
(axis, steps=1, stepsize=10)[source]¶ Move along a given axis with a given number of macrosteps using one of the predefined step size.
stepsize can range from 1 (smallest) to 20 (largest), and roughly corresponds to the handheld controller parameters.
-
get_status
(axis='all')[source]¶ Get the axis status.
Can be
"stopped"
(default state),"setting_amplitude"
(setting open-loop step amplitude),"moving"
(open-loop movement),"targeting"
(closed-loop movement),"holding"
(closed-loop position holding),"calibrating"
(sensor calibration), or"moving_to_reference"
(calibrating position sensor).
-
wait_for_status
(axis, status='stopped', timeout=30.0)[source]¶ Wait until the axis reaches a given status.
By default wait for
"stopped"
status (i.e., wait until the motion is finished).
-
class
NoParameterCaller
(device, kind)¶ Bases:
object
Class to simplify calling functions without a parameter
-
apply_settings
(settings)¶ Apply the settings.
settings is the dict
{name: value}
of the device available settings. Non-applicable settings are ignored.
-
get_all_axes
()¶ Get the list of all available axes (taking mapping into account)
-
get_device_variable
(key)¶ Get the value of a settings, status, or full info parameter
-
get_full_info
(include=0)¶ Get dict
{name: value}
containing full device information (including status and settings).include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or
"all"
(all available variables). Since the lowest priority is -10, settinginclude=-10
queries all available variables, which is equivalent toinclude="all"
.
-
get_full_status
(include=0)¶ Get dict
{name: value}
containing the device status (including settings).include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or
"all"
(all available variables). Since the lowest priority is -10, settinginclude=-10
queries all available variables, which is equivalent toinclude="all"
.
-
get_settings
(include=0)¶ Get dict
{name: value}
containing all the device settings.include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or
"all"
(all available variables). Since the lowest priority is -10, settinginclude=-10
queries all available variables, which is equivalent toinclude="all"
.
-
remap_axes
(mapping, accept_original=True)¶ Rename axes to the new labels.
mapping is the new axes mapping, which can be a list of new axes name (corresponding to the old axes in order returned by
get_all_axes()
), or a dictionary{alias: original}
of the new axes aliases.
-
set_device_variable
(key, value)¶ Set the value of a settings parameter
-