mirror of
https://github.com/nqrduck/nqrduck-pulseprogrammer.git
synced 2024-11-09 11:20:01 +00:00
Implemented pulse shaping for lime.
This commit is contained in:
parent
29d7fa9a20
commit
ff0f51d504
3 changed files with 4 additions and 4 deletions
|
@ -41,7 +41,7 @@ class PulseProgrammerController(ModuleController):
|
||||||
|
|
||||||
def save_pulse_sequence(self, path):
|
def save_pulse_sequence(self, path):
|
||||||
logger.debug("Saving pulse sequence to %s", path)
|
logger.debug("Saving pulse sequence to %s", path)
|
||||||
sequence = self.module.model.pulse_sequence.dump_sequence_data()
|
sequence = self.module.model.pulse_sequence.to_json()
|
||||||
with open(path, "w") as file:
|
with open(path, "w") as file:
|
||||||
file.write(json.dumps(sequence))
|
file.write(json.dumps(sequence))
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class PulseProgrammerModel(ModuleModel):
|
||||||
self.pulse_sequence.events[-1].parameters[name] = pulse_parameter_class(name)
|
self.pulse_sequence.events[-1].parameters[name] = pulse_parameter_class(name)
|
||||||
logger.debug("Created pulse parameter %s with object id %s", name, id(self.pulse_sequence.events[-1].parameters[name]))
|
logger.debug("Created pulse parameter %s with object id %s", name, id(self.pulse_sequence.events[-1].parameters[name]))
|
||||||
|
|
||||||
logger.debug(self.pulse_sequence.dump_sequence_data())
|
logger.debug(self.pulse_sequence.to_json())
|
||||||
self.events_changed.emit()
|
self.events_changed.emit()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -301,7 +301,7 @@ class OptionsDialog(QDialog):
|
||||||
self.return_functions = OrderedDict()
|
self.return_functions = OrderedDict()
|
||||||
|
|
||||||
# If the options are a list , we will create a QComboBox
|
# If the options are a list , we will create a QComboBox
|
||||||
for key, option in options.items():
|
for option in options:
|
||||||
if option == list:
|
if option == list:
|
||||||
pass
|
pass
|
||||||
# If the options are boolean, we will create a QCheckBox
|
# If the options are boolean, we will create a QCheckBox
|
||||||
|
@ -318,7 +318,7 @@ class OptionsDialog(QDialog):
|
||||||
# If the options are a float/int we will create a QSpinBox
|
# If the options are a float/int we will create a QSpinBox
|
||||||
elif isinstance(option, NumericOption):
|
elif isinstance(option, NumericOption):
|
||||||
numeric_layout = QHBoxLayout()
|
numeric_layout = QHBoxLayout()
|
||||||
numeric_label = QLabel(key)
|
numeric_label = QLabel(option.name)
|
||||||
numeric_lineedit = QLineEdit(str(option.value))
|
numeric_lineedit = QLineEdit(str(option.value))
|
||||||
numeric_layout.addWidget(numeric_label)
|
numeric_layout.addWidget(numeric_label)
|
||||||
numeric_layout.addWidget(numeric_lineedit)
|
numeric_layout.addWidget(numeric_lineedit)
|
||||||
|
|
Loading…
Reference in a new issue