Where in data is post_trial_gap added? #2001
-
Hi! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
post trial gap isn't for collecting data. It is used to change the amount of time between trials |
Beta Was this translation helpful? Give feedback.
-
Hi @vchopurian, the post_trial_gap isn't added to the RT, and it isn't saved anywhere in the jsPsych data by default. You can add it to the data in the trial's var iti = 1200;
var trial = {
type: 'html-button-response',
// other parameters...
post_trial_gap: iti,
on_finish: function(data) {
data.post_trial_gap = iti;
}
} And as of jsPsych v6.3.0, there's a var trial = {
type: 'html-button-response',
// other parameters...
post_trial_gap: 1200,
save_trial_parameters: {
// save the ITI to the trial data
post_trial_gap: true
}
} This is especially useful when you don't know the value in advance (e.g. because you're using a dynamic parameter to generate different values for each trial): var trial = {
type: 'html-button-response',
// other parameters...
post_trial_gap: function() {
// randomly select an ITI from an array of values
return jsPsych.randomization.sampleWithoutReplacement([200,300,400,500],1)[0];
},
save_trial_parameters: {
// save the ITI to the trial data
post_trial_gap: true
}
} I hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi @vchopurian, the post_trial_gap isn't added to the RT, and it isn't saved anywhere in the jsPsych data by default. You can add it to the data in the trial's
on_finish
function, like this:And as of jsPsych v6.3.0, there's a
save_trial_parameters
option that you can add to any trial, which lets you automatically save (or not save) any of the trial parameters in the jsPsych data.