PennController for IBEX › Forums › Support › Scale name logging
- This topic has 3 replies, 2 voices, and was last updated 2 years, 3 months ago by
henrikd.
-
AuthorPosts
-
May 27, 2022 at 6:27 am #8209
henrikd
ParticipantHi!
I’m working on a norming experiment where the participants see 5 pictures concurrently and have to rate each picture on a scale consisting of 4 adjectives. Please also check the demonstration link:
I have some trouble logging the participant’s answers: If I use.log()
on the scale element, I can’t distinguish which answer belongs to which picture since only the selected button and timestamp are logged but not the scale name itself. Is there a possibility to indicate the name (e.g."scale_1"
) when logging the selected button, etc.?
I’ve already tried to define a new variable that outputs the scale name as well as the selected button. Therefore, I usednewVar("scale_1").set(getScale("scale_1")).log()
but the scale selection is only printed as NaN instead of the adjective string.
This is my code:newTrial("trials", defaultText .center() .css("font-size", "1em") .print() , defaultImage .size(200, 150) , newCanvas("norming_1_description", "20vw", "10vh") .add( "center at 50%" , "middle at 50%" , newText("text_1", "The statue is ...") ) , newCanvas("norming_1_picture", "14vw", "21vh") .add( "center at 50%" , "middle at 50%" , newImage("statue_tall_1.png") ) .cssContainer("border", "solid 1px black") , newCanvas("norming_1_selection", "20vw", "30vh") .add("center at 50%" , "middle at 50%", newScale("scale_1", " "+"tiny", " "+"small", " "+"tall", " "+"gigantic", " "+"none applies") .settings.labels("right") .vertical() .log() ) , newCanvas("norming_2_description", "20vw", "10vh") .add( "center at 50%" , "middle at 50%" , newText("text_2", "The statue is ...") ) , newCanvas("norming_2_picture", "14vw", "21vh") .add( "center at 50%" , "middle at 50%" , newImage("statue_tall_2.png") ) .cssContainer("border", "solid 1px black") , newCanvas("norming_2_selection", "20vw", "30vh") .add("center at 50%" , "middle at 50%", newScale("scale_2", " "+"tiny", " "+"small", " "+"tall", " "+"gigantic", " "+"none applies") .settings.labels("right") .vertical() .log() ) , newCanvas("norming_3_description", "20vw", "10vh") .add( "center at 50%" , "middle at 50%" , newText("text_3", "The statue is ...") ) , newCanvas("norming_3_picture", "14vw", "21vh") .add( "center at 50%" , "middle at 50%" , newImage("statue_tall_3.png") ) .cssContainer("border", "solid 1px black") , newCanvas("norming_3_selection", "20vw", "30vh") .add("center at 50%" , "middle at 50%", newScale("scale_3", " "+"tiny", " "+"small", " "+"tall", " "+"gigantic", " "+"none applies") .settings.labels("right") .vertical() .log() ) , newCanvas("norming_4_description", "20vw", "10vh") .add( "center at 50%" , "middle at 50%" , newText("text_4", "The statue is ...") ) , newCanvas("norming_4_picture", "14vw", "21vh") .add( "center at 50%" , "middle at 50%" , newImage("statue_tall_4.png") ) .cssContainer("border", "solid 1px black") , newCanvas("norming_4_selection", "20vw", "30vh") .add("center at 50%" , "middle at 50%", newScale("scale_4", " "+"tiny", " "+"small", " "+"tall", " "+"gigantic", " "+"none applies") .settings.labels("right") .vertical() .log() ) , newCanvas("norming_5_description", "20vw", "10vh") .add( "center at 50%" , "middle at 50%" , newText("text_5", "The statue is ...") ) , newCanvas("norming_5_picture", "14vw", "21vh") .add( "center at 50%" , "middle at 50%" , newImage("statue_tall_5.png") ) .cssContainer("border", "solid 1px black") , newCanvas("norming_5_selection", "20vw", "30vh") .add("center at 50%" , "middle at 50%", newScale("scale_5", " "+"tiny", " "+"small", " "+"tall", " "+"gigantic", " "+"none applies") .settings.labels("right") .vertical() .log() ) , newButton("continue", "Continue") .center() , newCanvas("canvas", "100vw", "100vh") .add( "center at 10%" , "top at 0%", getCanvas("norming_1_description")) .add( "center at 10%" , "middle at 18%", getCanvas("norming_1_picture")) .add( "center at 10%" , "middle at 36.5%", getCanvas("norming_1_selection")) .add( "center at 30%" , "top at 0%", getCanvas("norming_2_description")) .add( "center at 30%" , "middle at 18%", getCanvas("norming_2_picture")) .add( "center at 30%" , "middle at 36.5%", getCanvas("norming_2_selection")) .add( "center at 50%" , "top at 0%", getCanvas("norming_3_description")) .add( "center at 50%" , "middle at 18%", getCanvas("norming_3_picture")) .add( "center at 50%" , "middle at 36.5%", getCanvas("norming_3_selection")) .add( "center at 70%" , "top at 0%", getCanvas("norming_4_description")) .add( "center at 70%" , "middle at 18%", getCanvas("norming_4_picture")) .add( "center at 70%" , "middle at 36.5%", getCanvas("norming_4_selection")) .add( "center at 90%" , "top at 0%", getCanvas("norming_5_description")) .add( "center at 90%" , "middle at 18%", getCanvas("norming_5_picture")) .add( "center at 90%" , "middle at 36.5%", getCanvas("norming_5_selection")) .add( "center at 50%" , "bottom at 50%", getButton("continue")) .print( "center at 50%", 5) , // newVar("scale_1") // .set(getScale("scale_1")) // .log() // , getButton("continue") .wait( getScale("scale_1").test.selected() .and( getScale("scale_2").test.selected() ) .and( getScale("scale_3").test.selected() ) .and( getScale("scale_4").test.selected() ) .and( getScale("scale_5").test.selected() ) .failure( newCanvas("feedback", "100vw", "5vh") .add( "center at 50%", "middle at 50%", newText("Please check your selection. You have to answer all statements.") .center() .color("red") ) .print( "center at 50%", "top at 50%") ) ) );
Thanks for your help!Henrik
May 27, 2022 at 6:29 am #8210henrikd
ParticipantPlease also check the demonstration link: https://farm.pcibex.net/r/RihjDS/experiment.html?test=true
-
This reply was modified 2 years, 3 months ago by
henrikd.
May 27, 2022 at 9:49 am #8212Jeremy
KeymasterHi Henrik,
The name of the Scale element is reported in the results file, here’s a sample from a test run of mine:
1653659265 EDITED PennController 0 0 trials NULL Scale scale_1 Choice small 1653659258865 NULL 1653659265 EDITED PennController 0 0 trials NULL Scale scale_2 Choice tiny 1653659259777 NULL 1653659265 EDITED PennController 0 0 trials NULL Scale scale_3 Choice tall 1653659261098 NULL 1653659265 EDITED PennController 0 0 trials NULL Scale scale_4 Choice tiny 1653659261951 NULL 1653659265 EDITED PennController 0 0 trials NULL Scale scale_5 Choice gigantic 1653659263569 NULL
As you can see, the first line reports
scale_1
and the last one reportsscale_5
Jeremy
May 31, 2022 at 3:16 am #8217henrikd
ParticipantHi Jeremy,
I overlooked the name of the Scale element in the results file. My bad! But it’s there and works as it should. Thanks a lot!
Henrik
-
This reply was modified 2 years, 3 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.