diff --git a/src/nqrduck_spectrometer/pulse_sequence.py b/src/nqrduck_spectrometer/pulse_sequence.py index 187fa9c..ed47a44 100644 --- a/src/nqrduck_spectrometer/pulse_sequence.py +++ b/src/nqrduck_spectrometer/pulse_sequence.py @@ -1,5 +1,8 @@ +import logging from collections import OrderedDict +logger = logging.getLogger(__name__) + class PulseSequence: """A pulse sequence is a collection of events that are executed in a certain order.""" def __init__(self, name) -> None: @@ -20,6 +23,10 @@ class PulseSequence: def add_parameter(self, parameter) -> None: self.parameters.append(parameter) + def on_duration_changed(self, duration: float) -> None: + logger.debug("Duration of event %s changed to %s", self.name, duration) + self.duration = duration + def dump_sequence_data(self): """Returns a dict with all the data in the pulse sequence""" data = {