質問編集履歴
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,6 +24,10 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
(変更部分)
|
28
|
+
|
29
|
+
『
|
30
|
+
|
27
31
|
text_5 = visual.TextStim(win=win, name='text_5',
|
28
32
|
|
29
33
|
text=test5,
|
@@ -38,6 +42,10 @@
|
|
38
42
|
|
39
43
|
depth=-6.0);
|
40
44
|
|
45
|
+
』
|
46
|
+
|
47
|
+
|
48
|
+
|
41
49
|
(略)
|
42
50
|
|
43
51
|
|
@@ -106,6 +114,10 @@
|
|
106
114
|
|
107
115
|
|
108
116
|
|
117
|
+
(変更部分)
|
118
|
+
|
119
|
+
『
|
120
|
+
|
109
121
|
if key_resp_2.keys == 'f':
|
110
122
|
|
111
123
|
test5='あたり'
|
@@ -114,6 +126,8 @@
|
|
114
126
|
|
115
127
|
test5='ハズレ'
|
116
128
|
|
129
|
+
|
130
|
+
|
117
131
|
|
118
132
|
|
119
133
|
if text_5.status == NOT_STARTED and tThisFlip >= 8.0-frameTolerance:
|
@@ -146,6 +160,8 @@
|
|
146
160
|
|
147
161
|
text_5.setAutoDraw(False)
|
148
162
|
|
163
|
+
』
|
164
|
+
|
149
165
|
(略)
|
150
166
|
|
151
167
|
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,17 +18,27 @@
|
|
18
18
|
|
19
19
|
```python
|
20
20
|
|
21
|
+
(前略)
|
22
|
+
|
21
23
|
key_resp_2 = keyboard.Keyboard()
|
22
24
|
|
23
25
|
|
24
26
|
|
25
|
-
|
27
|
+
text_5 = visual.TextStim(win=win, name='text_5',
|
26
28
|
|
27
|
-
test5
|
29
|
+
text=test5,
|
28
30
|
|
29
|
-
e
|
31
|
+
font='Open Sans',
|
30
32
|
|
33
|
+
pos=(0, 0), height=0.1, wrapWidth=None, ori=0.0,
|
34
|
+
|
35
|
+
color='white', colorSpace='rgb', opacity=None,
|
36
|
+
|
31
|
-
te
|
37
|
+
languageStyle='LTR',
|
38
|
+
|
39
|
+
depth=-6.0);
|
40
|
+
|
41
|
+
(略)
|
32
42
|
|
33
43
|
|
34
44
|
|
@@ -96,6 +106,50 @@
|
|
96
106
|
|
97
107
|
|
98
108
|
|
109
|
+
if key_resp_2.keys == 'f':
|
110
|
+
|
111
|
+
test5='あたり'
|
112
|
+
|
113
|
+
else:
|
114
|
+
|
115
|
+
test5='ハズレ'
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
if text_5.status == NOT_STARTED and tThisFlip >= 8.0-frameTolerance:
|
120
|
+
|
121
|
+
# keep track of start time/frame for later
|
122
|
+
|
123
|
+
text_5.frameNStart = frameN # exact frame index
|
124
|
+
|
125
|
+
text_5.tStart = t # local t and not account for scr refresh
|
126
|
+
|
127
|
+
text_5.tStartRefresh = tThisFlipGlobal # on global time
|
128
|
+
|
129
|
+
win.timeOnFlip(text_5, 'tStartRefresh') # time at next scr refresh
|
130
|
+
|
131
|
+
text_5.setAutoDraw(True)
|
132
|
+
|
133
|
+
if text_5.status == STARTED:
|
134
|
+
|
135
|
+
# is it time to stop? (based on global clock, using actual start)
|
136
|
+
|
137
|
+
if tThisFlipGlobal > text_5.tStartRefresh + 1.0-frameTolerance:
|
138
|
+
|
139
|
+
# keep track of stop time/frame for later
|
140
|
+
|
141
|
+
text_5.tStop = t # not accounting for scr refresh
|
142
|
+
|
143
|
+
text_5.frameNStop = frameN # exact frame index
|
144
|
+
|
145
|
+
win.timeOnFlip(text_5, 'tStopRefresh') # time at next scr refresh
|
146
|
+
|
147
|
+
text_5.setAutoDraw(False)
|
148
|
+
|
149
|
+
(略)
|
150
|
+
|
151
|
+
|
152
|
+
|
99
153
|
if key_resp_2.keys in ['', [], None]: # No response was made
|
100
154
|
|
101
155
|
key_resp_2.keys = None
|
2
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,6 +32,86 @@
|
|
32
32
|
|
33
33
|
|
34
34
|
|
35
|
+
key_resp_2.keys=[]
|
36
|
+
|
37
|
+
key_resp_2.rt = []
|
38
|
+
|
39
|
+
_key_resp_2_allKeys = []
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
# *key_resp_2* updates
|
44
|
+
|
45
|
+
waitOnFlip = False
|
46
|
+
|
47
|
+
if key_resp_2.status == NOT_STARTED and tThisFlip >= 5.0-frameTolerance:
|
48
|
+
|
49
|
+
# keep track of start time/frame for later
|
50
|
+
|
51
|
+
key_resp_2.frameNStart = frameN # exact frame index
|
52
|
+
|
53
|
+
key_resp_2.tStart = t # local t and not account for scr refresh
|
54
|
+
|
55
|
+
key_resp_2.tStartRefresh = tThisFlipGlobal # on global time
|
56
|
+
|
57
|
+
win.timeOnFlip(key_resp_2, 'tStartRefresh') # time at next scr refresh
|
58
|
+
|
59
|
+
key_resp_2.status = STARTED
|
60
|
+
|
61
|
+
# keyboard checking is just starting
|
62
|
+
|
63
|
+
waitOnFlip = True
|
64
|
+
|
65
|
+
win.callOnFlip(key_resp_2.clock.reset) # t=0 on next screen flip
|
66
|
+
|
67
|
+
win.callOnFlip(key_resp_2.clearEvents, eventType='keyboard') # clear events on next screen flip
|
68
|
+
|
69
|
+
if key_resp_2.status == STARTED:
|
70
|
+
|
71
|
+
# is it time to stop? (based on global clock, using actual start)
|
72
|
+
|
73
|
+
if tThisFlipGlobal > key_resp_2.tStartRefresh + 3.0-frameTolerance:
|
74
|
+
|
75
|
+
# keep track of stop time/frame for later
|
76
|
+
|
77
|
+
key_resp_2.tStop = t # not accounting for scr refresh
|
78
|
+
|
79
|
+
key_resp_2.frameNStop = frameN # exact frame index
|
80
|
+
|
81
|
+
win.timeOnFlip(key_resp_2, 'tStopRefresh') # time at next scr refresh
|
82
|
+
|
83
|
+
key_resp_2.status = FINISHED
|
84
|
+
|
85
|
+
if key_resp_2.status == STARTED and not waitOnFlip:
|
86
|
+
|
87
|
+
theseKeys = key_resp_2.getKeys(keyList=['f', 'j'], waitRelease=False)
|
88
|
+
|
89
|
+
_key_resp_2_allKeys.extend(theseKeys)
|
90
|
+
|
91
|
+
if len(_key_resp_2_allKeys):
|
92
|
+
|
93
|
+
key_resp_2.keys = _key_resp_2_allKeys[-1].name # just the last key pressed
|
94
|
+
|
95
|
+
key_resp_2.rt = _key_resp_2_allKeys[-1].rt
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
if key_resp_2.keys in ['', [], None]: # No response was made
|
100
|
+
|
101
|
+
key_resp_2.keys = None
|
102
|
+
|
103
|
+
thisExp.addData('key_resp_2.keys',key_resp_2.keys)
|
104
|
+
|
105
|
+
if key_resp_2.keys != None: # we had a response
|
106
|
+
|
107
|
+
thisExp.addData('key_resp_2.rt', key_resp_2.rt)
|
108
|
+
|
109
|
+
thisExp.addData('key_resp_2.started', key_resp_2.tStartRefresh)
|
110
|
+
|
111
|
+
thisExp.addData('key_resp_2.stopped', key_resp_2.tStopRefresh)
|
112
|
+
|
113
|
+
|
114
|
+
|
35
115
|
```
|
36
116
|
|
37
117
|
|
1
削除忘れ
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,11 +4,7 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
-
ここに質問の内容を詳しく書いてください。
|
8
7
|
|
9
|
-
(例)PHP(CakePHP)で●●なシステムを作っています。
|
10
|
-
|
11
|
-
■■な機能を実装中に以下のエラーメッセージが発生しました。
|
12
8
|
|
13
9
|
|
14
10
|
|