Skip to content

Commit fdf2ac0

Browse files
author
Thanh Tung Bui
committed
all necessary changes to ensure exact ratios of conditions in all tasks plus syntatic and grammatical editings.
1 parent f7ffa80 commit fdf2ac0

File tree

36 files changed

+742
-671
lines changed

36 files changed

+742
-671
lines changed

cued_task_switching_single_task_network/experiment.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ var instructions_block = {
405405
'<div class = centerbox><p class = block-text>In this experiment you will have to respond to a sequence of numbers by pressing the "M" and "Z" keys. How you respond to the numbers will depend on the current task, which can change every trial.</p><p class = block-text>On some trials you will have to indicate whether the number is odd or even, and on other trials you will indicate whether the number is higher or lower than 5. Each trial will start with a cue telling you which task to do on that trial.</p></div>',
406406
'<div class = centerbox><p class = block-text>The cue before the number will be a word indicating the task. There will be four different cues indicating two different tasks. The cues and tasks are described below:</p>' +
407407
task_list +
408-
'<p class = block-text>Practice will start after you end instructions.</p></div>'
408+
'<p class = block-text>Practice will start after you end instructions.</p>'+
409+
'<p class = block-text>To avoid technical issues, please keep the experiment tab (on Chrome or Firefox) active and in full-screen mode for the whole duration of each task.</p></div>'
409410
],
410411
allow_keys: false,
411412
show_clickable_nav: true,

cued_task_switching_with_directed_forgetting/experiment.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ var createTrialTypes = function(numTrialsPerBlock){
133133
}
134134

135135
stims = []
136-
for(var numIterations = 0; numIterations < numTrialsPerBlock/16; numIterations++){
136+
for(var numIterations = 0; numIterations < numTrialsPerBlock/(directed_cond_array.length*task_conditions.length*cued_conditions.length); numIterations++){
137137
for (var numDirectedConds = 0; numDirectedConds < directed_cond_array.length; numDirectedConds++){
138138
for (var numTaskConds = 0; numTaskConds < task_conditions.length; numTaskConds++){
139139
for (var numCuedConds = 0; numCuedConds < cued_conditions.length; numCuedConds++){
@@ -439,7 +439,7 @@ var credit_var = 0
439439

440440
// new vars
441441
var practice_len = 16 // must be divisible by 16
442-
var exp_len = 192 // must be divisible by 16
442+
var exp_len = 224 // must be divisible by 16
443443
var numTrialsPerBlock = 32; // divisible by 16
444444
var numTestBlocks = exp_len / numTrialsPerBlock
445445

@@ -609,6 +609,7 @@ var instructions_block = {
609609
' </i>if the probe was in the memory set, and the <i>'+possible_responses[1][0]+' </i>if not.</p>'+
610610

611611
'<p class = block-text>We will start practice when you finish instructions. Please make sure you understand the instructions before moving on. During practice, you will receive a reminder of the rules. <i>This reminder will be taken out for test</i>.</p>'+
612+
'<p class = block-text>To avoid technical issues, please keep the experiment tab (on Chrome or Firefox) <i>active and in full-screen mode</i> for the whole duration of each task.</p>'+
612613
'</div>'
613614
],
614615
allow_keys: false,
@@ -707,7 +708,6 @@ for (i = 0; i < practice_len + 1; i++) {
707708

708709
var ITI_fixation_block = {
709710
type: 'poldrack-single-stim',
710-
stimulus: getFixation,
711711
is_html: true,
712712
choices: [possible_responses[0][1],possible_responses[1][1]],
713713
data: {
@@ -767,7 +767,7 @@ for (i = 0; i < practice_len + 1; i++) {
767767
choices: [possible_responses[0][1],possible_responses[1][1]],
768768
data: {trial_id: "practice_trial"},
769769
timing_stim: 1000, //1000
770-
timing_response: 2000, //1000
770+
timing_response: 1000, //1000
771771
timing_feedback_duration: 0,
772772
is_html: true,
773773
on_finish: appendData,
@@ -902,7 +902,6 @@ for (i = 0; i < numTrialsPerBlock + 1; i++) {
902902

903903
var ITI_fixation_block = {
904904
type: 'poldrack-single-stim',
905-
stimulus: getFixation,
906905
is_html: true,
907906
choices: [possible_responses[0][1],possible_responses[1][1]],
908907
data: {
@@ -962,7 +961,7 @@ for (i = 0; i < numTrialsPerBlock + 1; i++) {
962961
choices: [possible_responses[0][1],possible_responses[1][1]],
963962
timing_post_trial: 0,
964963
timing_stim: 1000, //1000
965-
timing_response: 2000, //1000
964+
timing_response: 1000, //1000
966965
response_ends_trial: false,
967966
on_finish: appendData
968967
};

directed_forgetting_single_task_network/experiment.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ var resetTrial = function() {
254254

255255

256256
var createTrialTypes = function (numTrialsPerBlock,numLetters){
257-
var probeTypeArray = jsPsych.randomization.repeat(probes, numTrialsPerBlock / 4)
257+
var probeTypeArray = jsPsych.randomization.repeat(probes, numTrialsPerBlock / probes.length)
258258
var used_letters = []
259259
var stims = []
260260

@@ -443,7 +443,7 @@ var instructions_block = {
443443
'key if it was not in the memory set.</p>'+
444444

445445
'<p class = block-text>We will start practice when you finish instructions. Please make sure you understand the instructions before moving on. During practice, you will receive a reminder of the rules. <i>This reminder will be taken out for test</i>.</p>'+
446-
446+
'<p class = block-text>To avoid technical issues, please keep the experiment tab (on Chrome or Firefox) <i>active and in full-screen mode</i> for the whole duration of each task.</p>'+
447447
'</div>',
448448
],
449449
allow_keys: false,
@@ -541,7 +541,6 @@ var fixation_block = {
541541

542542
var ITI_fixation_block = {
543543
type: 'poldrack-single-stim',
544-
stimulus: '<div class = centerbox><div class = fixation><span style="color:white">+</span></div></div>',
545544
is_html: true,
546545
choices: choices,
547546
data: {
@@ -599,7 +598,7 @@ var probe_block = {
599598
choices: choices,
600599
timing_post_trial: 0,
601600
timing_stim: 1000, //1000
602-
timing_response: 2000, //1000
601+
timing_response: 1000, //1000
603602
response_ends_trial: false,
604603
on_finish: appendProbeData
605604
};
@@ -626,7 +625,7 @@ var practice_probe_block = {
626625
exp_stage: "practice"
627626
},
628627
timing_stim: 1000, //1000
629-
timing_response: 2000, //1000
628+
timing_response: 1000, //1000
630629
timing_post_trial: 0,
631630
is_html: true,
632631
prompt: prompt_text,
@@ -711,7 +710,6 @@ for (i = 0; i < (practice_length); i++) {
711710

712711
var practice_ITI_fixation_block = {
713712
type: 'poldrack-single-stim',
714-
stimulus: '<div class = centerbox><div class = fixation><span style="color:white">+</span></div></div>',
715713
is_html: true,
716714
choices: 'none',
717715
data: {

directed_forgetting_with_flanker/experiment.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var randomDraw = function(lst) {
9696
var createTrialTypes = function(numTrialsPerBlock){
9797

9898
var stims = []
99-
for(var numIterations = 0; numIterations < numTrialsPerBlock/8; numIterations++){
99+
for(var numIterations = 0; numIterations < numTrialsPerBlock/(directed_cond_array.length*flanker_conditions.length); numIterations++){
100100
for (var numDirectedConds = 0; numDirectedConds < directed_cond_array.length; numDirectedConds++){
101101
for (var numFlankerConds = 0; numFlankerConds < flanker_conditions.length; numFlankerConds++){
102102

@@ -351,8 +351,8 @@ var credit_var = 0
351351

352352
// new vars
353353
var practice_len = 8 // must be divisible by 8
354-
var exp_len = 192 // must be divisible by 8
355-
var numTrialsPerBlock = 32; // divisible by 8
354+
var exp_len = 240 // must be divisible by 8
355+
var numTrialsPerBlock = 40; // divisible by directed_cond_array * flanker_conditions
356356
var numTestBlocks = exp_len / numTrialsPerBlock
357357

358358
var accuracy_thresh = 0.75
@@ -513,6 +513,8 @@ var instructions_block = {
513513
'<p class = block-text>Please ignore the letters that are not in the middle.</p>'+
514514

515515
'<p class = block-text>We will start practice when you finish instructions. Please make sure you understand the instructions before moving on. During practice, you will receive a reminder of the rules. <i>This reminder will be taken out for test</i>.</p>'+
516+
517+
'<p class = block-text>To avoid technical issues, please keep the experiment tab (on Chrome or Firefox) <i>active and in full-screen mode</i> for the whole duration of each task.</p>'+
516518
'</div>'
517519
],
518520
allow_keys: false,
@@ -611,7 +613,6 @@ for (i = 0; i < practice_len; i++) {
611613

612614
var ITI_fixation_block = {
613615
type: 'poldrack-single-stim',
614-
stimulus: '<div class = centerbox><div class = fixation><span style="color:white;">+</span></div></div>',
615616
is_html: true,
616617
choices: [possible_responses[0][1],possible_responses[1][1]],
617618
data: {
@@ -658,7 +659,7 @@ for (i = 0; i < practice_len; i++) {
658659
choices: [possible_responses[0][1],possible_responses[1][1]],
659660
data: {trial_id: "practice_trial"},
660661
timing_stim: 1000, //2000
661-
timing_response: 2000,
662+
timing_response: 1000,
662663
timing_post_trial: 0,
663664
is_html: true,
664665
on_finish: appendData,
@@ -798,7 +799,6 @@ for (i = 0; i < numTrialsPerBlock; i++) {
798799

799800
var ITI_fixation_block = {
800801
type: 'poldrack-single-stim',
801-
stimulus: '<div class = centerbox><div class = fixation><span style="color:white;">+</span></div></div>',
802802
is_html: true,
803803
choices: [possible_responses[0][1],possible_responses[1][1]],
804804
data: {
@@ -847,7 +847,7 @@ for (i = 0; i < numTrialsPerBlock; i++) {
847847
choices: [possible_responses[0][1],possible_responses[1][1]],
848848
timing_post_trial: 0,
849849
timing_stim: 1000, //2000
850-
timing_response: 2000, //2000
850+
timing_response: 1000, //2000
851851
response_ends_trial: false,
852852
on_finish: appendData
853853
};

directed_forgetting_with_shape_matching/experiment.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ var randomDraw = function(lst) {
120120
var createTrialTypes = function(numTrialsPerBlock){
121121

122122
var stims = []
123-
for(var numIterations = 0; numIterations < numTrialsPerBlock/8; numIterations++){
123+
for(var numIterations = 0; numIterations < numTrialsPerBlock/(directed_cond_array.length*shape_matching_conditions.length); numIterations++){
124124
for (var numDirectedConds = 0; numDirectedConds < directed_cond_array.length; numDirectedConds++){
125125
for (var numShapeConds = 0; numShapeConds < shape_matching_conditions.length; numShapeConds++){
126126

@@ -341,9 +341,9 @@ var instructTimeThresh = 0 ///in seconds
341341
var credit_var = 0
342342

343343
// new vars
344-
var practice_len = 8 // must be divisible by 8
345-
var exp_len = 192 // must be divisible by 8
346-
var numTrialsPerBlock = 32; // divisible by 64
344+
var practice_len = 24 // must be divisible by 8
345+
var exp_len = 240 // must be divisible by 8
346+
var numTrialsPerBlock = 40; // divisible by shape_matching_conditions * directed_cond_array
347347
var numTestBlocks = exp_len / numTrialsPerBlock
348348

349349
var accuracy_thresh = 0.75
@@ -504,6 +504,8 @@ var instructions_block = {
504504
'<p class = block-text>Please ignore the red letter.</p>'+
505505

506506
'<p class = block-text>We will start practice when you finish instructions. Please make sure you understand the instructions before moving on. During practice, you will receive a reminder of the rules. <i>This reminder will be taken out for test</i>.</p>'+
507+
508+
'<p class = block-text>To avoid technical issues, please keep the experiment tab (on Chrome or Firefox) <i>active and in full-screen mode</i> for the whole duration of each task.</p>'+
507509
'</div>'
508510
],
509511
allow_keys: false,
@@ -603,7 +605,6 @@ for (i = 0; i < practice_len; i++) {
603605

604606
var ITI_fixation_block = {
605607
type: 'poldrack-single-stim',
606-
stimulus: '<div class = centerbox><div class = fixation><span style="color:white;">+</span></div></div>',
607608
is_html: true,
608609
choices: [possible_responses[0][1],possible_responses[1][1]],
609610
data: {
@@ -651,7 +652,7 @@ for (i = 0; i < practice_len; i++) {
651652
choices: [possible_responses[0][1],possible_responses[1][1]],
652653
data: {trial_id: "practice_trial"},
653654
timing_stim: 1000, //2000
654-
timing_response: 2000,
655+
timing_response: 1000,
655656
timing_feedback_duration: 0,
656657
timing_post_trial: 0,
657658
is_html: true,
@@ -791,7 +792,6 @@ for (i = 0; i < numTrialsPerBlock; i++) {
791792

792793
var ITI_fixation_block = {
793794
type: 'poldrack-single-stim',
794-
stimulus: '<div class = centerbox><div class = fixation><span style="color:white;">+</span></div></div>',
795795
is_html: true,
796796
choices: [possible_responses[0][1],possible_responses[1][1]],
797797
data: {
@@ -840,7 +840,7 @@ for (i = 0; i < numTrialsPerBlock; i++) {
840840
choices: [possible_responses[0][1],possible_responses[1][1]],
841841
timing_post_trial: 0,
842842
timing_stim: 1000, //2000
843-
timing_response: 2000, //2000
843+
timing_response: 1000, //2000
844844
response_ends_trial: false,
845845
on_finish: appendData
846846
};

flanker_single_task_network/experiment.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,12 @@ var feedback_instruct_block = {
274274
var instructions_block = {
275275
type: 'poldrack-instructions',
276276
pages: [
277-
"<div class = centerbox><p class = block-text>In this experiment you will see five letters on the string composed of F's and H's. For instance, you might see 'FFFFF' or 'HHFHH'. Your task is to respond by pressing the key corresponding to the <i>middle</i> letter. So if you see 'FFHFF' you would press the 'H' key.</p><p class = block-text>After each response you will get feedback about whether you were correct or not. We will start with a short practice set.</p></div>"
277+
'<div class = centerbox>'+
278+
'<p class = block-text>In this experiment you will see five letters on the string composed of F\'s and H\'s. For instance, you might see \'FFFFF\' or \'HHFHH\'. '+
279+
'Your task is to respond by pressing the key corresponding to the <i>middle</i> letter. So if you see \'FFHFF\' you would press the \'H\' key.</p>'+
280+
'<p class = block-text>After each response you will get feedback about whether you were correct or not. We will start with a short practice set.</p>'+
281+
'<p class = block-text>To avoid technical issues, please keep the experiment tab (on Chrome or Firefox) <i>active and in full-screen mode</i> for the whole duration of each task.</p>'+
282+
'</div>'
278283
],
279284
allow_keys: false,
280285
data: {

flanker_with_cued_task_switching/experiment.js

+2
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,8 @@ var instructions_block = {
438438
'<p class = block-text>Please judge only the center number, you should ignore the other numbers.</p>'+
439439

440440
'<p class = block-text>We will start practice after you finish instructions. Please make sure you understand the instructions before moving on. During practice, you will receive a reminder of the rules. <i>This reminder will not be available for test</i>.</p>'+
441+
442+
'<p class = block-text>To avoid technical issues, please keep the experiment tab (on Chrome or Firefox) <i>active and in full-screen mode</i> for the whole duration of each task.</p>'+
441443

442444
'</div>'
443445
],

0 commit comments

Comments
 (0)