You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
===> 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
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
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.
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.
The text was updated successfully, but these errors were encountered: