chainzuloo.blogg.se

Cursorcerer not working
Cursorcerer not working










  1. #Cursorcerer not working full#
  2. #Cursorcerer not working code#

It isn’t safe to compare floating point numbers for equality, as they can’t be precisely represented by a digital computer. Lastly, this sort of comparison is only safe if you can guarantee that the coordinates will always be integers. Hence, in this case, you are interested if all of the elements in the result are True. That is, results are computed for each element in the array rather than getting a global value. So the result of a statement like pos = ( 1, 2) will itself be an array of values (e.g. Operations on numpy arrays are vectorised. When you call a function like myMouse.getPos(), the object returned is a numpy array rather than a standard Python list or tuple. In answer to your query, the “The truth value of an array with more than one element is ambiguous.” error comes from the numpy library. You can edit existing posts, you don’t need to create a new one.Currently, everything above is indented to the same level.

#Cursorcerer not working code#

The most important reason to use formatted code blocks on this forum is that in Python, whitespace has meaning: to easily read the logic of your code, we need to see the indenting.Message = visual.TextStim(win=mywin, text="Missed it!", alignHoriz="center", alignVert="center", bold=True) Message = visual.TextStim(win=mywin, text="Well done!", alignHoriz="center", alignVert="center", bold=True) MovingC = visual.Circle(win=mywin, radius=1.8, edges=32, fillColor="white", lineColor="white", pos=(0,7)) TargetC = visual.Circle(win=mywin, radius=2.2, edges=32, fillColor="green", lineColor="green", pos=(0,-7))ĬursorC = visual.Circle(win=mywin, radius=1.4, edges=32, fillColor="red", lineColor="red", pos=(0,7)) MyMouse = event.Mouse() # will use win by default Trials = data.TrialHandler(trialList=, nReps=50) Is it possible to define an interval of positions with this type of command “.pos”?

cursorcerer not working

Requiring the cursorC.pos to be exactly in the position (0,-7) is probably too stringent. I am struggling to use a.all() to sort this out. The truth value of an array with more than one element is ambiguous.

#Cursorcerer not working full#

When using the following code (see full code below) to define the final position of the moving circle (movingC), I am getting the following error message:Įrror message: while movingC.pos=(0,-7): 2 seconds), I want to send a trigger to an EEG record (let’s leave the issue of the trigger for now - in the code below I am only giving a verbal feedback instead - e.g. If they manage to reach the target circle “without much delay” (e.g. I am programming a very simple “tracking” experiment were participants are instructed to follow a moving circle (movingC) with a cursor circle (cursorC - moved with a joystick/foot pedal) down to a “target” circle (targetC) (Hopefully) here it goes now correctly with backticks. Sorry, as Michael commented my code was not correctly displayed.












Cursorcerer not working