Commit 005e88e4 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes bug in _compute_tx_volt

Showing with 5 additions and 5 deletions
+5 -5
......@@ -511,11 +511,11 @@ class OhmPiHardware:
# ax.plot([0, vab_max], [0, vmn_upper_bound * vab_max / vab[k]], '-r', alpha=(k + 1) / n_steps)
# ax.plot([0, vab_max], [0, vmn_lower_bound * vab_max / vab[k]], '-g', alpha=(k + 1) / n_steps)
# bounds on rab
rab_lower_bound = np.min([0.1, vab_list[k] / iab_upper_bound])
rab_upper_bound = np.min([0.1, vab_list[k] / iab_lower_bound])
rab_lower_bound = np.min([0.1, np.abs(vab_list[k] / iab_upper_bound)])
rab_upper_bound = np.min([0.1, np.abs(vab_list[k] / iab_lower_bound)])
# bounds on r
r_lower_bound = np.min([0.01, vmn_lower_bound / iab_upper_bound])
r_upper_bound = np.min([0.01, vmn_upper_bound / iab_lower_bound])
r_lower_bound = np.min([0.01, np.abs(vmn_lower_bound / iab_upper_bound)])
r_upper_bound = np.min([0.01, np.abs(vmn_upper_bound / iab_lower_bound)])
# conditions for vab update
cond_vmn_max = rab_lower_bound / r_upper_bound * vmn_max
cond_p_max = np.sqrt(p_max * rab_lower_bound)
......
......@@ -491,7 +491,7 @@ class OhmPi(object):
# tx_volt = float(kwargs.pop('tx_volt', self.settings['tx_volt']))
bypass_check = kwargs['bypass_check'] if 'bypass_check' in kwargs.keys() else False
if self.switch_mux_on(quad, bypass_check=bypass_check, cmd_id=cmd_id):
# tx_volt,_ ,_ = self._hw._compute_tx_volt(tx_volt=tx_volt, strategy=strategy)
tx_volt,_ ,_ = self._hw._compute_tx_volt(tx_volt=tx_volt, strategy=strategy)
self._hw.vab_square_wave(tx_volt, cycle_duration=injection_duration*2/duty_cycle, cycles=nb_stack, duty_cycle=duty_cycle)
if 'delay' in kwargs.keys():
delay = kwargs['delay']
......
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