qmi.instruments.thorlabs.pm100d

Instrument driver for the Thorlabs PM100D and compatible optical power meter.

Classes

SensorInfo(name, serial, cal_msg, type, ...)

Thorlabs_PM100D(context, name, transport)

Alias class for PM100D; uses the interface of PM10x.

Thorlabs_PM100USB(context, name, transport)

Alias class for PM100USB; uses the interface of PM10x.

Thorlabs_PM101U(context, name, transport)

Alias class for PM101U; uses the interface of PM10x.

Thorlabs_PM10x(context, name, transport)

General instrument driver for the Thorlabs PM10x optical power meters.

Thorlabs_PM16_120(context, name, transport)

Alias class for PM16_120; uses the interface of PM10x.

class qmi.instruments.thorlabs.pm100d.SensorInfo(name, serial, cal_msg, type, subtype, flags)
cal_msg: str

Alias for field number 2

count(value, /)

Return number of occurrences of value.

flags: int

Alias for field number 5

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

name: str

Alias for field number 0

serial: str

Alias for field number 1

subtype: str

Alias for field number 4

type: str

Alias for field number 3

class qmi.instruments.thorlabs.pm100d.Thorlabs_PM10x(context: QMI_Context, name: str, transport: str)

General instrument driver for the Thorlabs PM10x optical power meters.

This driver is also compatible with the Thorlabs PM16-120.

static list_instruments() List[str]

Return a list of QMI transport descriptors for attached power meters.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

reset() None

Reset the instrument, returning (most) settings to their defaults.

get_idn() QMI_InstrumentIdentification

Read instrument type and version and return QMI_InstrumentIdentification instance.

get_sensor_info() SensorInfo

Get sensor type and return information as a SensorInfo instance.

get_timestamped_power() Tuple[float, float]

Start measurement and return measured power [W].

get_power() float

Start measurement and return measured power [W].

This function is part of a generic power meter API and must be supported by all power meter implementations.

get_range() float

Get measurement range [W].

get_range_in_use() float

Return the currently used measuring range in Watt.

This function is part of a generic power meter API and must be supported by all power meter implementations. Other implementations may return the range as an index or code.

set_range(measurement_range: float) None

Set measurement range [W].

get_autorange() bool

Return True if the power meter is in auto range mode.

set_autorange(enable: bool) None

Enable or disable auto range mode.

This function is part of a generic power meter API and must be supported by all power meter implementations.

get_wavelength() float

Return configured wavelength [nm].

set_wavelength(wavelength: float) None

Configure the wavelength in nm.

This function is part of a generic power meter API and must be supported by all power meter implementations.

get_current() float

Start measurement and return measured diode current in Ampere.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.thorlabs.pm100d.Thorlabs_PM100D(context: QMI_Context, name: str, transport: str)

Alias class for PM100D; uses the interface of PM10x.

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

get_autorange() bool

Return True if the power meter is in auto range mode.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current() float

Start measurement and return measured diode current in Ampere.

get_idn() QMI_InstrumentIdentification

Read instrument type and version and return QMI_InstrumentIdentification instance.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_power() float

Start measurement and return measured power [W].

This function is part of a generic power meter API and must be supported by all power meter implementations.

get_range() float

Get measurement range [W].

get_range_in_use() float

Return the currently used measuring range in Watt.

This function is part of a generic power meter API and must be supported by all power meter implementations. Other implementations may return the range as an index or code.

get_sensor_info() SensorInfo

Get sensor type and return information as a SensorInfo instance.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_timestamped_power() Tuple[float, float]

Start measurement and return measured power [W].

get_wavelength() float

Return configured wavelength [nm].

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

static list_instruments() List[str]

Return a list of QMI transport descriptors for attached power meters.

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

reset() None

Reset the instrument, returning (most) settings to their defaults.

set_autorange(enable: bool) None

Enable or disable auto range mode.

This function is part of a generic power meter API and must be supported by all power meter implementations.

set_range(measurement_range: float) None

Set measurement range [W].

set_wavelength(wavelength: float) None

Configure the wavelength in nm.

This function is part of a generic power meter API and must be supported by all power meter implementations.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.thorlabs.pm100d.Thorlabs_PM100USB(context: QMI_Context, name: str, transport: str)

Alias class for PM100USB; uses the interface of PM10x.

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

get_autorange() bool

Return True if the power meter is in auto range mode.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current() float

Start measurement and return measured diode current in Ampere.

get_idn() QMI_InstrumentIdentification

Read instrument type and version and return QMI_InstrumentIdentification instance.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_power() float

Start measurement and return measured power [W].

This function is part of a generic power meter API and must be supported by all power meter implementations.

get_range() float

Get measurement range [W].

get_range_in_use() float

Return the currently used measuring range in Watt.

This function is part of a generic power meter API and must be supported by all power meter implementations. Other implementations may return the range as an index or code.

get_sensor_info() SensorInfo

Get sensor type and return information as a SensorInfo instance.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_timestamped_power() Tuple[float, float]

Start measurement and return measured power [W].

get_wavelength() float

Return configured wavelength [nm].

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

static list_instruments() List[str]

Return a list of QMI transport descriptors for attached power meters.

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

reset() None

Reset the instrument, returning (most) settings to their defaults.

set_autorange(enable: bool) None

Enable or disable auto range mode.

This function is part of a generic power meter API and must be supported by all power meter implementations.

set_range(measurement_range: float) None

Set measurement range [W].

set_wavelength(wavelength: float) None

Configure the wavelength in nm.

This function is part of a generic power meter API and must be supported by all power meter implementations.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.thorlabs.pm100d.Thorlabs_PM101U(context: QMI_Context, name: str, transport: str)

Alias class for PM101U; uses the interface of PM10x.

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

get_autorange() bool

Return True if the power meter is in auto range mode.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current() float

Start measurement and return measured diode current in Ampere.

get_idn() QMI_InstrumentIdentification

Read instrument type and version and return QMI_InstrumentIdentification instance.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_power() float

Start measurement and return measured power [W].

This function is part of a generic power meter API and must be supported by all power meter implementations.

get_range() float

Get measurement range [W].

get_range_in_use() float

Return the currently used measuring range in Watt.

This function is part of a generic power meter API and must be supported by all power meter implementations. Other implementations may return the range as an index or code.

get_sensor_info() SensorInfo

Get sensor type and return information as a SensorInfo instance.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_timestamped_power() Tuple[float, float]

Start measurement and return measured power [W].

get_wavelength() float

Return configured wavelength [nm].

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

static list_instruments() List[str]

Return a list of QMI transport descriptors for attached power meters.

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

reset() None

Reset the instrument, returning (most) settings to their defaults.

set_autorange(enable: bool) None

Enable or disable auto range mode.

This function is part of a generic power meter API and must be supported by all power meter implementations.

set_range(measurement_range: float) None

Set measurement range [W].

set_wavelength(wavelength: float) None

Configure the wavelength in nm.

This function is part of a generic power meter API and must be supported by all power meter implementations.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

class qmi.instruments.thorlabs.pm100d.Thorlabs_PM16_120(context: QMI_Context, name: str, transport: str)

Alias class for PM16_120; uses the interface of PM10x.

close() None

Close the connection to the instrument hardware and release associated resources.

When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.

Subclasses can extend this method if they have specific resources to close. If they do, they should call super().close() as a last statement.

force_unlock() None

Forcefully unlock the remote object.

This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.

Use this with care.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

get_autorange() bool

Return True if the power meter is in auto range mode.

classmethod get_category() str | None

Return the optional name of the category this object belongs to.

A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.

get_current() float

Start measurement and return measured diode current in Ampere.

get_idn() QMI_InstrumentIdentification

Read instrument type and version and return QMI_InstrumentIdentification instance.

get_name() str

Return the name of this object.

Returns:

name attribute.

get_power() float

Start measurement and return measured power [W].

This function is part of a generic power meter API and must be supported by all power meter implementations.

get_range() float

Get measurement range [W].

get_range_in_use() float

Return the currently used measuring range in Watt.

This function is part of a generic power meter API and must be supported by all power meter implementations. Other implementations may return the range as an index or code.

get_sensor_info() SensorInfo

Get sensor type and return information as a SensorInfo instance.

get_signals() list[SignalDescription]

Return a list of signals that can be published by this object.

Returns:

List consisting of qmi_signals attributes.

get_timestamped_power() Tuple[float, float]

Start measurement and return measured power [W].

get_wavelength() float

Return configured wavelength [nm].

is_locked() bool

Query if the remote object is locked.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

is_open() bool

Return True if the instrument is open (ready for interaction).

static list_instruments() List[str]

Return a list of QMI transport descriptors for attached power meters.

lock(timeout: float = 0.0, lock_token: str | None = None) bool

Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.

If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.

open() None

Connect to the instrument hardware.

When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.

Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call super().open() as a last statement.

release_rpc_object() None

Give a warning if the instrument is removed while still open.

reset() None

Reset the instrument, returning (most) settings to their defaults.

set_autorange(enable: bool) None

Enable or disable auto range mode.

This function is part of a generic power meter API and must be supported by all power meter implementations.

set_range(measurement_range: float) None

Set measurement range [W].

set_wavelength(wavelength: float) None

Configure the wavelength in nm.

This function is part of a generic power meter API and must be supported by all power meter implementations.

unlock(lock_token: str | None = None) bool

Unlock the remote object.

Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.

Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.