Replies: 4 comments 11 replies
|
A couple of leading questions. What does a 3D (x, y, time) dataset look like and how is that different from a 3D (x, y, z) crystal map. What about a crystal map that is 2D but you happen to have mutiple phases at some point? What about a more flexible crystal map that has dimensions where you can have mutiple orientations for each position in x/y as well as some score associated. How should this be plotted? |
I think, in this instance, it's the same, right? ideally some day you would want to be able to rotate in spatial coordinates, but that requires a lot of plotting support that doesn't exist yet, and should not be tackled in a single PR.
Since it's a single class with a single Unless you mean multiple phases at a single voxel? in which case, that seems like a problem to tackle in
Seems like a solid use case for #576 in the Rotatoins class:)
This is the crux of why i suggested to @smason747 that CrystalMap3d should be it's own seperate class. Many of the current plotting functions break if you go 3d, and a few don't really have 3d-equivalents. So, just use all the old functions for only 2D maps, and make a new, smaller set of 3d-specific plotting functions. If you want to plot a slice with a 2D plotter, you just export the slice first to a 2D CrystalMap first. Saying this out loud, I'm now realizing the correct setup might be Also, I think trying too hard to get the best visualization tools in the first attempt might tank this effort. I would suggest we just do the easy first-step of a 2D fly-through plot with a z-vector slider, and leave anything more complicated involivng pyQT or pyVista or plotly for a future effort
Would you actually want this? i think adding a time axis might be a step too much. |
|
Hi @smason747, Thank you for bringing this up! I think supporting 3D crystal maps is a great idea. This is well within the purpose of the existing Now, we have to make sure that all existing functionality works as-is and as expected. So there will be many edge-cases we have to handle. E.g., we should start by adding a "layer" or "depth" parameter to the current 2D crystal map Matplotlib plotter, with a default of the first layer. I suggest to start by adding your additions to the current crystal map class. You can then open a draft PR. We can iron out the edge-cases and new methods and attributes there. What do you say? |
Okay, I've done a bit of a 180 on this. Short version, I agree with @hakonanes now. I'd suggest ignoring my idea of sub-classing. Instead, I'd start a PR for supporting 3D in Longer version: I think all of these make sense in 3D. The starred ones are going to require some if/then logic to handle 2D vs 3D, but that's very doable.
This is the big issue with 3D crystal maps IMO, but there is a separate class just for plotting, Some day, possibly years from now, I want orix to support a
In the same vein, it would be nice to have 3D KAM maps, or orientation isopleths, or 3D selected grain maps, but those are all things that would fit nicely into a With all that in mind, I would also drop the Apologies for the wall of text. |
Uh oh!
There was an error while loading. Please reload this page.
I would like to open a discussion on the reintroduction of
CrystalMapobjects to handle 3D EBSD data. It looks like this base level of functionality was removed several years ago #392 due to incompatibility with plotting functions.In talking with @argerlt, we considered one option for allowing 3D data without breaking current functionality (avoiding Matplotlib warnings/errors as mentioned in #392) could be to create an additional
CrystalMap3Dclass that extends the standardCrystalMapclass while adding in azvariable as a new property. From there, a user could choose to return 2D slices of the larger 3D dataset, returned as traditionalCrystalMapobjects, where normal functionality could be used.For example, taking slices on each of the orthogonal axes:
xmap3d[100].plot('ci') xmap3d[:,100,:].plot('ci') xmap3d[:,:,100].plot('ci')This approach would be greatly helpful to my workflow (often involving serial sectioned 3D-EBSD datasets) by allowing me to process orientation data, apply rotations, etc., all of which already works in ORIX, agnostic of a
prop.zproperty. Currently, any orientation processing I do has to be done either in individual slices, or by passing 1Dquatarrays in and out of ORIX to other tools.I have written up a rough, proof-of-concept
CrystalMap3Dobject extendingCrystalMapadding only thezproperty on my fork, but wanted to see if there were other ideas on how to approach this problem before going any further.Please let me know what you think. Thanks!
All reactions