Double logging error

9 views
Skip to first unread message

Benedek Kurdi

unread,
May 21, 2021, 12:22:07 PM5/21/21
to Minno.js
Hi all,
Sorry about the many questions. I ran into an issue trying to modify the standard AMP script. Specifically, after each normal trial I'm trying to include an additional trial on which the participant can indicate whether they think their response to the target was influenced by the prime. The code for the influence trial that I'm trying to add is attached.
The idea is that no matter what, the trial should take 2,500 ms to complete. First there is a blank screen for 200 ms and then there is a 2,300 ms window during which the participant can enter their response by hitting space.
If they hit space (line 35), we set the score to 1, remove the input, hide the stimulus, and log the trial. If they don't hit space and the trial isn't logged yet, we set the score to 0 and log the trial (lines 48–49). The latter is supposed to get triggered only when we get to the end of the trial (line 78).
But somehow my logic must be off. If I hit space during the trial, I get an error saying that the PI server doesn't accept multiple logs per trial. If I comment out line 54, I don't get the error. But the trial doesn't get logged either unless the space bar is pressed.
Can someone please look at my code and help me figure out where my logic with the conditionals is off?
Thanks so much!
—Benedek
influence.txt

Mayan Navon

unread,
May 23, 2021, 8:35:21 AM5/23/21
to Benedek Kurdi, Minno.js
Hi Benedek,

I think you need to change the trial's data 'logged' property to 'yes' in the interaction that is triggered following the space keypress. Otherwise, the 'noSpace' condition could still be triggered.

Let me know if that helped.

Best,
Mayan

--
You received this message because you are subscribed to the Google Groups "Minno.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minnojs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minnojs/1f51b686-832b-40df-bdfb-440200da2ff2n%40googlegroups.com.


--
Mayan

Benedek Kurdi

unread,
May 23, 2021, 8:51:10 AM5/23/21
to Yoav Bar-Anan, Mayan Navon, Minno.js

Awesome, thanks to both of you. For some reason I assumed that the logged property was literally tracking whether the trial has already been logged.
Thanks so much again!
—Benedek

On Sun, May 23, 2021 at 8:42 AM Yoav Bar-Anan <bar...@tauex.tau.ac.il> wrote:
I would also recommend using {type:'removeInput',handle : 'All'} in both interactions (i.e,. after space is pressed or after noSpace is triggered), to increase the likelihood that only one of those would occur. Yoav



--
Benedek Kurdi
411 Orange Street #4B
New Haven, CT 06511

Yoav Bar-Anan

unread,
May 25, 2021, 12:00:27 PM5/25/21
to Benedek Kurdi, Minno.js
I would also recommend using {type:'removeInput',handle : 'All'} in both interactions (i.e,. after space is pressed or after noSpace is triggered), to increase the likelihood that only one of those would occur. Yoav

On Sun, May 23, 2021 at 3:35 PM Mayan Navon <navm...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages