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

module.params should be uniformized #65

Closed
lneuhaus opened this issue Aug 17, 2016 · 2 comments
Closed

module.params should be uniformized #65

lneuhaus opened this issue Aug 17, 2016 · 2 comments
Assignees

Comments

@lneuhaus
Copy link
Owner

lneuhaus commented Aug 17, 2016

  • Each DSP module / scope / fgen should have a property and setter params that recovers a dictionary containing the current state of the module. The setter should do essentially the same thing as setup with that dictionary. When curves are saved, the params should be added to the curve by default.

===> Now, every module has a list parameter_names containing the name of the relevant parameters
a function set_state(dic) ==> That sets the state from the dictionnary
a function get_state() ===> that returns a dictionnary

  • Similarly, the gui modules should also have a uniform syntax for retrieving / setting params dicts.

Using the list property_names, the same functionality is implemented:
a function set_state(dic) ==> That sets the state from the dictionnary
a function get_state() ===> that returns a dictionnary
== For now, module level and gui level are completely independent, and the lists parameter_names (in class Module) and property_names (in class ModuleWidget) have to be maintained independently. I think, it is better to stick with this in order not to introduce coupling between these 2 layers...
== The function save (in the gui) appends this dictionary to the curve parameters

  • This functionality should be used by the gui to improve user comfort.

I am not sure if we want to reload previous settings of all modules at startup (for instance with a 1 s autosave timer) ? This could make the scripts harder to debug since initial conditions would depend on the history... Otherwise, that is easy to do, just let me know.

  • Pyrpl should also make use of this, i.e. to restore the previous scope setting after a measurement.
    For now, spec_an and scope --who share the same hardware resource-- are 2 tabs of a single TabWidget, and whenever the active tab is toggled, the other module is stopped and parameters are restored from a hot backup.
@ManipMembranes ManipMembranes self-assigned this Aug 22, 2016
@lneuhaus
Copy link
Owner Author

lneuhaus commented Sep 9, 2016

Is this finished?

@lneuhaus
Copy link
Owner Author

is implemented in pullrequest #83

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

No branches or pull requests

2 participants