From 7ef4838d478ddc597b9f40f4b56e3e61450f092f Mon Sep 17 00:00:00 2001 From: stedif <stefano.difrischia@inaf.it> Date: Wed, 6 Apr 2022 15:34:00 +0200 Subject: [PATCH] L2SS-643: fix Euler formula --- .../tangostationcontrol/devices/sdp/beamlet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/beamlet.py b/tangostationcontrol/tangostationcontrol/devices/sdp/beamlet.py index 717d2d9bb..ae61d77bd 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/beamlet.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/beamlet.py @@ -149,8 +149,8 @@ class Beamlet(opcua_device): # Convert array values in complex numbers unit = numpy.power(2,14) - real = numpy.array(unit * numpy.sin(phases), dtype=numpy.short) - imag = numpy.array(unit * numpy.cos(phases), dtype=numpy.short) + real = numpy.array(unit * numpy.cos(phases), dtype=numpy.short) + imag = numpy.array(unit * numpy.sin(phases), dtype=numpy.short) # join 16 bits of imaginary part (MSB) with 16 bits of real part (LSB) bf_weights = numpy.array( numpy.frombuffer( b''.join([imag,real]), dtype=numpy.uint32 ) ) -- GitLab