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, set uninit_result=None

open()[source]

Mark device opening.

Return tuple (init_result, open_result, opid) with the results of the initialization and the opening, and the opening ID which should afterwards be used for closing. If library is already initialized, set init_result=None

preinit()[source]

Pre-initialize the library, if it hasn’t been done already

shutdown()[source]

Close all opened connections and shutdown the library

temp_open()[source]

Context for temporarily opening a new device connection

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.list_devices()[source]

List all connected devices

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:
  • idx (int) – stage index
  • axis_dir (str) – 3-symbol string specifying default directions of the axes (each symbol be "+" or "-")
Error = <Mock name='mock.SmarActError' id='140128520731152'>
open()[source]

Open the connection to the stage

close()[source]

Close the connection to the stage

is_opened()[source]

Check if the device is connected

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).

wait_move(axis, timeout=30.0)[source]

Wait for a given axis to stop moving

is_moving(axis='all')[source]

Check if a given axis is moving

stop(axis='all')[source]

Stop motion at a given axis

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, setting include=-10 queries all available variables, which is equivalent to include="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, setting include=-10 queries all available variables, which is equivalent to include="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, setting include=-10 queries all available variables, which is equivalent to include="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

Module contents