diff --git a/ohmpi/hardware_components/abstract_hardware_components.py b/ohmpi/hardware_components/abstract_hardware_components.py index ae6f742964cf3cd3f44bb417e31eb3ac96848cd3..a26901846929a56ac39424164f6bb2be12c8b78f 100644 --- a/ohmpi/hardware_components/abstract_hardware_components.py +++ b/ohmpi/hardware_components/abstract_hardware_components.py @@ -211,6 +211,15 @@ class MuxAbstract(ABC): @abstractmethod def switch_one(self, elec=None, role=None, state=None): + """Switches one single relay. + + Parameters + ---------- + elec : + role : + state : str, optional + Either 'on' or 'off'. + """ self.exec_logger.debug(f'switching {state} electrode {elec} with role {role}') def test(self, elec_dict, activation_time=1.): @@ -261,6 +270,12 @@ class TxAbstract(ABC): @adc_gain.setter def adc_gain(self, value): + """ + + Parameters + ---------- + value + """ self._adc_gain = value self.exec_logger.debug(f'Setting TX ADC gain to {value}') @@ -274,6 +289,15 @@ class TxAbstract(ABC): @abstractmethod def inject(self, polarity=1, injection_duration=None): + """ + Abstract method to define injection + Parameters + ---------- + polarity: int, default 1 + Injection polarity, can be eiter 1, 0 or -1 + injection_duration: float, default None + Injection duration in seconds + """ assert polarity in [-1, 0, 1] if injection_duration is None: injection_duration = self._injection_duration @@ -305,6 +329,13 @@ class TxAbstract(ABC): @polarity.setter @abstractmethod def polarity(self, polarity): + """ + Sets polarity value + Parameters + ---------- + polarity: int + Either -1, 0 or 1. + """ assert polarity in [-1, 0, 1] self._polarity = polarity