Ophir Base
This subpackage contains the OphirBase base class, which works already for many devices.
It contains also Mixins for some features.
- class pymeasure.instruments.ophir.ophir_base.OphirCommunication(adapter, name='Ophir', **kwargs)
Bases:
InstrumentBase class for serial communication with Ophir devices, does not contain properties.
This communication is ASCII based and suitable for RS-232 and USB communication.
For USB exists a COM (win32) object as well, which can be used as an alternative to this driver.
- check_errors()
Check for errors after setting a value.
- Return type:
list[Any]
- read(**kwargs)
Read a response.
- Return type:
str
- values(command, separator=', ', cast=<class 'float'>, **kwargs)
Write a command to the instrument and return a list of formatted values from the result.
- Return type:
list[Union[TypeVar(T),str]]
- write(command, **kwargs)
Send a command to the device.
- Return type:
None
- class pymeasure.instruments.ophir.ophir_base.OphirBase(adapter, name='Ophir', **kwargs)
Bases:
OphirCommunicationRepresents an Ophir laser power/energy meter device.
These commands are common to the USBI, Juno, Juno+, NovaII, Vega, StarLite, StarBright, and Centauri devices. Several of these devices implement even more commands, for which Mixin classes exist as well. Other devices, like Nova and Pulsar, only implement a subclass of these commands.
- class Capabilities(*values)
Bases:
IntFlag
- class LegacyModes(*values)
Bases:
Enum
- class Modes(*values)
Bases:
IntEnum
- class ScreenModes(*values)
Bases:
IntEnum
- property baud_rate: Any
Control the communication baud rate.
- property bc20_mode: Any
Control BC20 sensor mode. Some devices can use mode as well.
- clear_wavelength_entry(index)
Clear the wavelength at index (0 based) in the wavelength list.
It must not be the currently active index. To set a new value use
define_wavelength_entry(). See the currently defined entries and wavelength limits withwavelength_list.- Return type:
None
- define_wavelength_entry(index, value)
Define the wavelength in nm at index (0 based) in the wavelength list.
The slot of the wavelength list must be empty, you can clear it with
clear_wavelength_entry(). See the currently defined entries and wavelength limits withwavelength_list.- Return type:
None
- property diffuser: Any
Control pyroelectric sensors diffuser.
- property energy: Any
Get the most recent energy measurement in J.(dynamic)
- property energy_flag: Any
Get whether a new energy measurement arrived.
- property energy_ready: Any
Get whether the sensor is ready for a new energy measurement.
- property energy_threshold: Any
Control the energy threshold of the sensor, returns a list of possible values.
- property exposure_energy: Any
Get exposure energy in J, count of pulses, and time in s.
- property frequency: Any
Get latest frequency in Hz.
- property head_information: HeadInfo
Get information about the sensor head.
- property head_type: Any
Get the more specific head type.
- property id: Any
Get information about the instrument. It is a list with ‘instrument’, ‘serialNumber’, ‘name’.
- property mains: Any
Control the configured mains frequency.
- property maximum_frequency: Any
Get the maximum sensor pulse frequency for energy pulses in Hz.
- property mode_legacy: Any
Set the measurement mode with one of
LegacyModes, if possible, usemodeinstead.
- property position: Any
Get the position (x,y) and spot size in mm.
- property power: Any
Get next power measurement in W.(dynamic)
- property pulse_length: Any
Control the maximum pulse length for measurement.(dynamic)
- property range: Any
Control the current range setting, See
range_entriesfor possible values.(dynamic)
- property range_entries: dict[str, int]
Get all possible ranges and their index.
Auto is, if present, -1. The range with the highest numeric value is 0.
- property range_index: Any
Control the index of the range in the list of ranges.
- property range_max: Any
Get maximum allowable reading at current range.
- reset()
Reset the device, for example after a head change.
- Return type:
None
- save_head_configuration(config)
Save selected sensor configuration. :rtype:
None‘S’ for startup
‘C’ for calibration
‘R’ for Responsive for thermopile sensors
Response is “*SAVED” or “*UNCHANGED” or “?FAILED”.
- save_instrument_configuration()
Save instrument configuration.
Response is “*SAVED” or “*UNCHANGED” or “?FAILED”.
- Return type:
None
- save_zero()
Save result of zeroing process to memory.
- Return type:
None
- property screen_mode: Any
Set the device to a specific screen mode, use
ScreenModes.
- property sensor_filter: Any
Control photodiode sensors filter.
- property software_version: Any
Get the current software version.
- start_streaming(downsampling=0)
Start streaming mode, where the device sends every downsampling measurement.
- Return type:
None
- stop_streaming()
Stop streaming mode.
- Return type:
None
- property threshold: Any
Control the threshold of the sensor as fraction (4 decimals), returns current, min, and max.
- property units: Any
Get the current measurement unit.
- property wavelength: Any
Control the selected wavelength (range) in list of wavelengths.
Read this attribute or
wavelength_listto update the list of available wavelengths. Usewavelength_valueto set the value of the current wavelength entry. (dynamic)
- property wavelength_index: Any
Control the index of the wavelength in the wavelength list.
- property wavelength_list: tuple[tuple[float, float] | None, Sequence[float | str | None]]
Get wavelength limits for continuous sensor and wavelength list.
- property wavelength_value: Any
Set the wavelength of the currently selected entry in nm (continuous sensor only, int). (dynamic)
- zero()
Zero the measurement circuitry. Recommended once every two months.
- Return type:
None
- zero_abort()
Abort a zeroing, if underway and return the status as string.
- Return type:
None
- property zero_status: Any
Get the status of the zeroing process.
- class pymeasure.instruments.ophir.ophir_base.ChannelMixin
Bases:
objectMixin for channels.
For Pulsar, Centauri.
- property channel: Any
The channel for Pulsar or Centauri devices, starts at 1.
- class pymeasure.instruments.ophir.ophir_base.AverageMixin
Bases:
objectMixin for averaging methods.
For Nova II, Vega.
- property average: Any
Get the latest averaged measurement.
- property average_configuration: Any
Control the averaging of the sensor.
- property average_flag: Any
Get whether a new average reading has been processed.
- class pymeasure.instruments.ophir.ophir_base.KeyMixin(**kwargs)
Bases:
CommonBaseMixin for pressing keys remotely.
- class Keys(*values)
Bases:
IntEnum
- key_legends()
Return the legends of the keys. A tilde ‘~’ indicates active key.
- Return type:
str
- press_key(key)
Simulate a keypress.
Below display from left to right (0 to 3) Arrows: right (4), left (5), up (6), down (7), Enter(8).
- Return type:
None