From 41e80e4016b8323a72a0dbc0ee9da0077ba0522d Mon Sep 17 00:00:00 2001 From: tillraab Date: Tue, 1 Oct 2019 16:02:26 +0200 Subject: [PATCH] bf --- electrode_check.py | 6 +++--- rasp_grid.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/electrode_check.py b/electrode_check.py index 77097f6..7d61b0d 100644 --- a/electrode_check.py +++ b/electrode_check.py @@ -47,7 +47,7 @@ class plot(): ax.set_ylim(-self.max_v, self.max_v) self.axs.append(ax) - gs.update(left=0.05, bottom=0.05, top=1, right=1, hspace=0, wspace=0) + gs.update(left=0.1, bottom=0.05, top=1, right=1, hspace=0, wspace=0) def GPIO_setup(LED1_pin, LED2_pin, Button1_pin, Button2_pin): @@ -371,10 +371,10 @@ def main(): init_fig = False else: - yspan = [np.min(channel_data[power_channel]) / 1000, np.max(channel_data[power_channel])/ 1000] + yspan = [np.min(channel_data[power_channel]) / gain, np.max(channel_data[power_channel])/ gain] ylim = [yspan[0] - np.abs(np.diff(yspan)) * 0.2, yspan[1] + np.abs(np.diff(yspan)) * 0.2] for ch in channel_array: - Plot.channel_handle[ch].set_data(np.arange(250)[:len(channel_data[ch])] / rate, np.array(channel_data[ch]) / 1000) + Plot.channel_handle[ch].set_data(np.arange(250)[:len(channel_data[ch])] / rate, np.array(channel_data[ch]) / gain) Plot.axs[ch].set_ylim(ylim) Plot.fig.canvas.draw() diff --git a/rasp_grid.py b/rasp_grid.py index 69d7f9a..22fc23b 100644 --- a/rasp_grid.py +++ b/rasp_grid.py @@ -382,8 +382,8 @@ def main(): index = transfer_status.current_index if (last_idx > index) and (index != -1): - (np.array(data[last_idx:], dtype=np.float32) / 1000).tofile(f) - (np.array(data[:index], dtype=np.float32) / 1000).tofile(f) + (np.array(data[last_idx:], dtype=np.float32) / gain).tofile(f) + (np.array(data[:index], dtype=np.float32) / gain).tofile(f) f.flush() if index == -1: