Error running study: Pol2cart function not defined

Description of the problem:
I can run the experiment on Psychopy successfully, but when I try to run it online it gives me this error " pol2cart is not defined". At the beginning of the experiment I put:
def pol2cart(rho, phi):
x = rho * np.cos(phi)
y = rho * np.sin(phi)
return(x, y)

and then assigned rho and phi values (the experiment is a time-to-contact task, with a dot moving on two diagonals).
How can I solve the problem on Pavlovia?

Hi,

I’m afraid that you can’t use numpy online. Please take a look at my crib sheet.

Best wishes,

Wakefield

1 Like