Millisecond Forums

Store picturename

https://forums.millisecond.com/Topic26407.aspx

By JuliaJuliaJulia - 2/8/2019

Hey again,

I have one last question concerning my script before it is finished. I would be happy if somebody could help me again!

In my script I show pictures (4 different trials). After each picture a surveypage must be completed. The surveypage is linked to the picture via /branch, e.g.:

<trial kitsch>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=kitsch]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

The ratingPage consists of four questions.

The script works fine. When I ran it and finally looked into the data-file, I recognized the following:

For the trial (e.g.) kitsch, the picture shown in this trial (the file name of this picture) is stored in the variable stimulusitem2 (you can find the data attached). But for the surveypage-trial the file-name of the picture to which the questions are refering to isn't stored. Is there a possibility to do so? 

Here is the complete code:

**************************************************************************************************************
**************************************************************************************************************
Stimulus Items

**************************************************************************************************************
**************************************************************************************************************

<item resonant_masterpieces>
/1 = "Campbell_soup_can.jpg"
/2 = "Der_Wanderer_über_dem_Nebelmeer.jpg"
/3 = "Fünfzehn_Sonnenblumen.jpg"
/4 = "The_Birth_of_Venus.jpg"
/5 = "The_creation_of_Adam.jpg"
/6 = "The_Kiss.jpg"
/7 = "The_Persistence_of_Memory.jpg"
/8 = "The_Scream.jpg"
/9 = "The_starry_night.jpg"
/10 = "The_Water_Lily_Pond.jpg"
</item>

<item nonresonant_masterpieces>
/1 = "Armored_Train.jpg"
/2 = "Bacchus_and_Ariadne.jpg"
/3 = "Ballet_Rehearsal.jpg"
/4 = "Bonjour_Monsieur_Courbet.jpg"
/5 = "Boulevard_des_Italiens_Morning_Sunlight.jpg"
/6 = "Boy_Bitten_by_a_Lizard.jpg"
/7 = "Chalk_Cliffs_on_Rügen.jpg"
/8 = "Cornelia_Presenting_Her_Children_as_Her_Treasure.jpg"
/9 = "Cut_with_the_Kitchen_Knife.jpg"
/10 = "Dido_building_Carthage.jpg"
/11 = "Interieur_au_violon.jpg"
/12 = "La_Montagne_Saint_Victoire_Barnes.jpg"
/13 = "Laokoon.jpg"
/14 = "Les_Glaneuses.jpg"
/15 = "Les_Majas_at_the_balcony.jpg"
/16 = "Oath_of_the_Horatii.jpg"
/17 = "pier-and-ocean.jpg"
/18 = "Quince_Cabbage_Melon_and_Cucumber.jpg"
/19 = "Raft_of_the_Medusa.jpg"
/20 = "Raphael_Galatea.jpg"
/21 = "Self-Portrait_with_Vanitas_Symbols.jpg"
/22 = "Suprematist_Composition.jpg"
/23 = "Swing-Renoir.jpeg"
/24 = "The_Annunciation.jpg"
/25 = "The_Banquet_of_Cleopatra.jpg"
/26 = "The_Coronation_of_Napoleon.jpeg"
/27 = "The_Daughters_of_Edward_Darley_Boit.jpg"
/28 = "The_Embarakation_for_Cythera.jpg"
/29 = "The_Hay_Wain.jpg"
/30 = "The_Thankful_Poor.jpg"
/31 = "The_Third_Class_Carriage.jpg"
/32 = "The_Valpincon_Bather.jpg"
/33 = "Three_Philosophers.jpg"
/34 = "View_from_Mount_Holyoke.jpg"
/35 = "Vision_after_the_Sermon.jpg"
</item>

<item japanese>
/1 = "8_Famous_Sights_of_Xiao_&_Xiang_Rivers.jpg"
/2 = "Actor_Ichikawa_Danjuro.jpg"
/3 = "Autumn_and_Winter_Landscapes.jpg"
/4 = "Cypress_Trees.jpg"
/5 = "Eight_Famous_Sights_of_Omi.jpg"
/6 = "Hawk_on_a_pine_tree.jpg"
/7 = "Maiko.jpg"
/8 = "Merrymaking_Under_the_Cherry_Blossoms_-_Google_Art_Project.jpg"
/9 = "Morning_view_of_the_Uji_River.jpg"
/10 = "Narrow_ivy_road.jpg"
/11 = "Popular_Geisha_at_the_Pleasure_Quarters.jpg"
/12 = "Portrait_of_Ashikaga_Yoshimasa.jpg"
/13 = "Spring_Ridge.jpg"
/14 = "Sundial_of_Young_Women.jpg"
/15 = "Yoroboshi.jpg"
/16 = "Zhou_Maoshu_Appreciating_Lotuses.jpg"
</item>

<item kitsch>
/1 = "Christian Riese Lassen_1.jpg"
/2 = "Christian Riese Lassen_2.jpg"
/3 = "Christian Riese Lassen_5.jpeg"
/4 = "Christian Riese Lassen_7.jpg"
/5 = "Christian Riese Lassen_8.jpg"
/6 = "lamplight_bridge.jpg"
/7 = "moonlight_cottage.jpg"
/8 = "moonlight_lane.jpg"
/9 = "Stairway-To-Paradise.jpg"
/10 = "Stepping-Stone-Cottage.jpg"
</item>

<text fixationCross>
/ items = ("+")
/ fontstyle = ("Arial", 300px)
/ color = (0, 0, 0)
</text>

<values>
/ myvalue = 0
</values>

<picture resMas>
/items = resonant_masterpieces
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture nonresMas>
/items = nonresonant_masterpieces
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture japanese>
/items = japanese
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture kitsch>
/items = kitsch
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<radiobuttons ratingquestionLiking>
/ caption="Wie gefällt Ihnen das Kunstwerk?"
/ options=("Sehr gut", "Gut", "Durchschnittlich", "Weniger", "Gar nicht")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons ratingquestionUnderstanding>
/ caption="Wie gut verstehen Sie das Kunstwerk?"
/ options=("Sehr gut", "Gut", "Durchschnittlich", "Weniger", "Gar nicht")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons ratingquestionWTP>
/ caption="Wie groß ist Ihre Bereitschaft Geld dafür zu zahlen, dieses Kunstwerk im Museum zu sehen?"
/ options=("Sehr hoch", "Hoch", "Durschnittlich hoch", "Weniger hoch", "Gar nicht hoch")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons questionPaintingFamilarity>
/ caption="Wie sehr sind Sie mit dem Kunstwerk vertraut?"
/ options=("Sehr hoch", "Hoch", "Durschnittlich hoch", "Weniger hoch", "Gar nicht hoch")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>



<page instruction>
^^^Im folgenden Teil des Experiments werden Ihnen einige Kunstwerke für jeweils 30 Sekunden präsentiert. Bitte betrachten Sie diese so wie Sie es mit Kunstwerken in einem Museum oder einer Gallerie tun würden. ^^Nach der Präsentation jedes Kunstwerks werden Ihnen vier Rating-Fragen gestellt. Beantworten Sie diese bitte so ehrlich wie möglich. Nachdem Sie die Fragen beantwortet haben, wird Ihnen das nächste Kunstwerk präsentiert bis sie alle gesehen und bewertet haben.

^^^^Bitte drücken Sie die Leertaste, um das Experiment zu starten.
</page>

<page end>
^^^^Sie haben nun alle Kunstwerke gesehen, dieser Teil des Experiments ist damit beendet.
^^^^Bitte wenden Sie sich an die Versuchsleiterin.
</page>

<instruct>
/windowsize = (90%, 90%)
/nextkey=(" ")
/nextlabel = "Leertaste"
/finishlabel = "Leertaste"
/ fontstyle = ("Arial", 4%, true)
/txcolor = (0, 0, 0)
</instruct>
**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************

<trial resMas>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes = [0=fixationCross; 500=resMas]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/pretrialpause= values.myvalue
</trial>

<trial nonresMas>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes = [0=fixationCross; 500=nonresMas]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<trial japanese>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=japanese]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<trial kitsch>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=kitsch]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<surveypage ratingPage>
/caption = "Please answer the following items to the best of your ability"
/itemfontstyle = ("Arial", 4%, false)
/ showquestionnumbers = false
/questions=[1=ratingquestionLiking; 2=ratingquestionUnderstanding; 3=ratingquestionWTP; 4=questionPaintingFamilarity]
/finishlabel="Weiter"
/caption = "Bitte beantworten Sie die folgenden Fragen über das zuletzt gezeigte Bild."
/itemspacing = 50px
</surveypage>

<block EXP>
/trials = [1-71 = noreplace(resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch)]
</block>

<expt>
/blocks = [1 = EXP]
/preinstructions = (instruction)
/ postinstructions = (end)
</expt>


Thanks a lot and best regards

Julia
By Dave - 2/10/2019

JuliaJuliaJulia - Saturday, February 9, 2019
Hey again,

I have one last question concerning my script before it is finished. I would be happy if somebody could help me again!

In my script I show pictures (4 different trials). After each picture a surveypage must be completed. The surveypage is linked to the picture via /branch, e.g.:

<trial kitsch>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=kitsch]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

The ratingPage consists of four questions.

The script works fine. When I ran it and finally looked into the data-file, I recognized the following:

For the trial (e.g.) kitsch, the picture shown in this trial (the file name of this picture) is stored in the variable stimulusitem2 (you can find the data attached). But for the surveypage-trial the file-name of the picture to which the questions are refering to isn't stored. Is there a possibility to do so? 

Here is the complete code:

**************************************************************************************************************
**************************************************************************************************************
Stimulus Items

**************************************************************************************************************
**************************************************************************************************************

<item resonant_masterpieces>
/1 = "Campbell_soup_can.jpg"
/2 = "Der_Wanderer_über_dem_Nebelmeer.jpg"
/3 = "Fünfzehn_Sonnenblumen.jpg"
/4 = "The_Birth_of_Venus.jpg"
/5 = "The_creation_of_Adam.jpg"
/6 = "The_Kiss.jpg"
/7 = "The_Persistence_of_Memory.jpg"
/8 = "The_Scream.jpg"
/9 = "The_starry_night.jpg"
/10 = "The_Water_Lily_Pond.jpg"
</item>

<item nonresonant_masterpieces>
/1 = "Armored_Train.jpg"
/2 = "Bacchus_and_Ariadne.jpg"
/3 = "Ballet_Rehearsal.jpg"
/4 = "Bonjour_Monsieur_Courbet.jpg"
/5 = "Boulevard_des_Italiens_Morning_Sunlight.jpg"
/6 = "Boy_Bitten_by_a_Lizard.jpg"
/7 = "Chalk_Cliffs_on_Rügen.jpg"
/8 = "Cornelia_Presenting_Her_Children_as_Her_Treasure.jpg"
/9 = "Cut_with_the_Kitchen_Knife.jpg"
/10 = "Dido_building_Carthage.jpg"
/11 = "Interieur_au_violon.jpg"
/12 = "La_Montagne_Saint_Victoire_Barnes.jpg"
/13 = "Laokoon.jpg"
/14 = "Les_Glaneuses.jpg"
/15 = "Les_Majas_at_the_balcony.jpg"
/16 = "Oath_of_the_Horatii.jpg"
/17 = "pier-and-ocean.jpg"
/18 = "Quince_Cabbage_Melon_and_Cucumber.jpg"
/19 = "Raft_of_the_Medusa.jpg"
/20 = "Raphael_Galatea.jpg"
/21 = "Self-Portrait_with_Vanitas_Symbols.jpg"
/22 = "Suprematist_Composition.jpg"
/23 = "Swing-Renoir.jpeg"
/24 = "The_Annunciation.jpg"
/25 = "The_Banquet_of_Cleopatra.jpg"
/26 = "The_Coronation_of_Napoleon.jpeg"
/27 = "The_Daughters_of_Edward_Darley_Boit.jpg"
/28 = "The_Embarakation_for_Cythera.jpg"
/29 = "The_Hay_Wain.jpg"
/30 = "The_Thankful_Poor.jpg"
/31 = "The_Third_Class_Carriage.jpg"
/32 = "The_Valpincon_Bather.jpg"
/33 = "Three_Philosophers.jpg"
/34 = "View_from_Mount_Holyoke.jpg"
/35 = "Vision_after_the_Sermon.jpg"
</item>

<item japanese>
/1 = "8_Famous_Sights_of_Xiao_&_Xiang_Rivers.jpg"
/2 = "Actor_Ichikawa_Danjuro.jpg"
/3 = "Autumn_and_Winter_Landscapes.jpg"
/4 = "Cypress_Trees.jpg"
/5 = "Eight_Famous_Sights_of_Omi.jpg"
/6 = "Hawk_on_a_pine_tree.jpg"
/7 = "Maiko.jpg"
/8 = "Merrymaking_Under_the_Cherry_Blossoms_-_Google_Art_Project.jpg"
/9 = "Morning_view_of_the_Uji_River.jpg"
/10 = "Narrow_ivy_road.jpg"
/11 = "Popular_Geisha_at_the_Pleasure_Quarters.jpg"
/12 = "Portrait_of_Ashikaga_Yoshimasa.jpg"
/13 = "Spring_Ridge.jpg"
/14 = "Sundial_of_Young_Women.jpg"
/15 = "Yoroboshi.jpg"
/16 = "Zhou_Maoshu_Appreciating_Lotuses.jpg"
</item>

<item kitsch>
/1 = "Christian Riese Lassen_1.jpg"
/2 = "Christian Riese Lassen_2.jpg"
/3 = "Christian Riese Lassen_5.jpeg"
/4 = "Christian Riese Lassen_7.jpg"
/5 = "Christian Riese Lassen_8.jpg"
/6 = "lamplight_bridge.jpg"
/7 = "moonlight_cottage.jpg"
/8 = "moonlight_lane.jpg"
/9 = "Stairway-To-Paradise.jpg"
/10 = "Stepping-Stone-Cottage.jpg"
</item>

<text fixationCross>
/ items = ("+")
/ fontstyle = ("Arial", 300px)
/ color = (0, 0, 0)
</text>

<values>
/ myvalue = 0
</values>

<picture resMas>
/items = resonant_masterpieces
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture nonresMas>
/items = nonresonant_masterpieces
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture japanese>
/items = japanese
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture kitsch>
/items = kitsch
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<radiobuttons ratingquestionLiking>
/ caption="Wie gefällt Ihnen das Kunstwerk?"
/ options=("Sehr gut", "Gut", "Durchschnittlich", "Weniger", "Gar nicht")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons ratingquestionUnderstanding>
/ caption="Wie gut verstehen Sie das Kunstwerk?"
/ options=("Sehr gut", "Gut", "Durchschnittlich", "Weniger", "Gar nicht")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons ratingquestionWTP>
/ caption="Wie groß ist Ihre Bereitschaft Geld dafür zu zahlen, dieses Kunstwerk im Museum zu sehen?"
/ options=("Sehr hoch", "Hoch", "Durschnittlich hoch", "Weniger hoch", "Gar nicht hoch")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons questionPaintingFamilarity>
/ caption="Wie sehr sind Sie mit dem Kunstwerk vertraut?"
/ options=("Sehr hoch", "Hoch", "Durschnittlich hoch", "Weniger hoch", "Gar nicht hoch")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>



<page instruction>
^^^Im folgenden Teil des Experiments werden Ihnen einige Kunstwerke für jeweils 30 Sekunden präsentiert. Bitte betrachten Sie diese so wie Sie es mit Kunstwerken in einem Museum oder einer Gallerie tun würden. ^^Nach der Präsentation jedes Kunstwerks werden Ihnen vier Rating-Fragen gestellt. Beantworten Sie diese bitte so ehrlich wie möglich. Nachdem Sie die Fragen beantwortet haben, wird Ihnen das nächste Kunstwerk präsentiert bis sie alle gesehen und bewertet haben.

^^^^Bitte drücken Sie die Leertaste, um das Experiment zu starten.
</page>

<page end>
^^^^Sie haben nun alle Kunstwerke gesehen, dieser Teil des Experiments ist damit beendet.
^^^^Bitte wenden Sie sich an die Versuchsleiterin.
</page>

<instruct>
/windowsize = (90%, 90%)
/nextkey=(" ")
/nextlabel = "Leertaste"
/finishlabel = "Leertaste"
/ fontstyle = ("Arial", 4%, true)
/txcolor = (0, 0, 0)
</instruct>
**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************

<trial resMas>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes = [0=fixationCross; 500=resMas]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/pretrialpause= values.myvalue
</trial>

<trial nonresMas>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes = [0=fixationCross; 500=nonresMas]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<trial japanese>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=japanese]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<trial kitsch>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=kitsch]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<surveypage ratingPage>
/caption = "Please answer the following items to the best of your ability"
/itemfontstyle = ("Arial", 4%, false)
/ showquestionnumbers = false
/questions=[1=ratingquestionLiking; 2=ratingquestionUnderstanding; 3=ratingquestionWTP; 4=questionPaintingFamilarity]
/finishlabel="Weiter"
/caption = "Bitte beantworten Sie die folgenden Fragen über das zuletzt gezeigte Bild."
/itemspacing = 50px
</surveypage>

<block EXP>
/trials = [1-71 = noreplace(resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch)]
</block>

<expt>
/blocks = [1 = EXP]
/preinstructions = (instruction)
/ postinstructions = (end)
</expt>


Thanks a lot and best regards

Julia

The surveypage doesn't display any image, so there is no reason it shoud store something. If you want to store something, you should create a variable

<values>
/ currentimage = ""
</values>

store the image name in that variable at the end of your <trial> elements

<trial japanese>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ ontrialend = [values.currentimage = picture.japanese.currentitem]
/ stimulustimes=[0=fixationCross; 500=japanese]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<trial kitsch>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ ontrialend = [values.currentimage = picture.kitsch.currentitem]
/ stimulustimes=[0=fixationCross; 500=kitsch]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

and then log that variable to the data file along with everything else you need logged by specifying the <data> element's /columns

<data>
/ columns = [date, time, subject, group, blocknum, blockcode, trialnum, trialcode, stimulusitem, stimulusitem, values.currentimage, response, latency, correct, ...]
...
</data>
By JuliaJuliaJulia - 2/15/2019

Dave - Monday, February 11, 2019
JuliaJuliaJulia - Saturday, February 9, 2019
Hey again,

I have one last question concerning my script before it is finished. I would be happy if somebody could help me again!

In my script I show pictures (4 different trials). After each picture a surveypage must be completed. The surveypage is linked to the picture via /branch, e.g.:

<trial kitsch>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=kitsch]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

The ratingPage consists of four questions.

The script works fine. When I ran it and finally looked into the data-file, I recognized the following:

For the trial (e.g.) kitsch, the picture shown in this trial (the file name of this picture) is stored in the variable stimulusitem2 (you can find the data attached). But for the surveypage-trial the file-name of the picture to which the questions are refering to isn't stored. Is there a possibility to do so? 

Here is the complete code:

**************************************************************************************************************
**************************************************************************************************************
Stimulus Items

**************************************************************************************************************
**************************************************************************************************************

<item resonant_masterpieces>
/1 = "Campbell_soup_can.jpg"
/2 = "Der_Wanderer_über_dem_Nebelmeer.jpg"
/3 = "Fünfzehn_Sonnenblumen.jpg"
/4 = "The_Birth_of_Venus.jpg"
/5 = "The_creation_of_Adam.jpg"
/6 = "The_Kiss.jpg"
/7 = "The_Persistence_of_Memory.jpg"
/8 = "The_Scream.jpg"
/9 = "The_starry_night.jpg"
/10 = "The_Water_Lily_Pond.jpg"
</item>

<item nonresonant_masterpieces>
/1 = "Armored_Train.jpg"
/2 = "Bacchus_and_Ariadne.jpg"
/3 = "Ballet_Rehearsal.jpg"
/4 = "Bonjour_Monsieur_Courbet.jpg"
/5 = "Boulevard_des_Italiens_Morning_Sunlight.jpg"
/6 = "Boy_Bitten_by_a_Lizard.jpg"
/7 = "Chalk_Cliffs_on_Rügen.jpg"
/8 = "Cornelia_Presenting_Her_Children_as_Her_Treasure.jpg"
/9 = "Cut_with_the_Kitchen_Knife.jpg"
/10 = "Dido_building_Carthage.jpg"
/11 = "Interieur_au_violon.jpg"
/12 = "La_Montagne_Saint_Victoire_Barnes.jpg"
/13 = "Laokoon.jpg"
/14 = "Les_Glaneuses.jpg"
/15 = "Les_Majas_at_the_balcony.jpg"
/16 = "Oath_of_the_Horatii.jpg"
/17 = "pier-and-ocean.jpg"
/18 = "Quince_Cabbage_Melon_and_Cucumber.jpg"
/19 = "Raft_of_the_Medusa.jpg"
/20 = "Raphael_Galatea.jpg"
/21 = "Self-Portrait_with_Vanitas_Symbols.jpg"
/22 = "Suprematist_Composition.jpg"
/23 = "Swing-Renoir.jpeg"
/24 = "The_Annunciation.jpg"
/25 = "The_Banquet_of_Cleopatra.jpg"
/26 = "The_Coronation_of_Napoleon.jpeg"
/27 = "The_Daughters_of_Edward_Darley_Boit.jpg"
/28 = "The_Embarakation_for_Cythera.jpg"
/29 = "The_Hay_Wain.jpg"
/30 = "The_Thankful_Poor.jpg"
/31 = "The_Third_Class_Carriage.jpg"
/32 = "The_Valpincon_Bather.jpg"
/33 = "Three_Philosophers.jpg"
/34 = "View_from_Mount_Holyoke.jpg"
/35 = "Vision_after_the_Sermon.jpg"
</item>

<item japanese>
/1 = "8_Famous_Sights_of_Xiao_&_Xiang_Rivers.jpg"
/2 = "Actor_Ichikawa_Danjuro.jpg"
/3 = "Autumn_and_Winter_Landscapes.jpg"
/4 = "Cypress_Trees.jpg"
/5 = "Eight_Famous_Sights_of_Omi.jpg"
/6 = "Hawk_on_a_pine_tree.jpg"
/7 = "Maiko.jpg"
/8 = "Merrymaking_Under_the_Cherry_Blossoms_-_Google_Art_Project.jpg"
/9 = "Morning_view_of_the_Uji_River.jpg"
/10 = "Narrow_ivy_road.jpg"
/11 = "Popular_Geisha_at_the_Pleasure_Quarters.jpg"
/12 = "Portrait_of_Ashikaga_Yoshimasa.jpg"
/13 = "Spring_Ridge.jpg"
/14 = "Sundial_of_Young_Women.jpg"
/15 = "Yoroboshi.jpg"
/16 = "Zhou_Maoshu_Appreciating_Lotuses.jpg"
</item>

<item kitsch>
/1 = "Christian Riese Lassen_1.jpg"
/2 = "Christian Riese Lassen_2.jpg"
/3 = "Christian Riese Lassen_5.jpeg"
/4 = "Christian Riese Lassen_7.jpg"
/5 = "Christian Riese Lassen_8.jpg"
/6 = "lamplight_bridge.jpg"
/7 = "moonlight_cottage.jpg"
/8 = "moonlight_lane.jpg"
/9 = "Stairway-To-Paradise.jpg"
/10 = "Stepping-Stone-Cottage.jpg"
</item>

<text fixationCross>
/ items = ("+")
/ fontstyle = ("Arial", 300px)
/ color = (0, 0, 0)
</text>

<values>
/ myvalue = 0
</values>

<picture resMas>
/items = resonant_masterpieces
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture nonresMas>
/items = nonresonant_masterpieces
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture japanese>
/items = japanese
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<picture kitsch>
/items = kitsch
/select = noreplace
/position = (50%, 50%)
/height = 691px
/width = 691px
/select = noreplace
</picture>

<radiobuttons ratingquestionLiking>
/ caption="Wie gefällt Ihnen das Kunstwerk?"
/ options=("Sehr gut", "Gut", "Durchschnittlich", "Weniger", "Gar nicht")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons ratingquestionUnderstanding>
/ caption="Wie gut verstehen Sie das Kunstwerk?"
/ options=("Sehr gut", "Gut", "Durchschnittlich", "Weniger", "Gar nicht")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons ratingquestionWTP>
/ caption="Wie groß ist Ihre Bereitschaft Geld dafür zu zahlen, dieses Kunstwerk im Museum zu sehen?"
/ options=("Sehr hoch", "Hoch", "Durschnittlich hoch", "Weniger hoch", "Gar nicht hoch")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>

<radiobuttons questionPaintingFamilarity>
/ caption="Wie sehr sind Sie mit dem Kunstwerk vertraut?"
/ options=("Sehr hoch", "Hoch", "Durschnittlich hoch", "Weniger hoch", "Gar nicht hoch")
/ optionvalues = ("1", "2", "3", "4", "5")
/ orientation=horizontal
/ required=true
</radiobuttons>



<page instruction>
^^^Im folgenden Teil des Experiments werden Ihnen einige Kunstwerke für jeweils 30 Sekunden präsentiert. Bitte betrachten Sie diese so wie Sie es mit Kunstwerken in einem Museum oder einer Gallerie tun würden. ^^Nach der Präsentation jedes Kunstwerks werden Ihnen vier Rating-Fragen gestellt. Beantworten Sie diese bitte so ehrlich wie möglich. Nachdem Sie die Fragen beantwortet haben, wird Ihnen das nächste Kunstwerk präsentiert bis sie alle gesehen und bewertet haben.

^^^^Bitte drücken Sie die Leertaste, um das Experiment zu starten.
</page>

<page end>
^^^^Sie haben nun alle Kunstwerke gesehen, dieser Teil des Experiments ist damit beendet.
^^^^Bitte wenden Sie sich an die Versuchsleiterin.
</page>

<instruct>
/windowsize = (90%, 90%)
/nextkey=(" ")
/nextlabel = "Leertaste"
/finishlabel = "Leertaste"
/ fontstyle = ("Arial", 4%, true)
/txcolor = (0, 0, 0)
</instruct>
**************************************************************************************************************
**************************************************************************************************************
TRIALS
**************************************************************************************************************
**************************************************************************************************************

<trial resMas>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes = [0=fixationCross; 500=resMas]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/pretrialpause= values.myvalue
</trial>

<trial nonresMas>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes = [0=fixationCross; 500=nonresMas]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<trial japanese>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=japanese]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<trial kitsch>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ stimulustimes=[0=fixationCross; 500=kitsch]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<surveypage ratingPage>
/caption = "Please answer the following items to the best of your ability"
/itemfontstyle = ("Arial", 4%, false)
/ showquestionnumbers = false
/questions=[1=ratingquestionLiking; 2=ratingquestionUnderstanding; 3=ratingquestionWTP; 4=questionPaintingFamilarity]
/finishlabel="Weiter"
/caption = "Bitte beantworten Sie die folgenden Fragen über das zuletzt gezeigte Bild."
/itemspacing = 50px
</surveypage>

<block EXP>
/trials = [1-71 = noreplace(resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, resMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, nonresMas, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, japanese, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch, kitsch)]
</block>

<expt>
/blocks = [1 = EXP]
/preinstructions = (instruction)
/ postinstructions = (end)
</expt>


Thanks a lot and best regards

Julia

The surveypage doesn't display any image, so there is no reason it shoud store something. If you want to store something, you should create a variable

<values>
/ currentimage = ""
</values>

store the image name in that variable at the end of your <trial> elements

<trial japanese>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ ontrialend = [values.currentimage = picture.japanese.currentitem]
/ stimulustimes=[0=fixationCross; 500=japanese]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

<trial kitsch>
/ontrialbegin = [values.myvalue = floor(rand(3000,5000))]
/ ontrialend = [values.currentimage = picture.kitsch.currentitem]
/ stimulustimes=[0=fixationCross; 500=kitsch]
/branch = [surveypage.ratingPage]
/timeout = 30500 + values.myvalue
/ pretrialpause= values.myvalue
</trial>

and then log that variable to the data file along with everything else you need logged by specifying the <data> element's /columns

<data>
/ columns = [date, time, subject, group, blocknum, blockcode, trialnum, trialcode, stimulusitem, stimulusitem, values.currentimage, response, latency, correct, ...]
...
</data>

Ah, thanks, now I have understood it! 
Best

Julia