-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtest.py
More file actions
56 lines (37 loc) · 1.54 KB
/
test.py
File metadata and controls
56 lines (37 loc) · 1.54 KB
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
50
51
52
53
54
55
56
#%%
import os
os.environ["CL_SDK_WEBSOCKET"] = "1"
os.environ["CL_SDK_ACCELERATED_TIME"] = "0"
import time
import cl
import logging
# logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
with cl.open() as neurons:
# print("Neurons opened", flush=True)
# time.sleep(5)
input("Press Enter to continue...")
for i in range(10):
print(f"Iteration {i}")
print("Stimulating channel 3 with 1.0 uA")
for _ in range(50):
neurons.stim(3, 1.0)
time.sleep(0.1)
# neurons.stim(3, 1.0, cl.BurstDesign(10, 10))
# time.sleep(5)
print("Entering loop for channel 5 stimulation")
for tick in neurons.loop(ticks_per_second=100, stop_after_seconds=5):
neurons.stim(5, 1.0)
print("Entering loop for channel 10 stimulation")
for tick in neurons.loop(ticks_per_second=200, stop_after_seconds=5):
neurons.stim(10, 2.0)
print("Entering loop for channel 5 stimulation")
for tick in neurons.loop(ticks_per_second=1, stop_after_seconds=5):
neurons.stim(5, 1.0)
print("Entering loop for channel 3 stimulation")
for tick in neurons.loop(ticks_per_second=60, stop_after_seconds=5):
neurons.stim(3, 1.0)
print("Entering loop for channel 6 stimulation")
for tick in neurons.loop(ticks_per_second=500, stop_after_seconds=5):
neurons.stim(6, 1.0)
# %%