I’m working on a task where a bar sweeps across flickering images in 8 different directions. So that all the sweep directions are equal, the flickering images are masked to a circle shape.
My initial approach was do define a GratingStim with a circular mask and the images as the texture and then a rectangular aperture to sweep over this GratingStim. This works well in general, except that since I am defining the bar as an aperture, I can’t add a fixation cross that is always visible in the center of the screen or a square in the corner of the screen for a photodiode.
I tried to fix this by also defining the bar as a GratingStim, but this approach doesn’t work because the texture moves with the position of the bar and I want the background images to remain in the same position while the bar sweeps over them.
I thought another fix might be to display the flickering background and then overlay two GratingStim masks – a bar and then a circle on top, but this isn’t working for me either.
Any ideas on how to best approach this? Thank you!
Thanks for the response. I am actually only enabling these components when I need them. The problem is that during a trial I need at least 4 components on at a given time:
A circle mask that shows rapidly flickering images within the circle and outside of that circle is grey. Currently using grating stim for this ( mask = raisedCos, tex = my images)
Some type of component that masks out everything other than a transparent bar shape. That way the effect is that you see a bar with flickering images in the background and as the bar moves it appears to sweep over these. Have tried to use aperture and grating stim here with no luck. The problem with aperture is that is needs to be enabled at the same time that I am showing 3 & 4 below which isn’t possible. The problem with grating stim is that if I put the images directly in the texture of the bar the images move with the bar rather than the bar sliding over.
a fixation cross
a square in the corner of the screen for the photodiode
What other ways are there to create masks that aren’t using grating stim or aperture? Is it possible to create something with grating stim that is closer to what can be created with aperture (grey background, completely transparent bar)?
I’m still not clear on why the aperture can’t be enabled at the same time you’re showing 3 & 4 - surely you should be able to do:
for stim in stimuliToBeApertured:
for stim in allOtherStim: