diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index 694e1425a967366a6e44f47c346286f3fe9b9af6..47f6344cc4994e38b3f0e086e87e1ab55c6ca4ca 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -342,7 +342,7 @@ class OhmPiHardware: cond_p_max = np.sqrt(p_max * rab_lower_bound) cond_iab_max = rab_lower_bound * iab_max # print(f'Rab: [{rab_lower_bound:.1f}, {rab_upper_bound:.1f}], R: [{r_lower_bound:.1f},{r_upper_bound:.1f}]') - # print(f'{k}: [{vab_max:.1f}, {cond_vmn_max:.1f}, {cond_p_max:.1f}, {cond_iab_max:.1f}]') + print(f'{k}: [{vab_max:.1f}, {cond_vmn_max:.1f}, {cond_p_max:.1f}, {cond_iab_max:.1f}]') new_vab = np.min([vab_max, cond_vmn_max, cond_p_max, cond_iab_max]) if new_vab == vab_max: print(f'Vab {new_vab} bounded by Vab max') @@ -410,6 +410,8 @@ class OhmPiHardware: if p_max is None: p_max = vab_max * iab_max + vab_max = np.abs(vab_max) + vmn_min = np.abs(vmn_min) # Set gain at min self.rx.reset_gain() vab_opt = tx_volt @@ -418,8 +420,7 @@ class OhmPiHardware: vab_max = vab vab = vab * .9 strategy = 'vmax' - vab_max = np.abs(vab_max) - vmn_min = np.abs(vmn_min) + k = 0 vab_list = np.zeros(n_steps + 1) * np.nan