From 1d3455a351e6e50f649a777c312b1b1fac7a6678 Mon Sep 17 00:00:00 2001 From: jupfi Date: Fri, 26 Apr 2024 17:32:13 +0200 Subject: [PATCH] Adjusted relative amplitude. --- pyproject.toml | 2 +- src/nqrduck_spectrometer_limenqr/controller.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 57831ff..ee3b085 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ authors = [ description = "A submodule for the nqrduck-spectrometer module which implements the functionality for the LimeNQR spectrometer." readme = "README.md" license = { file="LICENSE" } -requires-python = ">=3.8" +requires-python = ">=3.10" classifiers = [ "Programming Language :: Python :: 3", diff --git a/src/nqrduck_spectrometer_limenqr/controller.py b/src/nqrduck_spectrometer_limenqr/controller.py index d3c4b9c..b7b624e 100644 --- a/src/nqrduck_spectrometer_limenqr/controller.py +++ b/src/nqrduck_spectrometer_limenqr/controller.py @@ -2,7 +2,6 @@ import logging import tempfile from pathlib import Path import numpy as np -from decimal import Decimal from limedriver.binding import PyLimeConfig from limedriver.hdf_reader import HDF @@ -407,7 +406,7 @@ class LimeNQRController(BaseSpectrometerController): """ pulse_shape = parameter.get_option_by_name(TXPulse.TX_PULSE_SHAPE).value pulse_amplitude = abs(pulse_shape.get_pulse_amplitude(event.duration)) * \ - parameter.get_option_by_name(TXPulse.RELATIVE_AMPLITUDE).value + (parameter.get_option_by_name(TXPulse.RELATIVE_AMPLITUDE).value / 100) pulse_amplitude = np.clip(pulse_amplitude, -0.99, 0.99) return pulse_shape, pulse_amplitude @@ -453,7 +452,7 @@ class LimeNQRController(BaseSpectrometerController): pdr = [float(pulse_shape.resolution)] * len(pulse_amplitude) pam = list(pulse_amplitude) pof = ([self.module.model.OFFSET_FIRST_PULSE] + - [int(pulse_shape.resolution * Decimal(lime.srate))] * (len(pulse_amplitude) - 1)) + [int(pulse_shape.resolution * lime.srate)] * (len(pulse_amplitude) - 1)) pph = list(modulated_phase) return pfr, pdr, pam, pof, pph