RX readout works again.

This commit is contained in:
jupfi 2024-06-17 10:06:22 +02:00
parent d1714ed55c
commit 3e9763f317

View file

@ -577,7 +577,7 @@ class LimeNQRController(SpectrometerController):
events = sequence.events events = sequence.events
rx_event = self.find_rx_event(events) rx_event = self.find_rx_event(sequence, events)
logger.debug("Found RX event: %s", rx_event) logger.debug("Found RX event: %s", rx_event)
if not rx_event: if not rx_event:
return None, None return None, None
@ -595,18 +595,21 @@ class LimeNQRController(SpectrometerController):
rx_stop = rx_begin + rx_duration rx_stop = rx_begin + rx_duration
return rx_begin * 1e6, rx_stop * 1e6 return rx_begin * 1e6, rx_stop * 1e6
def find_rx_event(self, events): def find_rx_event(self, sequence, events):
"""This method finds the RX event in the pulse sequence. """This method finds the RX event in the pulse sequence.
Args: Args:
sequence (QuackSequence): The pulse sequence to run
events (list): The pulse sequence events events (list): The pulse sequence events
Returns: Returns:
Event: The RX event Event: The RX event
""" """
for event in events: for event in events:
parameter = event.parameters.get(RXReadout.RX) for parameter in event.parameters.values():
if parameter and parameter.get_option_by_name(RXReadout.RX).value: logger.debug(f"Event: {event.name}")
logger.debug(f"Parameter: {parameter}")
if parameter.name == sequence.RX_READOUT and parameter.get_option_by_name(RXReadout.RX).value:
self.log_event_details(event) self.log_event_details(event)
self.log_parameter_details(parameter) self.log_parameter_details(parameter)
return event return event