You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a staircase of the RDK where the coherence of the task will alter depending on whether they got the previous trial correct. I've had a look around here and altered the script based on some responses I've seen such as one Becky did on this post: #1907 For now I'm just trying to make it decrease the coherence after each trial, but I don't think I'm doing it properly and for some reason as well, the coherence isn't being altered at all, in fact it won't even start at 1. Any advice would be much appreciated. Thanks.
var EsingleTrial = {
type: 'rdk',
// the below should be the coherence variable but when I download the file at the end of the experiment it's always 0.5?
coherence: coherence2,
correct_choice: jsPsych.timelineVariable("correct_choice"),
coherent_direction: jsPsych.timelineVariable("coherent_direction"),
number_of_apertures: 1,
move_distance: 1.5,
aperture_center_x: centreX,
aperture_center_y: centreY,
aperture_width: 360,
aperture_height: 360,
number_of_dots: 100,
choices: ['z','m'],
response_ends_trial: true,
background_color: 'black',
dot_color: 'white',
dot_radius: 4,
trial_duration: 100000,
data: {practice: '0',targetDirection: jsPsych.timelineVariable("targetDirection")},
on_finish: function(data) {
coherence2-=0.1;
}
};
// just doing 3 trials as a test
for(var i = 0; i< 3 ; i++){
// start coherence at 1
var coherence2: 1;
// below is to randomly select the direction from left or right
var random = jsPsych.randomization.sampleWithReplacement(factors2, 1);
if (random == 0){
var experimental = {
correct_choice: 'm',
coherent_direction: 180,
}
}
else{
var experimental = {
correct_choice: 'z',
coherent_direction: 0,
}
}
var loop_node = {
timeline: [fixation,EsingleTrial],
timeline_variables: [experimental],
}
timeline.push(loop_node)
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone, hope you're well.
I'm trying to create a staircase of the RDK where the coherence of the task will alter depending on whether they got the previous trial correct. I've had a look around here and altered the script based on some responses I've seen such as one Becky did on this post: #1907 For now I'm just trying to make it decrease the coherence after each trial, but I don't think I'm doing it properly and for some reason as well, the coherence isn't being altered at all, in fact it won't even start at 1. Any advice would be much appreciated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions