OS : MacOS Ventura 13.4
PsychoPy version : 2024.1.5
Standard Standalone?: y
What are you trying to achieve?:
I am building a stroop task for fMRI experiment, in which the subjects are required to respond through the response box after seeing the stimulus. The trial should ends when the subject press any of the four button (1, 2, 3, or 4) or the time exceeded 1.25s, the trial end and start a new trial.
What did you try to make it work?:
I built the experiment through builder. Each trial consists of a text component (a fixation cross), followed by an image component and keyboard component.
I enabled the “force end of rountine” option. I have also checked the box to store correct answer.
What specifically went wrong when you tried that?:
The experiments went fine last year using v2023.2.2. This year, the experiment computer was being updated to v2024.1.5 and problem emerged.
When pressing the keyboard on MacBook Pro, every things seems fine. However, I notice that only a few of the key press event were recorded in the data file (.psydat, .csv) when the response is collected through fMRI response box.
trial | stroop.started | stat.started | ISI.started | stat.stopped | count_image1.started | key_resp_3.started | count_image1.stopped | key_resp_3.stopped | stroop.stopped | key_resp_3.keys | key_resp_3.corr | key_resp_3.rt | key_resp_3.duration |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 90.63956875 | 90.64382063 | 90.64382063 | 90.87791846 | 90.87791846 | 90.87791846 | 92.12619458 | 92.12619458 | 92.11526587 | None | 0 | ||
2 | 92.14391142 | 92.14954275 | 92.14954275 | 92.39820271 | 92.39820271 | 92.39820271 | 93.64301063 | 93.64301063 | 93.63174017 | None | 0 | ||
3 | 94.14379633 | 94.14884679 | 94.14884679 | 94.39804863 | 94.39804863 | 94.39804863 | 95.11680008 | 2 | 1 | 0.716795916 | None | ||
4 | 95.64363979 | 95.64833608 | 95.64833608 | 95.89800188 | 95.89800188 | 95.89800188 | 97.14286783 | 97.14286783 | 97.13112787 | None | 0 | ||
5 | 98.14386583 | 98.14853763 | 98.14853763 | 98.39818488 | 98.39818488 | 98.39818488 | 99.64295496 | 99.64295496 | 99.63190204 | None | 0 |
I checked the .log file and see the logging of the key press.
Here is the log of a trial that the response is not recorded.
time | level | logging |
---|---|---|
90.6395 | EXP | New trial (rep=0, index=0): {‘trial’: 1, ‘con’: ‘Neg_IC’, ‘corr_ans’: 1, ‘count’: ‘image/2.jpg’, ‘isi’: 1.5} |
90.6397 | EXP | window1: recordFrameIntervals = False |
90.6438 | EXP | switch_fix: autoDraw = False |
90.6438 | EXP | stat: autoDraw = True |
90.6674 | EXP | window1: recordFrameIntervals = True |
90.8756 | EXP | count_image1: image = ‘image/2.jpg’ |
90.8779 | EXP | stat: autoDraw = False |
90.8779 | EXP | count_image1: autoDraw = True |
91.8011 | DATA | Keypress: 1 |
92.1262 | EXP | count_image1: autoDraw = False |
92.1262 | EXP | stat: autoDraw = False |
92.1262 | EXP | count_image1: autoDraw = False |
Here is the log of a trial that the response is recorded.
time | level | logging |
---|---|---|
94.1438 | EXP | New trial (rep=0, index=2): {‘trial’: 3, ‘con’: ‘Neg_IC’, ‘corr_ans’: 2, ‘count’: ‘image/33.jpg’, ‘isi’: 1.5} |
94.144 | EXP | window1: recordFrameIntervals = False |
94.1488 | EXP | fixation: autoDraw = False |
94.1488 | EXP | fixation: autoDraw = False |
94.1488 | EXP | stat: autoDraw = True |
94.1756 | EXP | window1: recordFrameIntervals = True |
94.3957 | EXP | count_image1: image = ‘image/33.jpg’ |
94.398 | EXP | stat: autoDraw = False |
94.398 | EXP | count_image1: autoDraw = True |
95.1245 | DATA | Keypress: 2 |
95.1297 | EXP | stat: autoDraw = False |
95.1297 | EXP | count_image1: autoDraw = False |
I also notice the timing of the key press events are not consistency for those trials with response recorded. (e.g. key_resp_3.rt = 0.716795916, but the RT calculated from the log file = 95.1245 - 94.3980 = 0.7265).
Any idea the reason why the event is not logged int the datafile?