power_from_voltage

lsst.ts.atwhitelight.power_from_voltage(voltage, atol=0.1)

Compute requested lamp power from set voltage.

Note that the KiloArc quantizes power in 2.3W steps, and the LabJack quantizes its DAC outputs. Neither of these is handled by this function, beyond providing the atol argument.

Parameters:
voltagefloat

The voltage to provide to the lamp power input of the KiloArc lamp controller (V).

atolfloat

Absolulute tolerance for range checking (V). This allows for quantization error and electrical noise.

Returns:
powerfloat

Desired lamp power (W)

Raises:
lsst.ts.salobj.ExpectedError

If voltage < VOLTS_AT_MIN_POWER - atol or voltage > VOLTS_AT_MAX_POWER + atol