From dd1925878d7b32605cb073ced82e81ebdeb8c874 Mon Sep 17 00:00:00 2001 From: tillraab Date: Tue, 1 Oct 2019 15:51:51 +0200 Subject: [PATCH] bf --- electrode_check.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/electrode_check.py b/electrode_check.py index efb6c66..875ee89 100644 --- a/electrode_check.py +++ b/electrode_check.py @@ -280,6 +280,7 @@ def main(): break print(ranges[range_index]) + # range_index = 0 # if range_index >= len(ranges): # range_index = len(ranges) - 1 @@ -359,10 +360,10 @@ def main(): if init_fig == True: yspan = (np.min(channel_data[power_channel]), np.max(channel_data[power_channel])) - ylim = (yspan[0] / 1000 - np.abs(np.diff(yspan) / 1000) * 0.2, yspan[1] / 1000 + np.abs(np.diff(yspan)) / 1000 * 0.2) + ylim = (yspan[0] - np.abs(np.diff(yspan)) * 0.2, yspan[1] + np.abs(np.diff(yspan)) * 0.2) for ch in channel_array: - h, = Plot.axs[ch].plot(np.arange(250)[:len(channel_data[ch])] / rate, np.array(channel_data[ch]) / 1000, color='k') + h, = Plot.axs[ch].plot(np.arange(250)[:len(channel_data[ch])] / rate, np.array(channel_data[ch]) , color='k') Plot.axs[ch].set_ylim(ylim) Plot.channel_handle.append(h) @@ -373,7 +374,7 @@ def main(): yspan = [np.min(channel_data[power_channel]), np.max(channel_data[power_channel])] 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])) Plot.axs[ch].set_ylim(ylim) Plot.fig.canvas.draw()