mirror of
https://github.com/nqrduck/nqrduck-spectrometer.git
synced 2025-01-03 06:08:06 +00:00
Implemented change of duration length.
This commit is contained in:
parent
c3248aec0d
commit
8a1fdb99db
1 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
||||||
|
import logging
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
class PulseSequence:
|
class PulseSequence:
|
||||||
"""A pulse sequence is a collection of events that are executed in a certain order."""
|
"""A pulse sequence is a collection of events that are executed in a certain order."""
|
||||||
def __init__(self, name) -> None:
|
def __init__(self, name) -> None:
|
||||||
|
@ -20,6 +23,10 @@ class PulseSequence:
|
||||||
def add_parameter(self, parameter) -> None:
|
def add_parameter(self, parameter) -> None:
|
||||||
self.parameters.append(parameter)
|
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):
|
def dump_sequence_data(self):
|
||||||
"""Returns a dict with all the data in the pulse sequence"""
|
"""Returns a dict with all the data in the pulse sequence"""
|
||||||
data = {
|
data = {
|
||||||
|
|
Loading…
Reference in a new issue