-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for a non-square detector #3
Comments
I will look into this. Rectangular detectors should have been supported ... so this is most likely that I messed something up. |
OK then, that's really good to hear! |
@hakonanes Note: at this point the Radon is still going to limit the max-rho to the circle of the lesser of the two dimensions ... the missing data from "the corners" causes all sorts of issues in the convolution and peak finding steps later on. I have some ideas on how to approach this differently in the future and still not destroy the speed. Also note that I included a really short description in the jupyter notebook for indexing of the output data from the indexing. The key thing to realize is that I am saving my best guess at an index for each phase, and then the last layer of the data is my guess at the most likely phase. Hope that helps. |
Yes, I got no error messages when trying it out on simulated patterns here, thanks a lot for fixing it so quickly! But, I get unexpected results compared to the ground truth, as you can see from the notebook. Do you have an explanation for this? Am I right in assuming that
I believe everyone have done this mistake before...
Might this be the reason for the unexpected results for non-square patterns?
That is very helpful indeed! I noticed that the return from |
I did start taking a look at these incorrect results a while back. I at the time, I made the same set of patterns (square) using my installed EMSoft (Fortran version) and I was getting the correct answers out of PyEBSDIndex. I will see if I can dig a bit more later on today. A few things to attempt:
|
Yes, the consistent misorientation between PyEBSDIndex and orix persist, however, I haven't found time to look into it. Consider this on me until you discover any inconcistencies in your results too.
These are the conventions adopted in orix, which I'm using for projecting simulated patterns. However, the geometrical simulations of band and zone axis positions are implemented using Winkelmann's procedure from their 2016 tutorial paper (Britton et al.). Instead of comparing the ground truth simulations to geometrical simulations from Hough indexing results, I've re-projected patterns using the Hough indexing results to get new simulations, and the misorientation persists. Should be visible in the updated notebook.
These are the same assumptions made in kikuchipy, so that shouldn't be the issue. |
Do PyEBSDIndex follow TSL's definition of PC, stated like this in kikuchipy's documentation I still get unexpected results for a rectangular detector, but expected results for a square detector in the updated notebook. |
I will take advice here, as making a change in PyEBSDIndex at this point is fairly simple. Currently PyEBSDIndex uses the EDAX convention, but near as I can tell (with only using EDAX) there are some ambiguities with rectangular detectors, and maybe Oxford has more clearly defined. In the paragraph above, you state that y^*_T should be a fraction of the detector width -- even though it is expressing the height. I assumed it was the fraction of the height. With yesterday's PR, I should now have the z^*_T = L / (Nx*pixel_size). Can you confirm that Oxford does indeed scale everything to the detector width? Thus y_{pc} = (N_x) * (y^*_T) |
Looking at the Jackson 2019 (Integrating Materials and Manufacturing Innovation (2019) 8:226–246; Equations 2,3,4) paper they have EDAX using Nx for PCx, PCy, PCz and Oxford using Ny for PCy, Nx for PCx, PCz. I can ask about EDAX, but my guess is that they initially assumed a square detector, built their code around just pulling the one parameter (Nx) and never looked back. |
Asking EDAX would be great. I only have access to a manual from TSL OIM DC v7.2 (which we have in our lab), and there they state the parameters are given in "percentages of pattern size", which is ambiguous: @IMBalENce (Zhou Xu) at Monash helped correct the PC conventions in kikuchipy (Bruker, TSL, Oxford, EMsoft v4/5), making them consistent for square and rectangular detectors (pyxem/kikuchipy#449 (comment)). The above referenced docstring reflects the results of his testing and our discussion. Oxford uses Nx for all three parameters (see manual screenshots from AZtec Crystal EMsoft-org/EMsoft#131 (comment) and Channel 5 EMsoft-org/EMsoft#131 (comment)), so I believe this convention is wrong in the tutorial paper. |
I've confirmed that by ignoring the aspect ratio (i.e. a yT* = 0.8 means 80% of pattern height) in the This gives me confidence that TSL PC conventions in |
I will put in a PR sometime today then to correct - scale everything by Nx. Regarding the 5° ... this is really close to the default value for the camera elevation (5.3°). Note this value is in degrees. When I was running tests between reported orientations from PyEBSDIndex and EMSoft inputs, using camera elevation of 0.0 and 5.3, I was getting misorientation of ~0.5° |
At least our experimentation with rectangular patterns suggests that this scaling is correct.
Sorry, I should clarify, the highest disorientation was 5 degrees, but the lowest was ~0.5 degrees, so it's not systematic in the 10 simulated patterns where I know the ground truth. I'm explicitly set the camera elevation to 0 in the indexer instance passed to |
Support for a non-square detector would be nice. I assume this requires quite some generalizations of array shapes in much of the code, so this issue might be open for a while.
Got this error message when trying to initialize an
EBSDIndexer
instance:EDIT: Pinging @drowenhorst-nrl.
The text was updated successfully, but these errors were encountered: