mirror of
https://github.com/nqrduck/nqrduck-spectrometer.git
synced 2024-12-22 00:10:26 +00:00
Added error handling for missing version in pulse sequence .
This is the case for older pulse sequences.
This commit is contained in:
parent
17d5e79a70
commit
423fb3d9a0
1 changed files with 6 additions and 1 deletions
|
@ -163,7 +163,12 @@ class PulseSequence:
|
|||
Raises:
|
||||
KeyError: If the pulse parameter options are not the same as the ones in the pulse sequence
|
||||
"""
|
||||
try:
|
||||
obj = cls(sequence["name"], version = sequence["version"])
|
||||
except KeyError:
|
||||
logger.error("Pulse sequence version not found")
|
||||
raise KeyError("Pulse sequence version not found")
|
||||
|
||||
for event_data in sequence["events"]:
|
||||
obj.events.append(cls.Event.load_event(event_data, pulse_parameter_options))
|
||||
|
||||
|
|
Loading…
Reference in a new issue