diff --git a/ohmpi/hardware_components/abstract_hardware_components.py b/ohmpi/hardware_components/abstract_hardware_components.py index 06b6f8bad1590d7ced89cfab6155a5f8adc5e3a1..27308832c6e9e7d1058368b7bbf47baab470b2f7 100644 --- a/ohmpi/hardware_components/abstract_hardware_components.py +++ b/ohmpi/hardware_components/abstract_hardware_components.py @@ -381,6 +381,7 @@ class RxAbstract(ABC): self._max_sampling_rate = np.inf self._latency = kwargs.pop('latency', 0.) self._bias = kwargs.pop('bias', 0.) + self._vmn_hardware_offset = kwargs.pop('vmn_hardware_offset', 0.) @property def adc_gain(self): diff --git a/ohmpi/hardware_components/mb_2023_0_X.py b/ohmpi/hardware_components/mb_2023_0_X.py index 9a1fa8a21698c6429d7b47ba993d564045729b6e..d06e69e108dc29b40f914356a04833e689b4ae40 100644 --- a/ohmpi/hardware_components/mb_2023_0_X.py +++ b/ohmpi/hardware_components/mb_2023_0_X.py @@ -26,6 +26,7 @@ SPECS = {'rx': {'sampling_rate': {'min': 2., 'default': 10., 'max': 100.}, 'bias': {'min': -5000., 'default': 0., 'max': 5000.}, 'coef_p2': {'default': 2.50}, 'voltage_min': {'default': 10.0}, + 'vmn_hardware_offset': {'default': 0.} }, 'tx': {'adc_voltage_min': {'default': 10.}, # Minimum voltage value used in vmin strategy 'adc_voltage_max': {'default': 4500.}, # Maximum voltage on ads1115 used to measure current @@ -191,7 +192,7 @@ class Tx(TxAbstract): assert self.adc_voltage_min / (50 * self.r_shunt) <= value <= self.adc_voltage_max / (50 * self.r_shunt) self.exec_logger.warning(f'Current pulse is not implemented for the {self.board_name} board') - def gain_auto(self): + def gain_auto_one_pulse(self): self._adc_gain_auto() def inject(self, polarity=1, injection_duration=None): @@ -300,7 +301,7 @@ class Rx(RxAbstract): self.gain = gain self.exec_logger.event(f'{self.board_name}\trx_adc_auto_gain\tend\t{datetime.datetime.utcnow()}') - def gain_auto(self): + def gain_auto_one_pulse(self): self._adc_gain_auto() @property def voltage(self):