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 6cdc7cff7f7f00dace868e08e5092a82a8b17521..e5f90ebae677545d29ce3b6c3a96c959a467fc67 100644 --- a/ohmpi/hardware_components/mb_2023_0_X.py +++ b/ohmpi/hardware_components/mb_2023_0_X.py @@ -18,6 +18,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 @@ -141,7 +142,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): @@ -250,7 +251,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):