diff --git a/rt-task_main_k.js b/rt-task_main_k.js deleted file mode 100644 index ca2b192..0000000 --- a/rt-task_main_k.js +++ /dev/null @@ -1,154 +0,0 @@ -/* Change 1: Adding the image hosting site */ -// define the site that hosts stimuli images -// usually https://.github.io// -var repo_site = "https://spoggesi.github.io/Qualtrics-test/"; - -/* create timeline */ -var timeline = []; - -/* define instructions trial */ -var instructions = { - type: "html-keyboard-response", - stimulus: "

You will now carry out the same task.

" + - "

This time, please respond to whether you associate the word shown with the yoghurt you have just eaten or your experience of eating this yoghurt.

" + - "

There are no incorrect answers, just your opinion.

" + - "

Please place your fingers over the F and J keys ready to make your choices.

" + - "

Press any key to begin.

", - post_trial_gap: 2000 -}; -timeline.push(instructions); - -/* test trials */ - -var test_stimuli = [{ - stimulus: '
energetic
', - data: {test_part: 'energeticKap', correct_response: 'j'} - }, - { - stimulus: '
indulgent
', - data: {test_part: 'indulgentKap', correct_response: 'j'} - }, - { - stimulus: '
nervous
', - data: {test_part: 'nervousKap', correct_response: 'j'} - }, - { - stimulus: '
relaxed
', - data: {test_part: 'relaxedKap', correct_response: 'j'} - }, - { - stimulus: '
active
', - data: {test_part: 'activeKap', correct_response: 'j'} - }, - { - stimulus: '
happy
', - data: {test_part: 'happyKap', correct_response: 'j'} - }, - { - stimulus: '
uninspired
', - data: {test_part: 'uninspiredKap', correct_response: 'j'} - }, - { - stimulus: '
classic
', - data: {test_part: 'classicKap', correct_response: 'j'} - }, - { - stimulus: '
impressed
', - data: {test_part: 'impressedKap', correct_response: 'j'} - }, - { - stimulus: '
sour
', - data: {test_part: 'sourKap', correct_response: 'j'} - }, - { - stimulus: '
sweet
', - data: {test_part: 'sweetKap', correct_response: 'j'} - }, - { - stimulus: '
thick
', - data: {test_part: 'thickKap', correct_response: 'j'} - }, - { - stimulus: '
creamy
', - data: {test_part: 'creamyKap', correct_response: 'j'} - }, - { - stimulus: '
healthy
', - data: {test_part: 'healthyKap', correct_response: 'j'} - }, - { - stimulus: '
tasty
', - data: {test_part: 'tastyKap', correct_response: 'j'} - } -]; - -var fixation = { - type: 'html-keyboard-response', - stimulus: '
+
', - choices: jsPsych.NO_KEYS, - prompt: '
press "F" for NO
press "J" for YES
', - trial_duration: function () { - return jsPsych.randomization.sampleWithoutReplacement([1000], 1)[0]; - }, - data: { - test_part: 'fixation' - } -} - -var test = { - type: "html-keyboard-response", - stimulus: jsPsych.timelineVariable('stimulus'), - choices: ['f', 'j'], - data: jsPsych.timelineVariable('data'), - prompt: '
press "F" for NO
press "J" for YES
', - on_finish: function (data) { - data.correct = data.key_press == jsPsych.pluginAPI.convertKeyCharacterToKeyCode(data.correct_response); - }, -} - -var test_procedure = { - timeline: [fixation, test], - timeline_variables: test_stimuli, - repetitions: 3, - randomize_order: true -} -timeline.push(test_procedure); - -/* define debrief */ - -var debrief_block = { - type: "html-keyboard-response", - stimulus: function () { - var energetic = jsPsych.data.get().filter({test_part: 'energetic'}); - var indulgent = jsPsych.data.get().filter({test_part: 'indulgent'}); - var nervous = jsPsych.data.get().filter({test_part: 'nervous'}); - var relaxed = jsPsych.data.get().filter({test_part: 'relaxed'}); - var active = jsPsych.data.get().filter({test_part: 'active'}); - var happy = jsPsych.data.get().filter({test_part: 'happy'}); - var uninspired = jsPsych.data.get().filter({test_part: 'uninspired'}); - var classic = jsPsych.data.get().filter({test_part: 'classic'}); - var impressed= jsPsych.data.get().filter({test_part: 'impressed'}); - var sour = jsPsych.data.get().filter({test_part: 'sour'}); - var sweet = jsPsych.data.get().filter({test_part: 'sweet'}); - var thick = jsPsych.data.get().filter({test_part: 'thick'}); - var creamy = jsPsych.data.get().filter({test_part: 'creamy'}); - var healthy = jsPsych.data.get().filter({test_part: 'healthy'}); - var tasty = jsPsych.data.get().filter({test_part: 'tasty'}); - - var rt_energetic = Math.round(energetic.select('rt').mean()); - var rt_indulgent = Math.round(indulgent.select('rt').mean()); - var rt_nervous = Math.round(nervous.select('rt').mean()); - var rt_relaxed = Math.round(relaxed.select('rt').mean()); - var rt_active = Math.round(active.select('rt').mean()); - var rt_happy = Math.round(happy.select('rt').mean()); - var rt_uninspired = Math.round(uninspired.select('rt').mean()); - var rt_classic = Math.round(classic.select('rt').mean()); - var rt_impressed = Math.round(impressed.select('rt').mean()); - var rt_sour= Math.round(indulgent.select('rt').mean()); - var rt_sweet= Math.round(sweet.select('rt').mean()); - var rt_thick= Math.round(thick.select('rt').mean()); - var rt_creamy= Math.round(creamy.select('rt').mean()); - var rt_healthy= Math.round(healthy.select('rt').mean()); - var rt_tasty= Math.round(tasty.select('rt').mean()); - } -};