power_dBm#
method
- TSL550.power_dBm(val: float = None) float[source]#
Set the output optical power in decibel-milliwatts (dBm).
This functionality will only work in automatic power mode. It can be set while the photodiode is turned on or off.
If a value is not specified, returns the current power. The current power being the actual live power coming out of the laser. If the photodiode is off, the power read out will be -40dBm even if it has been set to a different value.
The valid range is -17 to +13 (dBm, typical) with a minimum step of 0.01 (dBm).
- Parameters:
- valfloat, optional
The power to be set on the laser in decibel-milliwatts.
- Returns:
- float
The currently set power in decibel-milliwatts.
Examples
You can get the current power by calling without arguments. The below code indicates the currently output power is -40 dBm.
>>> laser.power_dBm() -040.000
The following sets the output optical power to +3 dBm.
>>> laser.power_dBm(3)