Open SteffenBrinckmann opened 10 months ago
Thank you for this suggestion, @SteffenBrinckmann.
A public method to extract all contents of a crystal map is a good idea. We already use such a private function in the orix HDF5 writer:
This function returns all contents of a crystal map, including the rotations. It doesn't calculate the phase fractions for you, though. Can you explain what you need this information for, specifically?
I think making the mentioned private function a public crystal map method is the best solution. If you really need the phase fractions as well, we can add this to the dictionary if a boolean keyword is true, for example. What do you think?
hey @hakonanes
best, Steffen
I think that @SteffenBrinckmann has a good idea. If the function is private it would be good to add this function to the CrystalMap object. Something like a function _to_dictionary
would allow it to be saved by hyperspy signals as well which would be useful.
@hakonanes @pc494 Thoughts?
Haven't forgotten about this, but don't have time at the moment. A more thorough discussion about serialization (into dicts, I presume) would be good.
add to_dict method to crystal_map to allow for easy extraction of those results that would be printed with repr
Description of the change
Progress of the PR
Minimal example of the bug fix or new feature
For reviewers
__init__.py
.CHANGELOG.rst
.__credits__
inorix/__init__.py
and in.zenodo.json
.