| Reference | Downloads | Github

Problem of visual.RatingScale with hardware.forp.ButtonBox

Dear PsychoPy experts,

I’m using PsychoPy 1.85.2 to develop a fMRI experiment using a Lumina 2+2 button box.

I managed to get event.waitKeys() to capture our MRI button presses (key codes=49, 50, 51, & 52) and trigger signal (key code=53) by ButtonBox.getEvents(returnRaw=True, asKeys=True, allowRepeats=True).

However, visual.RatingScale() just does’t work right especially during scanning. Here are my codes and symptoms:



while r.noResponse:
r.draw(); w.flip();



(1) When the scanner is turned off, everything works as expected except that the acceptKey=‘3’ doesn’t not lead to acceptance.

(2) When the scanner is turned on, RatingScale will regularly see a trigger signal (i.e., ‘5’) but ignore it because this key is not set as one of the response keys. However, RatingScale seems to receive acceptKeys and moves to the next command even if a user does not press acceptKeys.

I’ve checked the source codes of & but can’t figure out what’s wrong here. I’m not sure if it’s a hardware problem because event.waitKeys() seems to capture keys 49-53 correctly, at least when the scanner is turned off.

I’d appreciate it if you could share some insights about what might be going on in my case.