Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Pseudorandomization/no more than 3 times same orientation per display

Hi all,

By using Open Sesame I have come a long way in creating an experiment, but now I'm stuck at a more difficult part.

For my experiment I have created a display with a central fixation dot, and around it 8 rectangles each with a random choice between certain orientations, as seen below. After this display, the subject will see the same display, but a 'target' rectangle in 50% changes its orientation by 90 degrees.
So far I have been able to implement these elements in my experiment, but the point where I am stuck is this: As I don't want to make it too easy for the subject to tell whether the target rectangle has changed its orientation, I want to prevent more than three rectangles having the same orientation per display. For example, this would be possible if 3 of the distractor rectangles had an orientation of 90 degrees, and the target rectangle switched from 0 to 90 degrees at the second display.

I am not sure how to implement this in Open Sesame. Also I am not very familiar with pseudorandomization, if this is the way of achieving my goal.
Any help or guidance would be greatly appreciated!

Barend

orientations_list = [0, 45, 90, 135, 0, 45, 90, 135, 0, 45, 90, 135,]
random.shuffle(orientations_list)

target_rectangle = visual.Rect(win, width=30, height=90, pos=(xy_list[0]), fillColor=color_list[0], ori=orientations_list[0])
target_rectangle.draw()

distractor_rectangle1 = visual.Rect(win, width=30, height=90, pos=(xy_list[1]), fillColor=color_list[1], ori=orientations_list[1])
distractor_rectangle1.draw()
distractor_rectangle2 = visual.Rect(win, width=30, height=90, pos=(xy_list[2]), fillColor=color_list[2], ori=orientations_list[2])
distractor_rectangle2.draw()
distractor_rectangle3 = visual.Rect(win, width=30, height=90, pos=(xy_list[3]), fillColor=color_list[3], ori=orientations_list[3])
distractor_rectangle3.draw()
distractor_rectangle4 = visual.Rect(win, width=30, height=90, pos=(xy_list[4]), fillColor=color_list[4], ori=orientations_list[4])
distractor_rectangle4.draw()
distractor_rectangle5 = visual.Rect(win, width=30, height=90, pos=(xy_list[5]), fillColor=color_list[5], ori=orientations_list[5])
distractor_rectangle5.draw()
distractor_rectangle6 = visual.Rect(win, width=30, height=90, pos=(xy_list[6]), fillColor=color_list[6], ori=orientations_list[6])
distractor_rectangle6.draw()
distractor_rectangle7 = visual.Rect(win, width=30, height=90, pos=(xy_list[7]), fillColor=color_list[7], ori=orientations_list[7])
distractor_rectangle7.draw()

Comments

  • Hi Barend,

    Looking at your code, you actually seem to have figured this out already. In what sense doesn't your solution work as you'd like it to?

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.