0

visual.ElementArrayStim(win, units=None, fieldPos=(0.0, 0.0), fieldSize=(3000.0, 1000.0), fieldShape='sqr', nElements=100, sizes=5.0, xys=None, rgbs=None, colors=(1.0, 1.0, 1.0), colorSpace='rgb', opacities=1.0, depths=0, fieldDepth=0, oris=0, sfs=1.0, contrs=1, phases=0, elementTex='none', elementMask='circle', texRes=48, interpolate=True, name=None, autoLog=None, maskParams=None)

I tried to google a guide for ElementArrayStim but the one provided by the psychopy website did not elaborate on the functions available for this. May I ask what the bolded xys and sfs in this command refers to?

Also, how do you wrap a stimulus presentation window? For instance, in my case, a cluster of random dots derived from ElementArrayStim spreaded across the stimulus window with the cluster centred on (0,0) moving at x=5. Eventually, each of these dots will hit the window's right boundary. How do I make these dots reappear on the left window boundary in a smooth transition?

Ang Jit Wei Aaron
  • 389
  • 1
  • 3
  • 19
  • Have provided an answer to the first query. But the "Also how do you..." bit needs to be removed and put in its own separate question. – Michael MacAskill Dec 04 '15 at 04:03
  • The second part of the question has been asked and answered here: http://stackoverflow.com/questions/34082748/how-to-create-a-continuous-visual-window-background-wrapping-of-background/34122312#34122312 – Jonas Lindeløv Dec 06 '15 at 20:27

1 Answers1

0

Below are comments from the source code. Not sure why they aren’t appearing in the online documentation:

xys: The xy positions of the elements centres, relative to the field centre. Values should be:

  • None
  • an array/list of Nx2 coordinates.

If value is None then the xy positions will be generated automatically, based on the fieldSize and fieldPos. In this case opacity will also be overridden by this function (it is used to make elements outside the field invisible).

sfs: The spatial frequency for each element. Should either be:

  • a single value
  • an Nx1 array/list
  • an Nx2 array/list (spatial frequency of the element in X and Y).

If the units for the stimulus are 'pix' or 'norm' then the units of sf are cycles per stimulus width. For units of 'deg' or 'cm' the units are c/cm or c/deg respectively.

Michael MacAskill
  • 2,411
  • 1
  • 16
  • 28
  • Thanks Michael. If for instance, I set nElements = 50, is it possible to obtain a name for each of these Elements so I can manually adjust their (x,y) coordinates? Or does ElementArrayStim have a limited capability in allowing for manipulation of its individual elements? – Ang Jit Wei Aaron Dec 04 '15 at 06:58