diff --git a/measure.py b/measure.py index 39b1088d059c23dfe717afebdb756e42ead5f0c5..e1888c7ec81c1632cea59290bf42c12bfaacedd1 100644 --- a/measure.py +++ b/measure.py @@ -152,7 +152,7 @@ class OhmPiHardware: return vab, polarity, rab def vab_square_wave(self, vab, length, sampling_rate, cycles=3): - self._vab_pulses(self, vab, [length]*cycles, sampling_rate) + self._vab_pulses(vab, [length]*cycles, sampling_rate) def _vab_pulse(self, vab, length, sampling_rate=None, polarity=None, append=False): """ Gets VMN and IAB from a single voltage pulse diff --git a/test_measure_with_ohmpi_card_3_15.py b/test_measure_with_ohmpi_card_3_15.py index 141ec9b461e1f046ab0e7b02a6e77c2c9fc8d38f..8135d8eb95625655a522bd20c72baf2ea7415498 100644 --- a/test_measure_with_ohmpi_card_3_15.py +++ b/test_measure_with_ohmpi_card_3_15.py @@ -6,7 +6,7 @@ from OhmPi.measure import OhmPiHardware k = OhmPiHardware() k.vab_square_wave(vab=12, length=1., sampling_rate=k.rx.sampling_rate, cycles=3) -r = k.readings[:,4]*k.readings[:,2]/k.readings[:,1] +r = k.readings[:,3]*k.readings[:,2]/k.readings[:,1] print(f'Mean resistance: {np.mean(r):.3f} Ohms, Dev. {100*np.std(r)/np.mean(r):.1f} %') print(f'sampling rate: {k.rx.sampling_rate:.1f} ms, mean sample spacing: {np.mean(np.diff(k.readings[:,0]))*1000.:.1f} ms') change_config('config_default.py', verbose=False)