-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMedPC Template
More file actions
169 lines (134 loc) · 4.08 KB
/
Copy pathMedPC Template
File metadata and controls
169 lines (134 loc) · 4.08 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
MEDPC STANDARDS
Authors: Marcelo Caetano, Nate Smith, Kyra Swanson
-------------------------------------------------------------------------------------
INPUTS AND OUTPUTS
-------------------------------------------------------------------------------------
\INPUTS
^LICK = 1 \1 (.001)
^LEFT = 2 \2 (.002) \Left Port
^CENTER = 3 \3 (.003) \Center Port
^RIGHT = 4 \4 (.004) \Right Port
\OUTPUTS ON OFF
^PumpA = 1 \21 (.021) 41 (.041)
^PumpB = 2 \22 (.022) 42 (.042)
^Clicker = 3 \22 (.023) 42 (.043)
Unless stated otherwise,
^SPLIGHT = 9 \29 (.029) 50 (.049) \Reward Light
^TONE1 = 11 \31 (.031) 51 (.051)
^TONE2 = 12 \32 (.032) 52 (.052)
\Z PULSE
^OnPumpA = 1
^OnPumpB = 2
^Reward = 7
^NoReward = 8
^OnHLight = 9
^OffHLight = 19
^OnSPLight = 10
^OffSPLight = 20
^OnTone1 = 11
^OffTone1 = 21
\CONSTANTS
^ON = 20
^OFF = 40
^SessionLength = 60
^StateEndSession = 32
-------------------------------------------------------------------------------------
DISKVARS
-------------------------------------------------------------------------------------
DIM A=9999, L=9999
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\A - Array for time coded events
\B - Marker
\C - Pump Activations
\D - Time in minutes
\F - LEFT ENTRIES
\G - RIGHT ENTRIES
\H - LEFT EXITS
\K - Lick Array index
\L - Lick Array
\M - Correct Trials
\N - Incorrect Trials
\P - Current Side (0=LEFT 1=RIGHT)
\Q - Current consequtive trials
\R - Random time variable
\S - Switches
\T - Trials
\U - Session start time
\X - Counter
\Y - Index, counts number of time-stamped events
\ Save all variables to disk except Z (temporary variable)
DISKVARS = A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\********************************** MAIN LOOP *************************************
s.s.1,
s1,
\\************************************ TIMER ****************************************
s.s.2,
s1,
#Start: Set D=0; --->s2
s2,
1': Add D; --->sx
\\********************************* CLICKER WITH LIGHT ******************************
\clicks twice, flashes until lick
s.s.10,
s1,
#z^Reward: ON^CLICKER; ON^SPLIGHT; ---> s2
s2,
0.1": OFF^CLICKER; OFF^SPLIGHT; ---> s3
s3,
0.1": ON^CLICKER; ON^SPLIGHT; ---> s4
s4,
0.1": OFF^CLICKER; OFF^SPLIGHT; ---> s5
s5,
#R^LICK: ---> s7
0.1": ON^SPLIGHT; ---> s6
s6,
#R^LICK: ---> s7
0.1": OFF^SPLIGHT; ---> s5
s7,
0.1": OFF^SPLIGHT; ---> s1
\\*********************************** CLICKER ***************************************
\clicks twice
s.s.10,
s1,
#z^Reward: ON^CLICKER; ---> s2
s2,
0.1": OFF^CLICKER; ---> s3
s3,
0.1": ON^CLICKER; ---> s4
s4,
0.1": OFF^CLICKER; ---> s1
-------------------------------------------------------------------------------------
SAVE AND DISPLAY DATA
-------------------------------------------------------------------------------------
\\***************************** SAVE AND DISPLAY DATA *******************************
s.s.20, \Display Data
s1,
#K1 ! 1": Show 1, Min, D; ---> sx
s.s.21, \Record Licks
s1,
#Start: ---> s2
s2,
#R^Lick: Set A(Y) = BTIME-U + ^Lick/^STORE; Add Y; ---> sx
s.s.22, \Record Pumps
s1,
#Z^OnPumpA: Set A(Y) = BTIME-U + (^PUMPA+^ON)/1000; Add Y; --->sx
#Z^OnPumpB: Set A(Y) = BTIME-U + (^PUMPB+^ON)/1000; Add Y; --->sx
s.s.23, \Record House Light
s1,
#Z^OnLight: Set A(Y) = BTIME-U + (^LIGHT+^ON)/1000; Add Y; ---> sx
#Z^OffLight: Set A(Y) = BTIME-U + (^LIGHT+^OFF)/1000; Add Y; ---> sx
s.s.24 \Record Tone and Clicker
s1,
#Z^OnClicker: Set A(Y) = BTIME-U + (^CLICKER+^ON)/1000; Add Y; ---> sx
#Z^OffClicker: Set A(Y) = BTIME-U + (^CLICKER+^OFF)/1000; Add Y; ---> sx
#Z^OnTone: Set A(Y) = BTIME-U + (^TONE+^ON)/1000; Add Y; ---> sx
#Z^OffTone: Set A(Y) = BTIME-U + (^TONE+^OFF)/1000; Add Y; ---> sx
\\******************************** SESSION TIMER ************************************
s.s.32,
s1,
#Start: Set U = BTIME; ---> s2
s2,
^SessionLength' ! #Z^StateEndSession ! #K99: #K1; ---> s3
s3,
.01": --->STOPABORTFLUSH