Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Features/fixes
Added routines to export
Optionsobjects' contents to dictionaries, and to import contents intoOptionsobjects from dictionariesPtychographyTaskhas 2 new methods:get_options_as_dictreturns a nested JSON-serializable dictionary of the masterOptionsobjects and its sub-options;load_options_from_dictpopulates values ofself.optionsand its sub-options --self.data_options,self.object_options, etc., with a dictionary.Optionsclass now hasget_dictandload_from_dictthat does the same.The export methods only export non-data fields, i.e., fields that are not large NumPy arrays or PyTorch tensors. These include:
DataOptions.dataObjectOptions.initial_guessObjectOptions.valid_pixel_maskProbeOptions.initial_guessProbePositionOptions.position_x/y_pxOPRModeWeightsOptions.initial_weightsMentions
@stevehenke
Checklist
Have you...