mirror of
https://github.com/nqrduck/nqrduck-spectrometer-limenqr.git
synced 2024-11-09 11:10:03 +00:00
Adjusted relative amplitude.
This commit is contained in:
parent
57e968cabd
commit
1d3455a351
2 changed files with 3 additions and 4 deletions
|
@ -15,7 +15,7 @@ authors = [
|
||||||
description = "A submodule for the nqrduck-spectrometer module which implements the functionality for the LimeNQR spectrometer."
|
description = "A submodule for the nqrduck-spectrometer module which implements the functionality for the LimeNQR spectrometer."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = { file="LICENSE" }
|
license = { file="LICENSE" }
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.10"
|
||||||
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
|
|
|
@ -2,7 +2,6 @@ import logging
|
||||||
import tempfile
|
import tempfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from decimal import Decimal
|
|
||||||
|
|
||||||
from limedriver.binding import PyLimeConfig
|
from limedriver.binding import PyLimeConfig
|
||||||
from limedriver.hdf_reader import HDF
|
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_shape = parameter.get_option_by_name(TXPulse.TX_PULSE_SHAPE).value
|
||||||
pulse_amplitude = abs(pulse_shape.get_pulse_amplitude(event.duration)) * \
|
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)
|
pulse_amplitude = np.clip(pulse_amplitude, -0.99, 0.99)
|
||||||
return pulse_shape, pulse_amplitude
|
return pulse_shape, pulse_amplitude
|
||||||
|
|
||||||
|
@ -453,7 +452,7 @@ class LimeNQRController(BaseSpectrometerController):
|
||||||
pdr = [float(pulse_shape.resolution)] * len(pulse_amplitude)
|
pdr = [float(pulse_shape.resolution)] * len(pulse_amplitude)
|
||||||
pam = list(pulse_amplitude)
|
pam = list(pulse_amplitude)
|
||||||
pof = ([self.module.model.OFFSET_FIRST_PULSE] +
|
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)
|
pph = list(modulated_phase)
|
||||||
|
|
||||||
return pfr, pdr, pam, pof, pph
|
return pfr, pdr, pam, pof, pph
|
||||||
|
|
Loading…
Reference in a new issue