[open] changing the pre-define pairs of pictures to be randomly selected from pool
Hi,
Previously, I defined two variables for my form and I manually paired the pictures in the loop (variables gaze_cue and gaze). Thus, when I run the program it selects each pair from the ones that I had defined in my loop.
and these were my codes:
def my_function():
print 'if self.get('gaze_cue_pos') == 'left':
exp.set('left_img', self.get('gaze_cue'))
exp.set('right_img', self.get('gaze'))
else:
exp.set('right_img', self.get('gaze_cue'))
exp.set('left_img', self.get('gaze'))
'
def my_function():
print 'set rows "2;1;1"
set cols "1;1;1;1;1"
widget 0 0 2 1 image_button path="[left_img].jpg" var="mmmresponse1"
widget 3 0 2 1 image_button path="[right_img].jpg" var="mmmresponse2"
widget 2 2 1 1 image_button path="transparentsmall.png"'
However I want to change the design in the way that I will explain but I was not successful with that !:
I would like the program itself chooses the pairs randomly from the pool. I mean in each trial I need 60 pairs that should be selected randomly from the pool pics. How I can change the code to reach to this goal?
moreover, I also should mention that I have six different categories (h.fo; un.fo ; h.de; un.de; h.ap; un.ap) which should be selected as pairs. Each of these categories are consisting of different pictures. For instance h.fo consists of 6 different pictures (h.fo.1; h.fo.2; h.fo.3; h.fo.4; h.fo.5; h.fo.6) and un.fo consists of 6 different pictures (un.fo.1; un.fo.2; un.fo.3; un.fo.4; un.fo.5; un.fo.6).This is also same for the other categories. I want the pairs of pictures be selected from the pictures of these categories (even from same categories such as h.fo and h.fo together). How I should manage that all pairs that I like have been selected? For instance, h.fo with un.fo and h.de with un.de and so on.
My second question: I have two loops and subsequently, two different form_base. I want the pairs of the first loop (and its related form_base) be different from the second one. How I should control this?
I really appreciate if you answer these questions since my design should be ready as soon as possible and I cannot find how I should change these things. Thank you in advance.
Regards,
Pa
Comments
Closed as duplicate of comment #3716.
Check out SigmundAI.eu for our OpenSesame AI assistant!