Open romainbrette opened 7 years ago
As a starting point, each relevant object could have save_configuration and load_configuration methods, which would simply provide and load from a dictionary.
Proposition above is implemented. Now we should move this to an actual text config file.
One issue: the program is also saving images (of pipette).
Currently we use pickle on config_manipulator.cfg
in the home folder.
This should be moved to yaml, and we should make a special folder, so that we can also save images.
The problem is the dictionary actually stores the images. So instead the images should be moved to a folder, so there's some reorganization to do.
Each relevant object (stage, units, microscope) has a save_configuration
method. Then saving to file is done in the interface, but there is no general system.
load_configuration
is called at initialization, through the connect
method.
The file name can be passed to the interface.
We need to be able to save/load configuration. This includes hardware configuration and calibration.
A simple organization would be that each configurable object (calibratedunit etc) should have a save/load method which would output a dictionary of variables, that a global method would then insert in a configuration file.
Perhaps the config file could take the form of Python code? (the initialization script)