KeysightN777C#
Controls a Keysight N777-C tunable laser (N7776C, N7778C or N7779C) from Python. This class inherits from MeasmaticDevice.
property wavelength_max#
Maximum wavelength that the laser supports, read from the device during initialization.
Returns#
| Type | Description |
|---|---|
| float | The maximum wavelength in meters. |
Example#
laser = measmatic.get_device('device-n777c')
print(laser.wavelength_max)
property wavelength_min#
Minimum wavelength that the laser supports, read from the device during initialization.
Returns#
| Type | Description |
|---|---|
| float | The minimum wavelength in meters. |
Example#
laser = measmatic.get_device('device-n777c')
print(laser.wavelength_min)
method get_output_power()#
Reads the actual output power of the laser.
Returns#
| Type | Description |
|---|---|
| float | The output power in the unit set with set_unit (dBm or W). |
Example#
laser = measmatic.get_device('device-n777c')
power = laser.get_output_power()
method get_wavelength()#
Reads the currently set wavelength of the laser.
Returns#
| Type | Description |
|---|---|
| float | The wavelength in meters. |
Example#
laser = measmatic.get_device('device-n777c')
wavelength = laser.get_wavelength()
method is_laser_turned_on()#
Checks whether the laser output is active.
Returns#
| Type | Description |
|---|---|
| bool | True if the laser is on, otherwise False. |
Example#
laser = measmatic.get_device('device-n777c')
if laser.is_laser_turned_on():
laser.switch_laser(False)
method is_lock_enabled()#
Checks whether the laser lock is set.
Returns#
| Type | Description |
|---|---|
| bool | True if the lock is set and the laser cannot be activated, otherwise False. |
Example#
laser = measmatic.get_device('device-n777c')
locked = laser.is_lock_enabled()
method set_output_power(outputLevel: float)#
Sets the output power of the laser. The unit of the value is defined with set_unit.
Parameters#
| Name | Description |
|---|---|
| outputLevel | The output power in the unit set with set_unit (dBm or W). |
Example#
laser = measmatic.get_device('device-n777c')
laser.set_unit('Dbm')
laser.set_output_power(0.0)
method set_unit(unit: Any)#
Sets the unit of the output power (dBm or W).
Parameters#
| Name | Description |
|---|---|
| unit | The power unit, of type Atv.Framework.Devices.Optical.TunableLasers.KeysightN777C.Unit (Dbm or Watt). |
Example#
laser = measmatic.get_device('device-n777c')
from Atv.Framework.Devices.Optical.TunableLasers.KeysightN777C import Unit
laser.set_unit(Unit.Dbm)
method set_unit(unitString: str)#
Sets the unit of the output power (dBm or W) by name.
Parameters#
| Name | Description |
|---|---|
| unitString | The unit name: 'Dbm' or 'Watt' (case-insensitive), or 'W' for Watt. |
Example#
laser = measmatic.get_device('device-n777c')
laser.set_unit('Dbm')
laser.set_unit('W')
method set_wavelength(wavelengthInMeter: float)#
Sets the wavelength of the laser.
Parameters#
| Name | Description |
|---|---|
| wavelengthInMeter | The wavelength in meters. |
Example#
laser = measmatic.get_device('device-n777c')
laser.set_wavelength(1550e-9)
method switch_laser(isLaserTurnedOn: bool)#
Turns the laser output on or off.
Parameters#
| Name | Description |
|---|---|
| isLaserTurnedOn | True to turn the laser on, False to turn it off. |
Example#
laser = measmatic.get_device('device-n777c')
laser.switch_laser(True)
method switch_lock(isLockEnabled: bool, password: str = '1234')#
Sets or removes the lock that prevents activating the laser.
Parameters#
| Name | Description |
|---|---|
| isLockEnabled | True to set the lock, False to remove it. |
| password | The password configured on the device. Defaults to '1234'. Default: '1234' |
Example#
laser = measmatic.get_device('device-n777c')
laser.switch_lock(False, '1234')