Save stimulus generated by loop as image

Ah, I just replied to your other post
Colour Wheel implementation
saying that you should render as an image rather than as lines, then saw this

The answer is that you should render as an image (a texture) in the first place. Two options:

  1. create a texture that contains a circle and pass that to GratingStim
  2. create a linear/cartesian texture to specify your colours and pass that to RadialStim (its job is basically to render a cartesian texture into a circular form).

I think the second one is easier for you. The array you ultimately pass must be RGB (not HSV) but psychopy can help convert it as well:
http://www.psychopy.org/api/tools/colorspacetools.html#psychopy.tools.colorspacetools.hsv2rgb

Have a look at the demos in Coder on rotatingFlashingWedge (to see radial stim in action) and also the one on customTextures to see passing of a numpy array directly to a stimulus.

I can help more tomorrow, but I have a feeling you’ll enjoy working it out yourself and I don’t want to spoil the fun! :wink:

1 Like