Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing stop+df Issues #622

Merged
merged 8 commits into from
May 31, 2023
2,062 changes: 1,115 additions & 947 deletions cued_task_switching_with_directed_forgetting/experiment.js

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions directed_forgetting_single_task_network/experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var getTestFeedback = function() {
}

var getCategorizeFeedback = function(){
curr_trial = jsPsych.progress().current_trial_global - 2
curr_trial = jsPsych.progress().current_trial_global - 1
trial_id = jsPsych.data.getDataByTrialIndex(curr_trial).trial_id
if (trial_id == 'practice_trial'){
if (jsPsych.data.getDataByTrialIndex(curr_trial).key_press == jsPsych.data.getDataByTrialIndex(curr_trial).correct_response){
Expand Down Expand Up @@ -598,7 +598,7 @@ var probe_block = {
choices: choices,
timing_post_trial: 0,
timing_stim: 1000, //1000
timing_response: 1000, //1000
timing_response: 2000, //1000
response_ends_trial: false,
on_finish: appendProbeData
};
Expand All @@ -625,7 +625,7 @@ var practice_probe_block = {
exp_stage: "practice"
},
timing_stim: 1000, //1000
timing_response: 1000, //1000
timing_response: 2000, //1000
timing_post_trial: 0,
is_html: true,
prompt: prompt_text,
Expand Down Expand Up @@ -778,7 +778,6 @@ for (i = 0; i < (practice_length); i++) {
practiceTrials.push(practice_cue_block);
practiceTrials.push(practice_fixation_block);
practiceTrials.push(practice_probe_block);
practiceTrials.push(practice_ITI_fixation_block);
practiceTrials.push(categorize_block);
}

Expand Down Expand Up @@ -865,7 +864,6 @@ for (i = 0; i < numTrialsPerBlock; i++) { //numTrialsPerBlock
testTrials.push(cue_block);
testTrials.push(fixation_block);
testTrials.push(probe_block);
testTrials.push(ITI_fixation_block);
}

var testCount = 0
Expand Down Expand Up @@ -974,4 +972,4 @@ directed_forgetting_single_task_network_experiment.push(testNode)
directed_forgetting_single_task_network_experiment.push(test_feedback_block)

directed_forgetting_single_task_network_experiment.push(post_task_block)
directed_forgetting_single_task_network_experiment.push(end_block);
directed_forgetting_single_task_network_experiment.push(end_block);
10 changes: 4 additions & 6 deletions directed_forgetting_with_flanker/experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ var getProbeStim = function(){
}

var getCategorizeFeedback = function(){
curr_trial = jsPsych.progress().current_trial_global - 2
curr_trial = jsPsych.progress().current_trial_global - 1
trial_id = jsPsych.data.getDataByTrialIndex(curr_trial).trial_id
if (trial_id == 'practice_trial'){
if (jsPsych.data.getDataByTrialIndex(curr_trial).key_press == jsPsych.data.getDataByTrialIndex(curr_trial).correct_response){
Expand Down Expand Up @@ -659,7 +659,7 @@ for (i = 0; i < practice_len; i++) {
choices: [possible_responses[0][1],possible_responses[1][1]],
data: {trial_id: "practice_trial"},
timing_stim: 1000, //2000
timing_response: 1000,
timing_response: 2000,
timing_post_trial: 0,
is_html: true,
on_finish: appendData,
Expand All @@ -686,7 +686,6 @@ for (i = 0; i < practice_len; i++) {
practiceTrials.push(cue_directed_block)
practiceTrials.push(fixation_block)
practiceTrials.push(practice_probe_block)
practiceTrials.push(ITI_fixation_block)
practiceTrials.push(categorize_block)
}

Expand Down Expand Up @@ -847,7 +846,7 @@ for (i = 0; i < numTrialsPerBlock; i++) {
choices: [possible_responses[0][1],possible_responses[1][1]],
timing_post_trial: 0,
timing_stim: 1000, //2000
timing_response: 1000, //2000
timing_response: 2000, //2000
response_ends_trial: false,
on_finish: appendData
};
Expand All @@ -857,7 +856,6 @@ for (i = 0; i < numTrialsPerBlock; i++) {
testTrials.push(cue_directed_block)
testTrials.push(fixation_block)
testTrials.push(probe_block)
testTrials.push(ITI_fixation_block)
}

var testCount = 0
Expand Down Expand Up @@ -935,4 +933,4 @@ directed_forgetting_with_flanker_experiment.push(testNode);
directed_forgetting_with_flanker_experiment.push(feedback_block);

directed_forgetting_with_flanker_experiment.push(post_task_block);
directed_forgetting_with_flanker_experiment.push(end_block);
directed_forgetting_with_flanker_experiment.push(end_block);