adapted electrode check for competition setup
This commit is contained in:
parent
844a834ab9
commit
01640f6bdf
@ -49,6 +49,37 @@ class plot():
|
|||||||
self.axs.append(ax)
|
self.axs.append(ax)
|
||||||
gs.update(left=0.1, 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 creat_axis_competition(self):
|
||||||
|
gs = gridspec.GridSpec(3, 8, left =0.1, bottom = 0.05, top = 1, right=1)
|
||||||
|
pos = [[0, 1],
|
||||||
|
[0, 2],
|
||||||
|
[0, 3],
|
||||||
|
[0, 4],
|
||||||
|
[1, 0],
|
||||||
|
[1, 1],
|
||||||
|
[1, 2],
|
||||||
|
[1, 3],
|
||||||
|
[1, 4],
|
||||||
|
[1, 5],
|
||||||
|
[2, 1],
|
||||||
|
[2, 2],
|
||||||
|
[2, 3],
|
||||||
|
[2, 4],
|
||||||
|
[1, 7]]
|
||||||
|
|
||||||
|
show_x = np.array([0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], dtype=bool)
|
||||||
|
show_y = np.array([1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1], dtype=bool)
|
||||||
|
for enu, p in enumerate(pos):
|
||||||
|
ax = self.fig.add_subplot(gs[p[0], p[1]]) # elec 1
|
||||||
|
ax.set_ylim(-self.max_v, self.max_v)
|
||||||
|
if show_x[enu] == False:
|
||||||
|
ax.tick_params(axis='x', which='both', bottom=False, top=False, labelbottom=False)
|
||||||
|
if show_y[enu] == False:
|
||||||
|
ax.tick_params(axis='y', which='both', left=False, right=False, labelleft=False)
|
||||||
|
|
||||||
|
|
||||||
|
self.axs.append(ax)
|
||||||
|
|
||||||
|
|
||||||
def GPIO_setup(LED1_pin, LED2_pin, Button1_pin, Button2_pin):
|
def GPIO_setup(LED1_pin, LED2_pin, Button1_pin, Button2_pin):
|
||||||
# LED output pins
|
# LED output pins
|
||||||
@ -219,7 +250,7 @@ def main():
|
|||||||
|
|
||||||
interface_type = InterfaceType.USB
|
interface_type = InterfaceType.USB
|
||||||
low_channel = 0
|
low_channel = 0
|
||||||
high_channel = channels
|
high_channel = channels - 1
|
||||||
|
|
||||||
samples_per_channel = rate * 2 # * channels = Buffer size
|
samples_per_channel = rate * 2 # * channels = Buffer size
|
||||||
# rate = 20000
|
# rate = 20000
|
||||||
@ -314,7 +345,8 @@ def main():
|
|||||||
Plot.n_rows = n_rows
|
Plot.n_rows = n_rows
|
||||||
Plot.n_cols = n_cols
|
Plot.n_cols = n_cols
|
||||||
|
|
||||||
Plot.create_axis()
|
#Plot.create_axis()
|
||||||
|
Plot.creat_axis_competition()
|
||||||
|
|
||||||
init_fig = True
|
init_fig = True
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user