質問編集履歴
3
個人情報を伏せました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
```
|
10
10
|
|
11
|
-
GET file:///Users/
|
11
|
+
GET file:///Users/.../Desktop/PSYlab/new_html/%3Cimg%20src=img/Philip_Juras/Juras4.jpg%3E net::ERR_![イメージ説明](0fbe9ac5294feda1313939ae2270e49e.png)OT_FOUND
|
12
12
|
|
13
13
|
|
14
14
|
|
2
わかりやすく編集しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,6 +56,10 @@
|
|
56
56
|
|
57
57
|
```javascript
|
58
58
|
|
59
|
+
|
60
|
+
|
61
|
+
//該当の箇所
|
62
|
+
|
59
63
|
var testrecognition = {
|
60
64
|
|
61
65
|
type: "image-keyboard-response",
|
@@ -86,6 +90,156 @@
|
|
86
90
|
|
87
91
|
}
|
88
92
|
|
93
|
+
|
94
|
+
|
95
|
+
//dataの中身
|
96
|
+
|
97
|
+
var PessaniTesting = PessaniPaintings.slice(3,6);
|
98
|
+
|
99
|
+
var StatulatTesting = StatulatPaintings.slice(3,6);
|
100
|
+
|
101
|
+
var WexlerTesting = WexlerPaintings.slice(3,6);
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
var BraqueTesting = BraquePaintings.slice(3,6);
|
106
|
+
|
107
|
+
var SeuratTesting = SeuratPaintings.slice(3,6);
|
108
|
+
|
109
|
+
var CrossTesting = CrossPaintings.slice(3,6);
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
var HawkinsTesting = HawkinsPaintings.slice(3,6);
|
114
|
+
|
115
|
+
var MylreaTesting = MylreaPaintings.slice(3,6);
|
116
|
+
|
117
|
+
var JurasTesting = JurasPaintings.slice(3,6);
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
var SchlorffTesting = SchlorffPaintings.slice(3,6);
|
122
|
+
|
123
|
+
var LewisTesting = LewisPaintings.slice(3,6);
|
124
|
+
|
125
|
+
var MeiTesting = MeiPaintings.slice(3,6);
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
var testingPaintings =
|
130
|
+
|
131
|
+
{
|
132
|
+
|
133
|
+
"Bruno Pessani": PessaniTesting,
|
134
|
+
|
135
|
+
"Ciprian Statulat": StatulatTesting,
|
136
|
+
|
137
|
+
"George Wexler": WexlerTesting,
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
"Georges Braque": BraqueTesting,
|
142
|
+
|
143
|
+
"Georges Seurat": SeuratTesting,
|
144
|
+
|
145
|
+
"Henri-Edmond Cross":CrossTesting,
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
"Judy Hawkins": HawkinsTesting,
|
150
|
+
|
151
|
+
"Marilyn Mylrea": MylreaTesting,
|
152
|
+
|
153
|
+
"Philip Juras": JurasTesting,
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
"Ron Schlorff": SchlorffTesting,
|
158
|
+
|
159
|
+
"Ryan Lewis": LewisTesting,
|
160
|
+
|
161
|
+
"Yie Mei": MeiTesting
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
var testing1 = [];//old paintings
|
168
|
+
|
169
|
+
var testing2 = [];
|
170
|
+
|
171
|
+
var testing3 = [];
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
//var recognition = "<p>Have you seen this picture in the training? Type 'y' for yes and 'n' for no.</p>";
|
176
|
+
|
177
|
+
//var likability = "<p>How much do you like this picture? Choose from 1 to 9 (1: strongly dislike, 9: strongly like).</p>";
|
178
|
+
|
179
|
+
//var identification = '<p>Identify the artist who drew this picture.</p>'+'<table class="tg"><tr><td class="tg-0pky">a)Bruno Pessani</td><td class="tg-0pky">b)Ciprian Stratulat</td><td class="tg-0pky">c)George Wexler</td><td class="tg-0pky">d)Georges Braque</td></tr><tr><td class="tg-0pky">e)Georges Seurat</td><td class="tg-0pky">f)Henri-Edomond Cross</td><td class="tg-0pky">g)Judy Hawkins</td><td class="tg-0pky">h)Marilyn Mylrea</td></tr><tr><td class="tg-0pky">i)Philip Juras</td><td class="tg-0pky">j)Ron Schlorff</td><td class="tg-0pky">k)Ryan Lewis</td><td class="tg-0pky">l)Yie Mei</td></tr></table>';//?
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
for (i=0; i<experiment.length; i++){
|
184
|
+
|
185
|
+
var artistname = experiment[i].data.artist;
|
186
|
+
|
187
|
+
var conditions = experiment[i].data.condition;
|
188
|
+
|
189
|
+
var oldStimulus = experiment[i].stimulus;
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
if(0<=i&&i<=11){
|
194
|
+
|
195
|
+
var newStimulus = "<img src=" + testingPaintings[artistname][0] + ">";
|
196
|
+
|
197
|
+
//testing1.push({stimulus:oldStimulus,data:{test_part:'y',artist:artistname, condition: conditions}, testprompt:recognition});
|
198
|
+
|
199
|
+
testing1.push({stimulus:oldStimulus,data:{test_part:'y',artist:artistname, condition: conditions}});
|
200
|
+
|
201
|
+
//{recognition:recognition,identification:identification,likeability:likability});
|
202
|
+
|
203
|
+
testing1.push({stimulus:newStimulus,data:{test_part:'n',artist:artistname, condition: conditions}});
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
//no testing
|
208
|
+
|
209
|
+
}else if(12<=i&&i<=23){
|
210
|
+
|
211
|
+
var newStimulus = "<img src=" + testingPaintings[artistname][1] + ">";
|
212
|
+
|
213
|
+
testing2.push({stimulus:oldStimulus,data:{test_part:'y',artist:artistname, condition: conditions}});
|
214
|
+
|
215
|
+
testing2.push({stimulus:newStimulus,data:{test_part:'n',artist:artistname, condition: conditions}});
|
216
|
+
|
217
|
+
//empty
|
218
|
+
|
219
|
+
}else{
|
220
|
+
|
221
|
+
var newStimulus = "<img src=" + testingPaintings[artistname][2] + ">";
|
222
|
+
|
223
|
+
testing3.push({stimulus:oldStimulus,data:{test_part:'y',artist:artistname, condition: conditions}});
|
224
|
+
|
225
|
+
testing3.push({stimulus:newStimulus,data:{test_part:'n',artist:artistname, condition: conditions}});
|
226
|
+
|
227
|
+
}
|
228
|
+
|
229
|
+
}
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
var testing = jsPsych.randomization.shuffle(testing1).concat(
|
234
|
+
|
235
|
+
jsPsych.randomization.shuffle(testing2)).concat(
|
236
|
+
|
237
|
+
jsPsych.randomization.shuffle(testing3));
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
89
243
|
```
|
90
244
|
|
91
245
|
jsPsychのライブラリーはこちらから拝借しました。https://www.jspsych.org
|
1
ソースコードを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,6 +10,82 @@
|
|
10
10
|
|
11
11
|
GET file:///Users/kumikonakajima/Desktop/PSYlab/new_html/%3Cimg%20src=img/Philip_Juras/Juras4.jpg%3E net::ERR_![イメージ説明](0fbe9ac5294feda1313939ae2270e49e.png)OT_FOUND
|
12
12
|
|
13
|
+
|
14
|
+
|
15
|
+
Image (async)
|
16
|
+
|
17
|
+
jsPsych.plugins.image-keyboard-response.plugin.trial @ jspsych-image-keyboard-response.js:72
|
18
|
+
|
19
|
+
doTrial @ jspsych.js:826
|
20
|
+
|
21
|
+
nextTrial @ jspsych.js:794
|
22
|
+
|
23
|
+
window.jsPsych.core.finishTrial @ jspsych.js:258
|
24
|
+
|
25
|
+
end_trial @ jspsych-html-keyboard-response.js:101
|
26
|
+
|
27
|
+
(anonymous) @ jspsych-html-keyboard-response.js:142
|
28
|
+
|
29
|
+
setTimeout (async)
|
30
|
+
|
31
|
+
jsPsych.pluginAPI.module.setTimeout @ jspsych.js:2112
|
32
|
+
|
33
|
+
jsPsych.plugins.html-keyboard-response.plugin.trial @ jspsych-html-keyboard-response.js:141
|
34
|
+
|
35
|
+
doTrial @ jspsych.js:826
|
36
|
+
|
37
|
+
nextTrial @ jspsych.js:794
|
38
|
+
|
39
|
+
window.jsPsych.core.finishTrial @ jspsych.js:258
|
40
|
+
|
41
|
+
end_trial @ jspsych-html-keyboard-response.js:101
|
42
|
+
|
43
|
+
after_response @ jspsych-html-keyboard-response.js:117
|
44
|
+
|
45
|
+
listener_function @ jspsych.js:1943
|
46
|
+
|
47
|
+
root_keydown_listener @ jspsych.js:1858
|
48
|
+
|
13
49
|
```
|
14
50
|
|
15
51
|
![![イメージ説明](33a8a97c9696f70039be25b2fc0d8a53.png)](3543892f18e42cad9dfe059aaa47ef21.png)
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
### ソースコード
|
56
|
+
|
57
|
+
```javascript
|
58
|
+
|
59
|
+
var testrecognition = {
|
60
|
+
|
61
|
+
type: "image-keyboard-response",
|
62
|
+
|
63
|
+
stimulus: jsPsych.timelineVariable('stimulus'),
|
64
|
+
|
65
|
+
choices: ['y','n'],
|
66
|
+
|
67
|
+
data: jsPsych.timelineVariable('data'),
|
68
|
+
|
69
|
+
//prompt: jsPsych.timelineVariable('testprompt'),
|
70
|
+
|
71
|
+
prompt: "<p>Have you seen this picture in the training? Type 'y' for yes and 'n' for no.</p>",
|
72
|
+
|
73
|
+
on_finish: function(data){
|
74
|
+
|
75
|
+
data.recognition_correct = data.key_press == jsPsych.pluginAPI.convertKeyCharacterToKeyCode(data.test_part);
|
76
|
+
|
77
|
+
data.testtype = "recognition"
|
78
|
+
|
79
|
+
},
|
80
|
+
|
81
|
+
on_start: function() {
|
82
|
+
|
83
|
+
jsPsych.setProgressBar(0.6);
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
}
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
jsPsychのライブラリーはこちらから拝借しました。https://www.jspsych.org
|