-
Notifications
You must be signed in to change notification settings - Fork 0
/
multi_sensory_traj.py
executable file
·89 lines (54 loc) · 1.65 KB
/
multi_sensory_traj.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#from flystim.options import OptionParser
#import flystim.stim_server
import random
from flystim.trajectory import RectangleTrajectory, Trajectory
from datetime import datetime
def loomingEdge(cx=0,
cy=0,
wStart=1,
hStart=1,
wEnd=0,
hEnd=0,
T=10,
c=1.0):
h=[(0,hStart),(T,hEnd)]
w=[(0,wStart),(T,wEnd)]
trajectory=RectangleTrajectory(x=cx,y=cy,w=w,h=h,color=c)
return trajectory.to_dict()
class loomingList:
def __init__(self):
self.rate=[]
self.dur=[]
def loominglist(self, T=1000, dur=1, restt=5):
rates=[0, 1]
N=int(T/(dur+restt))
for i in range(N):
self.rate.append(rates[random.randint(0,rates.__len__()-1)])
self.dur.append(dur)
return self
class audioList:
def __init__(self):
self.rate=[]
self.dur=[]
def audlist(self, T=1000, dur=1, restt=3):
rates=[0, 1]
N=int(T/(dur+restt))
for i in range(N):
self.rate.append(rates[random.randint(0,rates.__len__()-1)])
self.dur.append(dur)
#self.rate.append(0)
#self.dur.append(restt)
return self
class multisensoryList:
def __init__(self):
self.rate=[]
self.dur=[]
def msilist(self, T=1200, dur=1, restt=5):
rates=[0, 0, 1, 2, 3]
N=int(T/(dur+restt))
for i in range(N):
self.rate.append(rates[random.randint(0,rates.__len__()-1)])
self.dur.append(dur)
#self.rate.append(0)
#self.dur.append(restt)
return self