Group: Forum Members
Posts: 118,
Visits: 396
|
Hello all,
I was working on a task in which participants must select a stimulus by pressing a key when it is highlighted by an on-screen frame and I noticed some odd behavior that I cannot seem to get rid of. The original code is a little complicated and annoying for other users to read, but I isolated the problem to some test code.
If I run the attached code on my workstation, the expected behavior is that the "Tester" trial repeats 100 times, showing a green frame that flickers from side to side of the screen. I should be able to press Space at any time during the trial to jump to the next one (which, of course, consists of more flickering). This seems to work as long as I don't respond, but if I do respond, some portions of the frame seem to "stick" in place in the subsequent trial instead of being covered up as they should be by the blocker stimulus.
Using the trial Tester2, I have reached the conclusion that this only happens when the response occurs before the final stimulus is presented. If I use Tester2 and wait until the frame stops moving to respond, there are no such graphical errors. I can't be quite sure of this though, as I haven't had time to test it extensively.
I tried some things to get rid of the problem, but nothing worked. For completeness, the following did NOT help: - adding a pretrialpause - adding a posttrialpause
I also checked a data file including a lot of stimulustime items and nothing seems odd there - all the trials produce identical stimulustimes rows.
I also tried a workaround in which I make each flicker a new trial and use /branch to repeat the trial until a response is logged or the timeout hits, but that led to a lot of responses not being logged (presumably if the space bar is hit during trial cleanup or preparation, which happens often when you have trials cycling with a duration of 50-75ms). I haven't yet tried that workaround while adding /beginresponsetime = -1, nor have I yet looked into using stimulusframes rather than stimulustimes, but I would of course prefer not to have to adjust these points if I don't have to.
Does anyone have any idea what might be going on here?
Example code: <values> / BorderLeftPosition = 12.5 / BorderRightPosition = 27.5 / BorderTopPosition = 20 / BorderBottomPosition = 20 </values>
<shape BorderLeftA> / shape = rectangle / color = green / size = (.5%,15%) / position = (values.BorderLeftPosition,30) </shape>
<shape BorderRightA> / shape = rectangle / color = green / size = (.5%,15%) / position = (values.BorderRightPosition,30) </shape>
<shape BorderTopA> / shape = rectangle / color = green / size = (15%,.5%) / position = (values.BorderTopPosition,15) </shape>
<shape BorderBottomA> / shape = rectangle / color = green / size = (15%,.5%) / position = (values.BorderBottomPosition,45) </shape>
<shape BorderLeftB> / shape = rectangle / color = green / size = (.5%,15%) / position = (100-values.BorderLeftPosition,30) </shape>
<shape BorderRightB> / shape = rectangle / color = green / size = (.5%,15%) / position = (100-values.BorderRightPosition,30) </shape>
<shape BorderTopB> / shape = rectangle / color = green / size = (15%,.5%) / position = (100-values.BorderTopPosition,15) </shape>
<shape BorderBottomB> / shape = rectangle / color = green / size = (15%,.5%) / position = (100-values.BorderBottomPosition,45) </shape>
<shape BorderLeftABlocker> / shape = rectangle / color = white / size = (.5%,15%) / position = (values.BorderLeftPosition,30) </shape>
<shape BorderRightABlocker> / shape = rectangle / color = white / size = (.5%,15%) / position = (values.BorderRightPosition,30) </shape>
<shape BorderTopABlocker> / shape = rectangle / color = white / size = (15%,.5%) / position = (values.BorderTopPosition,15) </shape>
<shape BorderBottomABlocker> / shape = rectangle / color = white / size = (15%,.5%) / position = (values.BorderBottomPosition,45) </shape>
<shape BorderLeftBBlocker> / shape = rectangle / color = white / size = (.5%,15%) / position = (100-values.BorderLeftPosition,30) </shape>
<shape BorderRightBBlocker> / shape = rectangle / color = white / size = (.5%,15%) / position = (100-values.BorderRightPosition,30) </shape>
<shape BorderTopBBlocker> / shape = rectangle / color = white / size = (15%,.5%) / position = (100-values.BorderTopPosition,15) </shape>
<shape BorderBottomBBlocker> / shape = rectangle / color = white / size = (15%,.5%) / position = (100-values.BorderBottomPosition,45) </shape>
<block Tester> / trials = [1-100 = Tester] </block>
<trial Tester> / timeout = 2000 / validresponse = (" ") / stimulustimes = [0 = BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 75 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 150 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 225 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 300 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 375 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 450 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 525 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 600 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 675 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 750 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 825 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 900 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 975 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 1050 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 1125 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 1200 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 1275 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 1350 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 1425 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 1500 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 1575 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 1650 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 1725 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 1800 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 1875 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 1950 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA] / beginresponsetime = -1 </trial>
<trial Tester2> / timeout = 3000 / validresponse = (" ") / stimulustimes = [0 = BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 400 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 800 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA; 1200 = BorderLeftABlocker, BorderBottomABlocker, BorderRightABlocker, BorderTopABlocker, BorderLeftB, BorderBottomB, BorderRightB, BorderTopB; 1600 = BorderLeftBBlocker, BorderBottomBBlocker, BorderRightBBlocker, BorderTopBBlocker, BorderLeftA, BorderBottomA, BorderRightA, BorderTopA] / beginresponsetime = -1 </trial>
|