New Feature: 3D CrystalMap Objects#598
Draft
smason747 wants to merge 11 commits intopyxem:developfrom
Draft
Conversation
created new object `CrystalMap3D` extending from `CrystalMap`. Reintroduced `prop.z` parameter, and updates some of the coordinates functions to add support for z dimension.
Moved z/depth functionality from separate crystal_map_3d class to crystal_map. Deleted crystal_map_3d.py
added 'axis' and 'layer' parameters to plotting functionality for CrystalMap objects. Combination of axis and layer defines a 2D slice within a 3D volume to plot a 2D image of. Uses new '_xmap_slice_from_axis' function to dynamically grab 2D xmap slices.
added return definition '-> "CrystalMap"' to _xmap_slice_from_axis
Collaborator
|
I was looking at this PR and trying to fix the errors, and I think crystal_map.create_coordinate_arrays is transposed from the numpy-like behavior. Can you confirm? What it does (as per the docstring): This is doing the tiling column-major (Fortran style) as opposed to row-major (Numpy style). I would expect the opposite, so that it behaved like np.meshgrid:
The difference is pretty trivial for orix right now, but it matters for how the 3d ebsd is added. Here is what I think it should be corrected to, when extended to three dimensions: |
Collaborator
|
@smason747, check out this branch when you get time and let me know what you think. |
First pass at layer_row_col-based xmap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of the change
As discussed in #577, this PR is working to re-introduce the capability for ORIX to handle 3D datasets. As an initial step, I wrote a
CrystalMap3Dclass that extends from the standardCrystalMapclass and adds azvariable as a new property. In discussing this approach, it was recommended to absorb those changes intoCrystalMapitself, rather than introduce a new class. This has not yet been done at the time of submitting the PR, but opens the floor to do so. Along with updating the data structure itself, changes need to be made to the plotting functionality to plot individual slices, either for a default value if not specified, at a chosen depth, on a chosen plane (xy, yz, xz), or with an interactive slider to allow fly-through viewings. Additionally, this could be a helpful time to address any thoughts on the underlying data structure of theCrystalMapclass, as well as ensure loading of 3D files can be handled byorix.io.Progress of the PR
zfunctionality to 'CrystalMap' class, rather than create new 'CrystalMap3D' classMinimal example of the bug fix or new feature
For reviewers
__init__.py.section in
CHANGELOG.rst.__credits__inorix/__init__.pyand in.zenodo.json.