Commit 2c70e3b4 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Merges changes

Showing with 31 additions and 0 deletions
+31 -0
...@@ -211,6 +211,15 @@ class MuxAbstract(ABC): ...@@ -211,6 +211,15 @@ class MuxAbstract(ABC):
@abstractmethod @abstractmethod
def switch_one(self, elec=None, role=None, state=None): 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}') self.exec_logger.debug(f'switching {state} electrode {elec} with role {role}')
def test(self, elec_dict, activation_time=1.): def test(self, elec_dict, activation_time=1.):
...@@ -261,6 +270,12 @@ class TxAbstract(ABC): ...@@ -261,6 +270,12 @@ class TxAbstract(ABC):
@adc_gain.setter @adc_gain.setter
def adc_gain(self, value): def adc_gain(self, value):
"""
Parameters
----------
value
"""
self._adc_gain = value self._adc_gain = value
self.exec_logger.debug(f'Setting TX ADC gain to {value}') self.exec_logger.debug(f'Setting TX ADC gain to {value}')
...@@ -274,6 +289,15 @@ class TxAbstract(ABC): ...@@ -274,6 +289,15 @@ class TxAbstract(ABC):
@abstractmethod @abstractmethod
def inject(self, polarity=1, injection_duration=None): 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] assert polarity in [-1, 0, 1]
if injection_duration is None: if injection_duration is None:
injection_duration = self._injection_duration injection_duration = self._injection_duration
...@@ -305,6 +329,13 @@ class TxAbstract(ABC): ...@@ -305,6 +329,13 @@ class TxAbstract(ABC):
@polarity.setter @polarity.setter
@abstractmethod @abstractmethod
def polarity(self, polarity): def polarity(self, polarity):
"""
Sets polarity value
Parameters
----------
polarity: int
Either -1, 0 or 1.
"""
assert polarity in [-1, 0, 1] assert polarity in [-1, 0, 1]
self._polarity = polarity self._polarity = polarity
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment