-
Notifications
You must be signed in to change notification settings - Fork 19
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
Parameter saving/loading from params.ini for AFMulator and the GUI #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. I think this is very useful functionality, and I always learn form you how to organize python code nicely. I cannot judge if there are any bugs from looking at the code, but you wrote the test which pass so it is fine I guess. I approve it. Just please explain me how it works with those locks.
self.slPreset.blockSignals(True)
self.slPreset.setCurrentIndex(-1)
self.slPreset.blockSignals(False)
Fixes #80
Adds methods for constructing or loading an AFMulator instance from a params.ini file and saving the current settings to a params.ini file. Also adds the corresponding bindings to the GUI script and buttons to the GUI for accessing this feature.
This should help in bridging the gap between the usage of the CPU scripts and the OpenCL API/GUI.
This required adding the entries
FFgrid{0,A,B,C}
to the parameter dict to denote the force field grid origin and lattice vectors, because the AFMulator handles the force field lattice separate from the sample lattice vectors. I hope that this does not cause any confusion since these are not used by the CPU scripts.