From e9d01e1c9283e8e3b8f57c03c2351c0dd1ed493e Mon Sep 17 00:00:00 2001 From: Dominic Oram Date: Tue, 1 Aug 2023 10:58:54 +0100 Subject: [PATCH] Added better docstrings for the attenuator --- src/dodal/devices/attenuator.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dodal/devices/attenuator.py b/src/dodal/devices/attenuator.py index a8ca8b099e..74d0105363 100644 --- a/src/dodal/devices/attenuator.py +++ b/src/dodal/devices/attenuator.py @@ -13,9 +13,15 @@ class AtteunatorFilter(Device): class Attenuator(Device): - # Sets transmission - range 0-1 - def set(self, transmission) -> SubscriptionStatus: - """Get desired states and calculated states, return a status which is complete once they are equal""" + """Any reference to transmission (both read and write) in this Device is fraction + e.g. 0-1""" + + def set(self, transmission: float) -> SubscriptionStatus: + """Set the transmission to the fractional value given. + Args: + transmission (float): A fraction to set transmission to between 0-1 + Get desired states and calculated states, return a status which is complete once they are equal + """ LOGGER.info("Using current energy ") self.use_current_energy.set(1).wait()