diff --git a/doc/source/V2_00.rst b/doc/source/V2_00.rst index 907cb3aba651c8e6e3e682904fa5114e21e310bd..a8365ebd50afeeb6318318d95ed457c9d948688d 100644 --- a/doc/source/V2_00.rst +++ b/doc/source/V2_00.rst @@ -73,6 +73,7 @@ Ohmpi 2 step by step Ohmpi_V2_00/V2_00_step_02 Ohmpi_V2_00/V2_00_step_03 Ohmpi_V2_00/V2_00_step_04 + Ohmpi_V2_00/V2_00_usage diff --git a/ohmpi.py b/ohmpi.py index ae3d891d818333a84eb9c15978fc5274288deac1..59f32c08b597c774dbe114ce044d7ea856690f14 100644 --- a/ohmpi.py +++ b/ohmpi.py @@ -527,31 +527,34 @@ class OhmPi(object): def run_measurement(self, quad=[1, 2, 3, 4], nb_stack=None, injection_duration=None, - tx_volt=5, autogain=True, best_tx_injtime=0.1, strategy='constant'): + autogain=True, strategy='constant', tx_volt=5, best_tx_injtime=0.1): """Do a 4 electrode measurement and measure transfer resistance obtained. Parameters ---------- quad : list of int - Quadrupole to measure. + Quadrupole to measure, just for labelling. Only switch_mux_on/off + really create the route to the electrodes. nb_stack : int, optional Number of stacks. A stacl is considered two half-cycles (one positive, one negative). injection_duration : int, optional Injection time in seconds. - tx_volt : float, optional - If specified, voltage will be imposed. If 0, we will look - for the best voltage. If a best Tx cannot be found, no - measurement will be taken and values will be NaN. autogain : bool, optional If True, will adapt the gain of the ADS1115 to maximize the resolution of the reading. strategy : str, optional - If we search for best voltage (tx_volt == 0), we can choose + (V3.0 only) If we search for best voltage (tx_volt == 0), we can choose different strategy: - vmin: find lowest voltage that gives us a signal - vmax: find max voltage that are in the range For a constant value, just set the tx_volt. + tx_volt : float, optional + (V3.0 only) If specified, voltage will be imposed. If 0, we will look + for the best voltage. If a best Tx cannot be found, no + measurement will be taken and values will be NaN. + best_tx_injtime : float, optional + (V3.0 only) Injection time in seconds used for finding the best voltage. """ # check arguments if nb_stack is None: diff --git a/test.py b/test.py index e11e2c21c48616191807d1cb33af8d8e72e6ded8..a229a381c854b8c1d66cb91d4e90a91a03b13ac7 100644 --- a/test.py +++ b/test.py @@ -11,7 +11,6 @@ seq = np.c_[a, b, m, n] k = OhmPi(idps=True) k.pardict['injection_duration'] = 0.5 k.pardict['nb_stack'] = 1 -k.pardict['tx_volt'] = 0 k.pardict['nbr_meas'] = 1 #k.sequence = seq #k.reset_mux()