PennController for IBEX › Forums › Support › Target Reading times (priming task)
- This topic has 4 replies, 2 voices, and was last updated 3 years, 8 months ago by
JulianaNovo.
-
AuthorPosts
-
February 16, 2022 at 5:51 pm #7766
JulianaNovoParticipantHi Jeremy,
I customised a Priming task. Everything seems to work well, but when I looked at my results, Pcibex is logging consecutive values for three columns (item, prime and target). I was hoping to get the reading times for the target word or the pressed answer timestamp. Besides the pressed answer (FJ). Instead I got consecutive numbers, I’m not able to figure out where they came from.
Hope you can help me out.
Many Many Thanks,Demonstration link: https://farm.pcibex.net/r/uLOOqe/
February 16, 2022 at 6:32 pm #7767
JeremyKeymasterHi,
I’m not sure what you mean by “consecutive values,” but your code as it is now logs the value of
row.itemin each of the three columns:.log( "item", row.item ) .log( "prime", row.item ) .log( "target", row.item )
So PennController reports in all three columns the value of the “item” cell from the row that was used to generate the current trial, as it’s been told to
You can find the timestamp corresponding to the keypress in the results line(s) corresponding to the Key element (which PennController knows to log because
logis called on the Key element:newKey("answerTarget", "FJ").log().wait() // Proceed upon press on F or J (log it))You can then compute response time by subtracting timestamps, as illustrated using R in the advanced tutorial
Jeremy
February 16, 2022 at 7:33 pm #7768
JulianaNovoParticipantThank you, Jeremy. I’ll work on R afterwards.
I am wondering if there is a way to log the time between the target presentation and the button press? Instead of doing the math afterwards.. Kind of like it is done on self-paced reading task, in which we collect the reading times between each space bar press.
Again, Thank you.
JulianaFebruary 16, 2022 at 7:39 pm #7769
JeremyKeymasterYes, you could use a global Var element to compute the time difference between two timepoints in your sequence of in-trial commands on the fly, and report it as an extra column using
newTrial().log():newTrial( newVar("RT").global().set(()=>Date.now()) , newText("Hello world").print() , newKey("FJ").wait() , getVar("RT").set(v=>Date.now()-v) ) .log("RT", getVar("RT"))Jeremy
February 16, 2022 at 8:04 pm #7770
JulianaNovoParticipantThank you. I did not think about it before.
Best,
J -
AuthorPosts
- You must be logged in to reply to this topic.