qmi.instruments.santec.tsl_570
Instrument driver for the Santec TSL 570 laser.
Classes
|
Instrument driver for the Santec TSL 570 laser. |
- class qmi.instruments.santec.tsl_570.Santec_Tsl570(context: QMI_Context, name: str, transport: str)
Instrument driver for the Santec TSL 570 laser.
The driver is currently based on running at “Legacy” communication, which is also based on SCPI protocol, but perhaps not fully complying to it.
- 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.
- get_idn() QMI_InstrumentIdentification
Read instrument info and return QMI_InstrumentIdentification instance.
- Returns:
- Data with e.g. idn.vendor = SANTEC, idn.model = TSL-570,
idn.serial = 21020001, idn.version = 0001.000.0001 (firmware version).
- Return type:
- reset() None
Device reset. Aborts standby operation and clears the command input and error queues.
- clear() None
Clear Status. Clears all event registers and queues and reflects the summary in the Status Byte Register.
Clears the following items: ・Status Byte Register ・Standard Event Status Register ・Error Queue
- operation_complete() bool
Check if the previous operation is completed.
- Returns:
True for yes, False for no.
- Return type:
response
- get_errors() list[str]
Query all errors and alerts.
- Returns:
A list of all error and alert descriptions.
- Return type:
errors_and_alerts
- set_wavelength(wavelength: float) None
Set the output wavelength in nanometers.
- Parameters:
wavelength – The target wavelength in nanometers up to 0.1 pm resolution.
- Raises:
QMI_InstrumentException – If the wavelength is not in the instrument range.
- get_wavelength() float
Get the output wavelength. Default unit is nanometers.
- Returns:
The instrument wavelength in nanometers.
- Return type:
- get_minimum_wavelength() float
Get the minimum wavelength.
- Returns:
The instrument wavelength minimum in nanometers.
- Return type:
- get_maximum_wavelength() float
Get the maximum wavelength.
- Returns:
The instrument wavelength maximum in nanometers.
- Return type:
- set_frequency(frequency: float) None
Set the output frequency in terahertz.
- Parameters:
frequency – The target frequency in terahertz up to 10 MHz resolution.
- Raises:
QMI_InstrumentException – If the frequency is not in the instrument range.
- get_frequency() float
Get the output frequency. Unit depends on unit setting.
- Returns:
The instrument frequency in terahertz.
- Return type:
- get_minimum_frequency() float
Get the minimum frequency.
- Returns:
The instrument frequency minimum in terahertz.
- Return type:
- get_maximum_frequency() float
Get the maximum frequency.
- Returns:
The instrument frequency maximum in terahertz.
- Return type:
- set_wavelength_unit_to_nm() None
Set the wavelength unit to nanometers.
- set_wavelength_unit_to_thz() None
Set the wavelength unit to terahertz.
- get_wavelength_unit() str
Get the wavelength unit displayed.
- Returns:
The wavelength unit as either “THz” or “nm”.
- Return type:
wl_unit
- set_wavelength_fine(value: float) None
Set the wavelength fine-tuning value.
- Parameters:
value – The fine-tuning value in range -100.00 - +100.00 and maximal resolution of 0.01.
- Raises:
ValueError – If value is not in the correct range.
- get_wavelength_fine() float
Get the wavelength fine-tuning value.
- Returns:
The fine-tuning value in range -100.00 - +100.00 and maximal resolution of 0.01.
- Return type:
- disable_finetuning_operation() None
Terminate Fine-Tuning operation.
- set_coherence_control_status(status: bool | str) None
Set the Coherence control status.
- Parameters:
status – New status as either True or “ON”, or False or “OFF”, to set control ON and OFF, respectively.
- Raises:
AssertionError – If input parameter is a string but neither “ON” or “OFF”.
- get_coherence_control_status() str
Get the Coherence control status.
- Returns:
New status as either “ON”, or “OFF”.
- Return type:
- set_optical_output_status(status: bool | str) None
Set the optical output status.
- Parameters:
status – New status as either True or “ON”, or False or “OFF”, to set control ON and OFF, respectively.
- Raises:
AssertionError – If input parameter is a string but neither “ON” or “OFF”.
- get_optical_output_status() str
Get the optical output status.
- Returns:
New status as either “ON”, or “OFF”.
- Return type:
- set_power_level(power_level: float) None
Set optical output power level between -15dBm (~0.03mW) and peak power. Typical peak power from the datasheet https://santec.imgix.net/TSL-570-Datasheet.pdf is 13dBm (~20.00mW).
- Parameters:
power_level – power level in decibel-milliwatts or milliwatts.
- get_power_level() float
Get the output power level setting. Unit depends on unit setting.
- Returns:
The instrument power level in decibel-milliwatts or milliwatts.
- Return type:
power_level
- get_actual_power() float
Get the monitored optical power. Unit depends on unit setting.
- Returns:
The instrument power level in decibel-milliwatts or milliwatts.
- Return type:
power_level
- get_minimum_power_level() float
Get the minimum power level.
- Returns:
The instrument power level minimum in decibel-milliwatts or milliwatts.
- Return type:
power level
- get_maximum_power_level() float
Get the maximum power level.
- Returns:
The instrument power level maximum in decibel-milliwatts or milliwatts.
- Return type:
power level
- set_power_level_unit_to_mw() None
Set the power_level unit to milliwatts.
- set_power_level_unit_to_dbm() None
Set the power_level unit to decibel-milliwatts.
- get_power_level_unit() str
Get the power_level unit displayed.
- Returns:
The power_level unit as either “dBm” or “mW”.
- Return type:
wl_unit
- set_sweep_start_wavelength(wavelength: float) None
Set the start wavelength for a sweep.
- Parameters:
wavelength – wavelength in nanometers.
- get_sweep_start_wavelength() float
Get the sweep start wavelength. Default unit is nanometers.
- Returns:
The instrument wavelength in nanometers.
- Return type:
- set_sweep_stop_wavelength(wavelength: float) None
Set the stop wavelength for a sweep.
- Parameters:
wavelength – wavelength in nanometers.
- get_sweep_stop_wavelength() float
Get the sweep stop wavelength. Default unit is nanometers.
- Returns:
The instrument wavelength in nanometers.
- Return type:
- set_sweep_start_frequency(frequency: float) None
Set the start frequency for a sweep.
- Parameters:
frequency – Frequency in terahertz.
- get_sweep_start_frequency() float
Get the sweep start frequency. Default unit is terahertz.
- Returns:
The instrument frequency in nanometers.
- Return type:
- set_sweep_stop_frequency(frequency: float) None
Set the stop frequency for a sweep.
- Parameters:
frequency – Frequency in terahertz.
- get_sweep_stop_frequency() float
Get the sweep stop frequency. Default unit is terahertz.
- Returns:
The instrument frequency in nanometers.
- Return type:
- set_sweep_mode(mode: int) None
Set sweep mode. Possible modes are: 0 - Step sweep mode and One way 1 - Continuous sweep mode and One way 2 - Step sweep mode and Two way 3 - Continuous sweep mode and Two way
- Parameters:
mode – Integer in range [0, 3].
- set_sweep_speed(speed: int) None
Set sweep speed. Possible speed values are 1,2,5,10,20,50,100,200nm/s.
- Parameters:
speed – speed in nm/s.
- set_sweep_dwell(dwell: float) None
Set _stepped_ sweep dwell. Possible dwell range is 0-999.9s in 0.1nm steps. It does not take into account delay in one-way sweeps to return to the start frequency.
- Parameters:
dwell – Dwell between sweep steps in range [0, 1000[s.
- get_sweep_dwell() float
Get dwell between sweep steps.
- Returns:
Dwell in range [0, 1000[s.
- Return type:
dwell
- set_sweep_delay(delay: float) None
Set _continuous_ sweep delay. Possible delay range is 0-999.9s in 0.1nm steps. It does not take into account delay in one-way sweeps to return to the start frequency.
- Parameters:
delay – Delay between sweeps in range [0, 1000[s.
- get_sweep_delay() float
Get delay between sweeps.
- Returns:
Delay in range [0, 1000[s.
- Return type:
delay
- set_sweep_cycles(cycles: int) None
Set sweep repetition times. Possible number of repetitions are in range [0, 999].
- Parameters:
cycles – Integer in range [0, 999].
- get_sweep_cycles() int
Get sweep repetition times.
- Returns:
Integer in range [0, 999].
- Return type:
cycles
- set_sweep_state(state: int) None
Set sweep state. Possible states are: 0 - Stop 1 - Start
- Parameters:
state – Integer in range [0, 1].
- start_repeating_sweep() None
Start a repeating sweep.
- get_sweep_state() int
Get sweep state. Possible states are: 0 - Stopped 1 - Running 3 - Standing by trigger 4 - Preparation for sweep start
- Returns:
Integer in range [0, 4].
- Return type:
- set_trigger_output_timing_mode(mode: int) None
Set trigger output timing mode. Possible modes are: 0 - None 1 - Stop 2 - Start 3 - Step
- Parameters:
mode – Integer in range [0, 3].
- get_trigger_output_timing_mode() int
Get trigger output timing mode.
- Returns:
Integer in range [0, 3].
- Return type:
- set_trigger_output_period_mode(mode: int) None
Set trigger output period mode. Possible modes are: 0 - Sets the output trigger to be periodic in time. 1 - Sets the output trigger to be periodic in wavelength.
- Parameters:
mode – Integer in range [0, 1].
- get_trigger_output_period_mode() int
Get trigger output period mode.
- Returns:
Integer in range [0, 1].
- Return type:
- set_trigger_output_step(step: float) None
Set trigger output step. Possible step range is from 0.0001 to ~ maximum specified wavelength range in 0.0001nm steps.
- Parameters:
step – Interval of the trigger signal output [0.0001, max wavelength] in nanometers.
- get_trigger_output_step() float
Get trigger output step.
- Returns:
Step in range [0.0001, max wavelength]nm.
- Return type:
step
- issue_soft_trigger() None
Issues a soft trigger, executing sweep from trigger standby mode.
- readout_points() int
reads the number of logging data available.
- Returns:
The number of logging data available.
- readout_data() list[float]
Read out wavelength logging data and convert it into floating point values. According to the manual the data points are returned in units of 0.1pm. Thus, value 0x0040F844 (little Endian order) = 4520000 corresponds to 452.0000nm.
- Returns:
Data points list converted into nanometers.
- Return type:
- shutdown() None
Shut down the device. Breaks also communication with the device.
- reboot() None
Restarts the device. This takes about 60 seconds. Note that the communication to the device also resets, so continuing with the same proxy is not possible, but a new one needs to be made.
- 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.