pylablib.devices.Leybold package¶
Submodules¶
pylablib.devices.Leybold.base module¶
-
exception
pylablib.devices.Leybold.base.
LeyboldError
[source]¶ Bases:
pylablib.core.devio.base.DeviceError
Generic Leybold device error
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
pylablib.devices.Leybold.base.
LeyboldBackendError
(exc)[source]¶ Bases:
pylablib.devices.Leybold.base.LeyboldError
,pylablib.core.devio.comm_backend.DeviceBackendError
Generic Leybold backend communication error
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
class
pylablib.devices.Leybold.base.
TDeviceInfo
(sensor, page, swver)¶ Bases:
tuple
-
count
()¶ Return number of occurrences of value.
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
page
¶
-
sensor
¶
-
swver
¶
-
-
class
pylablib.devices.Leybold.base.
TUpdateValue
(value, display_units, status, error, device_info)¶ Bases:
tuple
-
count
()¶ Return number of occurrences of value.
-
device_info
¶
-
display_units
¶
-
error
¶
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
status
¶
-
value
¶
-
-
class
pylablib.devices.Leybold.base.
GenericITR
(conn)[source]¶ Bases:
pylablib.core.devio.comm_backend.ICommBackendWrapper
Generic Leybold ITR pressure gauge.
Parameters: conn – serial connection parameters (usually port or a tuple containing port and baudrate) -
Error
¶ alias of
LeyboldError
-
get_update
(refresh=True)[source]¶ Get device state update.
Return tuple
(value, display_units, status, error, device_info)
, wherevalue
is the pressure in Pa,display_units
are display units ("pa"
,"mbar"
, or"torr"
),status
is the devices status (e.g., emission status),error
is the device error ("ok"
if no errors), anddevice_info
is a tuple(sensor, page, swver)
with the sensor kind ID, data page, and software version.If
refresh==True
, get the latest update value; otherwise, get the latest read value.
-
send_command
(byte1, byte2, byte3)[source]¶ Send command to the device.
Arguments represent the three command bytes. Values of these bytes for different commands are described in the manual.
-
get_device_info
()[source]¶ Get device info.
Return tuple
(sensor, page, swver)
with the sensor kind ID, data page, and software version.
-
get_pressure
(display_units=False)[source]¶ Get pressure.
If
display_units==False
, return result in Pa; otherwise, use display units obtained usingget_units()
.
-
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.
-
close
()¶ Close the backend
-
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"
.
-
is_opened
()¶ Check if the device is connected
-
lock
(timeout=None)¶ Lock the access to the device from other threads/processes (isn’t necessarily implemented)
-
locking
(timeout=None)¶ Context manager for lock & unlock
-
open
()¶ Open the backend
-
set_device_variable
(key, value)¶ Set the value of a settings parameter
-
unlock
()¶ Unlock the access to the device from other threads/processes (isn’t necessarily implemented)
-
-
class
pylablib.devices.Leybold.base.
TITR90Status
(emission, atm_adj)¶ Bases:
tuple
-
atm_adj
¶
-
count
()¶ Return number of occurrences of value.
-
emission
¶
-
index
()¶ Return first index of value.
Raises ValueError if the value is not present.
-
-
class
pylablib.devices.Leybold.base.
ITR90
(conn)[source]¶ Bases:
pylablib.devices.Leybold.base.GenericITR
Leybold ITR90 pressure gauge.
Parameters: conn – serial connection parameters (usually port or a tuple containing port and baudrate) -
set_units
(units, store=True)[source]¶ Get device readout units (
"mbar"
,"pa"
, or"torr"
).If
store==True
, store the value in the non-volatile power-independent memory.
-
Error
¶ alias of
LeyboldError
-
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.
-
close
()¶ Close the backend
-
get_device_info
()¶ Get device info.
Return tuple
(sensor, page, swver)
with the sensor kind ID, data page, and software version.
-
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_pressure
(display_units=False)¶ Get pressure.
If
display_units==False
, return result in Pa; otherwise, use display units obtained usingget_units()
.
-
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"
.
-
get_units
()¶ Get device readout units (
"mbar"
,"pa"
, or"torr"
)
-
get_update
(refresh=True)¶ Get device state update.
Return tuple
(value, display_units, status, error, device_info)
, wherevalue
is the pressure in Pa,display_units
are display units ("pa"
,"mbar"
, or"torr"
),status
is the devices status (e.g., emission status),error
is the device error ("ok"
if no errors), anddevice_info
is a tuple(sensor, page, swver)
with the sensor kind ID, data page, and software version.If
refresh==True
, get the latest update value; otherwise, get the latest read value.
-
is_opened
()¶ Check if the device is connected
-
lock
(timeout=None)¶ Lock the access to the device from other threads/processes (isn’t necessarily implemented)
-
locking
(timeout=None)¶ Context manager for lock & unlock
-
open
()¶ Open the backend
-
send_command
(byte1, byte2, byte3)¶ Send command to the device.
Arguments represent the three command bytes. Values of these bytes for different commands are described in the manual.
-
set_device_variable
(key, value)¶ Set the value of a settings parameter
-
unlock
()¶ Unlock the access to the device from other threads/processes (isn’t necessarily implemented)
-