-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
50 lines (43 loc) · 1.16 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from src import CN0565
fpos = 22
fneg = 23
temp = fpos - fneg
# 0 - eight, 1 - sixteen, 2 - twenty-four
elec = 2
opType=CN0565(fpos, fneg)
# eight electrodes
if elec == 0:
if temp == -1 or temp == 7:
f_function = opType.adjacent8()
print("adjacent")
print(f_function)
elif temp == 4 or temp == -4:
f_function = opType.adjacent8()
print("opposite")
print(f_function)
else:
print("fpos and fneg is not valid!")
# sixteen electrodes
elif elec == 1:
if temp == -1 or temp == 16:
f_function = opType.adjacent16()
print("adjacent")
print(f_function)
elif temp == 8 or temp == -8:
f_function = opType.adjacent16()
print("opposite")
print(f_function)
else:
print("fpos and fneg is not valid!")
# twenty-four electrodes
elif elec == 2:
if temp == -1 or temp == 24:
f_function = opType.adjacent24()
print("adjacent")
print(f_function)
elif temp == 12 or temp == -12:
f_function = opType.adjacent24()
print("opposite")
print(f_function)
else:
print("fpos and fneg is not valid!")