Skip to content

Commit

Permalink
add condition to trial-by-trial data
Browse files Browse the repository at this point in the history
  • Loading branch information
awellis committed Mar 23, 2023
1 parent acd9745 commit ecf5b09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mainExperimentTimeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ export const getMainExperimentTimeline = (
},
choices: responseMapping.responses,
on_finish: (data: any) => {
// Figure out which response would be correct during this specific trial

const condition = jsPsychInstance.timelineVariable('condition');
data.condition = condition;

const visibility = jsPsychInstance.timelineVariable('visibility');
// Figure out which response would be correct during this specific trial
const correctResponse =
visibility === 0
? responseMapping.responses[1]
Expand Down

0 comments on commit ecf5b09

Please sign in to comment.