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
rsciio.hspy.file_writer() requires a "package_info" key in the signal dictionary. This is not listed in the API docs. In HyperSpy's use of file_writer(), this dictionary field is populated by calling the utility function rsciio.utils.tools.get_object_package_info(). This function is not listed in Rosetta's public API, so I assume it is private.
Is the intention that a user or another package imports this private function and populates the "package_info" key when using the HSpy writer? Or shouldn't the writer be used by anyone else than HyperSpy?
Please correct me if I missed something here.
To Reproduce
kikuchipy 0.8.7 supports writing to HyperSpy's HSpy file format via a custom save() method. This works fine when calling the HSpy writer from HyperSpy 1.7.5 (internally in kikuchipy). In the effort to make kikuchipy compatible with HyperSpy 2.0 and start using RosettaSciIO 0.1, the need to populate the "package_info" dictionary field presented itself:
This is specific to the hyperspy specification and I would say that this should be documented ("package_info" and rsciio.utils.tools.get_object_package_info), as well as saving other signals attributes, which are currently undocumented too.
Describe the bug
This is more of a question than a bug report.
rsciio.hspy.file_writer()
requires a "package_info" key in thesignal
dictionary. This is not listed in the API docs. In HyperSpy's use offile_writer()
, this dictionary field is populated by calling the utility functionrsciio.utils.tools.get_object_package_info()
. This function is not listed in Rosetta's public API, so I assume it is private.Is the intention that a user or another package imports this private function and populates the "package_info" key when using the HSpy writer? Or shouldn't the writer be used by anyone else than HyperSpy?
Please correct me if I missed something here.
To Reproduce
kikuchipy 0.8.7 supports writing to HyperSpy's HSpy file format via a custom
save()
method. This works fine when calling the HSpy writer from HyperSpy 1.7.5 (internally in kikuchipy). In the effort to make kikuchipy compatible with HyperSpy 2.0 and start using RosettaSciIO 0.1, the need to populate the "package_info" dictionary field presented itself:😮
The "package_info" field is populated in HyperSpy's
io.save()
function and not inBaseSignal._to_dictionary()
.Expected behavior
To write the signal to file 😅
The "package_info" dictionary field is new to me (although I see it was introduced by @francisco-dlp July last year...).
Python environement:
Additional context
None at the moment.
The text was updated successfully, but these errors were encountered: