diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index 72cb364aeaab6a155965ffe07a6a7e89c3433be7..2383feff7c37ca75a0ea7039295890d158b127ab 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -133,11 +133,11 @@ class OhmPiHardware: self._pulse = 0 def _gain_auto(self): # TODO: improve _gain_auto - self.exec_logger.event(f'OhmPiHardware\tGAin_Auto\tbegin\t{datetime.datetime.utcnow()}') + self.exec_logger.event(f'OhmPiHardware\tGain_Auto\tbegin\t{datetime.datetime.utcnow()}') self.tx_sync.wait() self.tx.adc_gain_auto() self.rx.adc_gain_auto() - self.exec_logger.event(f'OhmPiHardware\tGAin_Auto\tend\t{datetime.datetime.utcnow()}') + self.exec_logger.event(f'OhmPiHardware\tGain_Auto\tend\t{datetime.datetime.utcnow()}') def _inject(self, polarity=1, inj_time=None): # TODO: deal with voltage or current pulse self.exec_logger.event(f'OhmPiHardware\tInject\tbegin\t{datetime.datetime.utcnow()}') diff --git a/ohmpi/plots.py b/ohmpi/plots.py index aab5d0e5c767c08b5f0ec0c4a6db543b4b636877..0e45d3caf398ad3ea115e332d2e6f85774491141 100644 --- a/ohmpi/plots.py +++ b/ohmpi/plots.py @@ -7,7 +7,8 @@ import matplotlib def plot_exec_log(exec_log,names=None,last_session=True): # TODO: select session id instead of last session (if -1 : last) time, process_id, tag, msg, session = parse_log(exec_log) if last_session: - time, process_id, tag, msg = time[session==max(session)], process_id[session==max(session)], tag[session==max(session)], msg[session==max(session)] + time, process_id, tag, msg = time[session == max(session)], process_id[session == max(session)], \ + tag[session == max(session)], msg[session == max(session)] events = msg[tag == 'EVENT'] category, name, state, time = np.empty(events.shape[0]).astype(str), np.empty(events.shape[0]).astype(str), \ np.empty(events.shape[0]).astype(str), np.empty(events.shape[0]).astype(str)