Hi Chris,
I am trying to assign locations to a stimulus inside nested range replicators. For example, in the RSVP example, let’s say I am flashing 5 images in a single trial. I would like to place the 5 images at separate locations. Here is a block of pseudo code to explain my question better. I understand range replicators can’t assign local variables (location_x, location_y) to a rectangle property. Ultimately, I need to calculate the rotation variable based on the x,y location as well. I can’t figure out a workaround and hope you could help me.
Thanks,
Yoon
stimulus_group my_stimuli {
range_replicator (
variable = location_x
from = -area_sampled
to = area_sampled
step = 2
) {
range_replicator (
variable = location_y
from = -area_sampled
to = area_sampled
step = 2
) {
rectangle bar_stimulus (
color = 1,1,1
x_size = 3
y_size = 0.2
x_position = location_x
y_position = location_y
rotation = theta //needs to be calculated based on location
)
}
}
}