Hi all,
I'm trying to feed random angles to the DrawGratings
Bonvision node, so that every presentation occurs in a different
direction (in multiples of 45 degs). To achieve this, I create a ParameterRange from -224to +224, use a PythonTransform to convert the continuous range to steps of 45 degrees (-180 to +180), and then use the Permutation node to shuffle this range. Then, I feed this into the Observable DirectionalGrating, where the angle is fed to Stim1 and finally goes into DrawGratings.
However,
I am seeing unexpected behavior... The angle the is displayed is not
the correct one, and in fact, if I stop the workflow, I can see that the
angles presented are in the order of thousands. For example, when the
random angle is 45 degs, the Angle property of DrawGratings takes the value -7734.93; when it's 180, the Angle property is 10313.24, etc.
I have tried using the Angle Bonvision node, as well as experimenting with data types in my PythonTransform and downstream, but nothing seems to fix the behavior.
Any idea why this is happening?