mirror of
https://github.com/nqrduck/quackseq-limenqr.git
synced 2024-11-18 09:31:01 +00:00
RX readout works again.
This commit is contained in:
parent
d1714ed55c
commit
3e9763f317
1 changed files with 10 additions and 7 deletions
|
@ -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,21 +595,24 @@ 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}")
|
||||||
self.log_event_details(event)
|
logger.debug(f"Parameter: {parameter}")
|
||||||
self.log_parameter_details(parameter)
|
if parameter.name == sequence.RX_READOUT and parameter.get_option_by_name(RXReadout.RX).value:
|
||||||
return event
|
self.log_event_details(event)
|
||||||
|
self.log_parameter_details(parameter)
|
||||||
|
return event
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def calculate_previous_events_duration(self, events, rx_event):
|
def calculate_previous_events_duration(self, events, rx_event):
|
||||||
|
|
Loading…
Reference in a new issue