power_att

power_att#

method

TSL550.power_att(val: float = None) float[source]#

Sets the internal attenuator value.

This functionality will only work in manual power mode. It can be set while the photodiode is turned on or off.

If the parameter is not specified, reads out the current value.

The range for val is 0 to +30 (dB) with a minimum step of 0.01 (dB).

Parameters:
valfloat, optional

The internal attenuator value to be set on the laser in decibels.

Returns:
float

The currently set internal attenuator value in decibels.

Examples

You can get the current setting by calling without arguments. The below code indicates the current setting is 25 dB.

>>> laser.power_att()
25.000

The following sets the internal attenuator value to 28 dB.

>>> laser.power_att(28)