Added selection of TX/RX Matching.

This commit is contained in:
jupfi 2024-02-12 21:46:18 +01:00
parent 346c4297bf
commit c61a655ddc
2 changed files with 12 additions and 1 deletions

View file

@ -117,7 +117,10 @@ class LimeNQRController(BaseSpectrometerController):
""" """
rx_begin, rx_stop = self.translate_rx_event(lime) rx_begin, rx_stop = self.translate_rx_event(lime)
if rx_begin is None or rx_stop is None: if rx_begin is None or rx_stop is None:
return None # Instead print the whole acquisition range
rx_begin = 0
rx_stop = lime.rectime_secs * 1e6
logger.debug("RX event begins at: %sµs and ends at: %sµs", rx_begin, rx_stop) logger.debug("RX event begins at: %sµs and ends at: %sµs", rx_begin, rx_stop)
return self.calculate_measurement_data(lime, rx_begin, rx_stop) return self.calculate_measurement_data(lime, rx_begin, rx_stop)
@ -239,6 +242,10 @@ class LimeNQRController(BaseSpectrometerController):
lime.srate = setting.get_setting() lime.srate = setting.get_setting()
elif setting.name == self.module.model.CHANNEL: elif setting.name == self.module.model.CHANNEL:
lime.channel = setting.get_setting() lime.channel = setting.get_setting()
elif setting.name == self.module.model.TX_MATCHING:
lime.TX_matching = setting.get_setting()
elif setting.name == self.module.model.RX_MATCHING:
lime.RX_matching = setting.get_setting()
# Careful this doesn't only set the IF frequency but the local oscillator frequency # Careful this doesn't only set the IF frequency but the local oscillator frequency
elif setting.name == self.module.model.IF_FREQUENCY: elif setting.name == self.module.model.IF_FREQUENCY:
lime.frq = self.module.model.target_frequency - setting.get_setting() lime.frq = self.module.model.target_frequency - setting.get_setting()

View file

@ -8,6 +8,8 @@ logger = logging.getLogger(__name__)
class LimeNQRModel(BaseSpectrometerModel): class LimeNQRModel(BaseSpectrometerModel):
# Setting constants for the names of the spectrometer settings # Setting constants for the names of the spectrometer settings
CHANNEL = "TX/RX Channel" CHANNEL = "TX/RX Channel"
TX_MATCHING = "TX Matching"
RX_MATCHING = "RX Matching"
SAMPLING_FREQUENCY = "Sampling Frequency" SAMPLING_FREQUENCY = "Sampling Frequency"
IF_FREQUENCY = "IF Frequency" IF_FREQUENCY = "IF Frequency"
ACQUISITION_TIME = "Acquisition time" ACQUISITION_TIME = "Acquisition time"
@ -51,6 +53,8 @@ class LimeNQRModel(BaseSpectrometerModel):
super().__init__(module) super().__init__(module)
# Acquisition settings # Acquisition settings
self.add_setting(self.CHANNEL, 0, "TX/RX Channel", self.ACQUISITION) self.add_setting(self.CHANNEL, 0, "TX/RX Channel", self.ACQUISITION)
self.add_setting(self.TX_MATCHING, 0, "TX Matching", self.ACQUISITION)
self.add_setting(self.RX_MATCHING, 0, "RX Matching", self.ACQUISITION)
self.add_setting(self.SAMPLING_FREQUENCY, 30.72e6 , "Sampling frequency", self.ACQUISITION) self.add_setting(self.SAMPLING_FREQUENCY, 30.72e6 , "Sampling frequency", self.ACQUISITION)
self.add_setting(self.IF_FREQUENCY, 5e6, "IF Frequency", self.ACQUISITION) self.add_setting(self.IF_FREQUENCY, 5e6, "IF Frequency", self.ACQUISITION)
self.if_frequency = 1.2e6 self.if_frequency = 1.2e6