Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default values in Qblox modules #725

Closed
PiergiorgioButtarini opened this issue Dec 21, 2023 · 0 comments · Fixed by #686
Closed

Set default values in Qblox modules #725

PiergiorgioButtarini opened this issue Dec 21, 2023 · 0 comments · Fixed by #686

Comments

@PiergiorgioButtarini
Copy link
Contributor

PiergiorgioButtarini commented Dec 21, 2023

It's rather simpler if you just define a dictionary with the map, and then you loop over it

for name, value in defaults.items():
    target.set(name, value)

Originally posted by @alecandido in #713 (comment)

Instead of doing this:

target.set("cont_mode_en_awg_path0", False)  # Default after reboot = False
target.set("cont_mode_en_awg_path1", False)
target.set("cont_mode_waveform_idx_awg_path0", 0)
target.set("cont_mode_waveform_idx_awg_path1", 0)
target.set("marker_ovr_en", True)
target.set("marker_ovr_value", 15)
target.set("mixer_corr_gain_ratio", 1)
target.set("mixer_corr_phase_offset_degree", 0)
...

define a top level dictionary and loop over.
This should be implemented in the PR with the file module.py since many settings are in common to all the Qblox modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant