diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py index de3c520a68f2456cc4ff5831662e74f1f12d3b4d..ed01e23a3251695f8b75ce35fca36d95cbe3a311 100644 --- a/ohmpi/ohmpi.py +++ b/ohmpi/ohmpi.py @@ -790,7 +790,7 @@ class OhmPi(object): self._hw.pwr_state = 'on' switch_power_off = True - self._hw.tx.pwr.voltage = float(tx_volt) + # self._hw.tx.pwr.voltage = float(tx_volt) # create custom sequence where MN == AB # we only check the electrodes which are in the sequence (not all might be connected) @@ -821,7 +821,7 @@ class OhmPi(object): for i in range(0, quads.shape[0]): quad = quads[i, :] # quadrupole self._hw.switch_mux(electrodes=list(quads[i, :2]), roles=['A', 'B'], state='on') - self._hw._vab_pulse(duration=0.2) + self._hw._vab_pulse(duration=0.2, vab=tx_volt) current = self._hw.readings[-1, 3] voltage = self._hw.tx.pwr.voltage * 1000 time.sleep(0.2) @@ -871,7 +871,7 @@ class OhmPi(object): self.switch_mux_off(quad) self.status = 'idle' - + # if power was off before measurement, let's turn if off if switch_power_off: self._hw.pwr_state = 'off' diff --git a/ohmpi/utils.py b/ohmpi/utils.py index 142d4fb40fa4627bebaeb5f84e578adb52291cfa..7e4287be91ec32a836c181cb681936c074b37e75 100644 --- a/ohmpi/utils.py +++ b/ohmpi/utils.py @@ -1,8 +1,7 @@ import io import os import shutil -import collections.abc -import numpy as np +git import numpy as np from numbers import Number @@ -112,3 +111,8 @@ def parse_log(log): msg = np.array(msg) session = np.array(session) return time, process_id, tag, msg, session + +def mux_2024_to_mux_2023_takeouts(sequence): + mapper = {1: 16, 2: 1, 3: 15, 4: 2, 5: 14, 6: 3, 7: 13, 8: 4, 9: 12, 10: 5, 11: 11, + 12: 6, 13: 10, 14: 7, 15: 9, 16: 8} + remapped_sequence = mapper[sequence] \ No newline at end of file