Reply To: Trouble logging participant information

PennController for IBEX Forums Support Trouble logging participant information Reply To: Trouble logging participant information


Dear Ana-Maria,

First, make sure that your PennController file is not version 1.9: there is a bug in that version where the post-shuffle order reported in the results file is inaccurate

Once you get the order properly reported in the results file, it’s easy to retrieve which key was pressed: say the picture that was chosen was picture2 and picture2 is third in the reported order, then the key that was pressed was X

If you want to additionally report the filename of each picture in the results file, you can use newTrial().log

Here is a basic code that illustrates those ideas:

Template( row =>
        newCanvas("container", "80vw","80vh")
            .add("center at 25%","middle at 25%",newImage("picture1",row.picture1))
            .add("center at 75%","middle at 25%",newImage("picture2",row.picture2))
            .add("center at 25%","middle at 75%",newImage("picture3",row.picture3))
            .add("center at 75%","middle at 75%",newImage("picture4",row.picture4))
            .print("center at 50vw","middle at 50vh")
    .log("picture1", row.picture1)
    .log("picture2", row.picture2)
    .log("picture3", row.picture3)
    .log("picture4", row.picture4)

You can try it out here:

Here’s a result line that was generated for the first trial:


As you can see, I chose picture2 and if I look up the order, I see that picture2 ended up occupying the third position after the shuffle: this means that I chose the bottom-left picture by pressing X. Additionally, I see that picture2 was cat.png (note that the order of the filenames in the result line are not shuffled)

You can automatize those associations in R, for example

Let me know if you have questions