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

Parameter saving/loading from params.ini for AFMulator and the GUI #139

Merged
merged 11 commits into from
Apr 6, 2023

Conversation

NikoOinonen
Copy link
Collaborator

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.

Copy link
Collaborator

@ProkopHapala ProkopHapala left a 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)

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 this pull request may close these issues.

Some way of saving/loading state in GUI
2 participants