Colour of stimulus change between trials spontaneously

Hi -

I have my stimuli defined using visual.Circle (color: blue) and visual.Pie (color: yellow). However, the colors of these stimuli switch by itself between trials.
This is how it supposes to look like:


This is what happens about the stimuli spontaneously switch color:

There is nothing in my code that tells the computer to do that"

circle_big = visual.Circle(myWin, radius=150, pos=(0, 0), units="pix", fillColor="blue", lineColor="blue", interpolate=True, opacity = 1, autoDraw=False)
bucket = visual.Pie(myWin, radius=150, start=0, end=5, edges=32, units='pix',  lineColor="gold",  fillColor="gold", opacity = 1 , pos=(0, 0), autoDraw = False)
circle_small = visual.Circle(myWin, radius=150-40, pos=(0, 0), units="pix", fillColor="grey", lineColor="grey", opacity = 1, interpolate=True, autoDraw=False)

Does anyone knows how to make it stop?

How do you control where bucket appears on the big circle? Do you change the start and end, or just the start? I ask because this is the kind of thing I would expect if the “start” and “end” got reversed in such a way that the gold part is still the “bucket”, it’s just covering the inverse part of the circle than what you think it should cover.

Hey Jonathan,

Thanks for your reply! Yes - I change both the start and end angles. The problem i think is that start to end is not going in the counterclockwise direction as mentioned in the doc. For instance, I plotted the start angle as 0 and going to the end angle of 345, and reversed the start and end. But the pies look the same:

start = 0, end = 345

start = 245, end = 0

Do you have any idea how to force the arc only goes in one direction?

Many thanks in advance!

Sophie

Not exactly, but I have another solution. One thing you could try is always starting from 0 and changing the “orientation” property using the .ori property or .setOri() function. In other words your ‘bucket’ is always running from something like 0 to 35 degrees, but then you rotate the whole circle it’s part of by 90 or 180 degrees and it will appear in the correct place.

I think the main issue is that “start” and “end” aren’t really what they say they are. They’re just two points on the arc, and if you have something on one side of 0 and another thing on the other side of 0 it’s always going to go from the bigger one to the smaller one in the counterclockwise direction, but never cross 0. For that reason, if you want the bucket to straddle 0, you need to rotate the whole circle.