Error with numpy arrays used as textures should be in the range -1(black):1(white)

I am currently running a NoiseStim that looks like this:

circle_stim = psychopy.visual.NoiseStim(win=win, noiseImage = circle_link, mask= ‘gauss’, size = (250, 250), units=‘pix’, opacity = opa, noiseType =‘Normal’, blendmode=‘add’, color = (1,1, 1), colorSpace = ‘rgb’, noiseElementSize=circle_noise_level, ori= 1)

But I always get this error:

ERROR numpy arrays used as textures should be in the range -1(black):1(white)

Because I am running the noise stimulus a lot, this error is eating up a lot of my time. I was wondering if anyone knows what is happening here?

Thank you.

Could you share the code that you use to generate the noise stimulus?

I think you have to check the values that are present in the array (e.g., by trying max(circle_link) and min(circle_link), as these should not exceed the range -1, 1

So I changed the code a bit from when I posted this, so this is what it looks like now…

con = 0.8
circle_stim = visual.NoiseStim(win=win,  units='pix', 
                                size = (512, 512), noiseType ='Normal', contrast = con,  
                                mask= 'gauss', blendmode='add',  noiseFractalPower=-1, 
                                color = (1,1, 1), colorSpace  = 'rgb', noiseElementSize=2, ori= 1)

The error still remains even when the noise is generated by PsychoPy internally.

Thank you so much