Update artiq/coredevice/phaser.py

Co-authored-by: Robert Jördens <rj@quartiq.de>
pull/1933/head
Norman Krackow 2022-06-23 09:15:50 +02:00 committed by GitHub
parent c0581178d6
commit 56c59e38f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1148,7 +1148,7 @@ class PhaserChannel:
b1 >= COEFF_MAX or b1 < -COEFF_MAX):
raise ValueError("high gains")
forward_gain = (b0 + b1) * (DATA_MAX - NORM)
forward_gain = (b0 + b1) * (1 << SERVO_DATA_WIDTH - 1 - SERVO_COEFF_SHIFT)
effective_offset = int(round(DATA_MAX * y_offset + forward_gain * x_offset))
self.set_iir_mu(profile, b0, b1, a1, effective_offset)