Images not being presented on some trials #3141
Replies: 4 comments
-
Hi @Quinlanptq, Are you preloading the images? Relevant docs: https://www.jspsych.org/7.3/overview/media-preloading/ |
Beta Was this translation helpful? Give feedback.
-
I think so here is the critical code - this of course may not be doing what I think it should be doing. I posted an early version of the code on show and tell Philip. for (var bc = 0; bc<4; bc++){
this_block = the_blocks[bc];
factors = {
the_image : this_block
};
factorial_values = jsPsych.randomization.factorial(factors);
trials_with_variables = {
timeline: [fixation, trial],
timeline_variables: factorial_values
};
preload_b = {
type : jsPsychPreload,
auto_preload: true,
trials : trials_with_variables
};
big_line.push(preload_b);
big_line.push(trials_with_variables);
big_line.push(end_of_block);
};
big_line.push(cursor_on);
big_line.push(debrief_block);
big_line.push(end_of_exp);
jsPsych.run(big_line); |
Beta Was this translation helpful? Give feedback.
-
The preload plugin is unable to automatically detect which timeline variables are images, so you can't use the |
Beta Was this translation helpful? Give feedback.
-
Thanks Josh re-wrote ny pre_load_b var as follows
and this works fine - I thought the images were being handled by the trials variable |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
On each trial in my experiment I present a fixation
var fixation = {
type: jsPsychHtmlKeyboardResponse,
choices: "NO_KEYS",
stimulus: '+',
trial_duration: 250,
post_trial_gap: 300,
};
and then immediately an image
var trial = {
type: jsPsychImageKeyboardResponse,
choices: ['d','k'],
The problem that I have is that it is possible to press a key before the image is actually presented.
and responses rts are recorded as null
Can anyone tell why this happening and how do I stop it?
Thanks
Philip.
Beta Was this translation helpful? Give feedback.
All reactions