I have a set of stimuli which are tileable, where they seamlessly repeat from left/right up/down.
I want to randomly shift the center of a given stimulus. I can do this by loading the image as a matrix, then chop it apart and reassemble it.
For example, I have an image:
im1
Suppose I want to shift it so the upper-left corner (pixel [1,1]) is in the center, like with a fftshift.
I identify the four quadrants of the image as A,B,C,D:
im1 = [A B;C D]
then I can reassemble these as:
im2 = [D C;B A]
This seems dumb though, and I wonder if there’s some capability in psychopy to tile a stimulus and view it through an aperture, without having to load it as a matrix? It seems like varying phase of a grating stimulus works kind of like this: