Skip to content
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

FindShapes has NaN axis Euler angle in specific cases #971

Open
cartercocke opened this issue Mar 12, 2021 · 4 comments
Open

FindShapes has NaN axis Euler angle in specific cases #971

cartercocke opened this issue Mar 12, 2021 · 4 comments
Assignees

Comments

@cartercocke
Copy link

Occasionally, FindShapes gives a NaN axis Euler angle output. This happens when uberbelim[elimcount - 1][0] becomes a NaN value due to uberelim[elimcount - 1][elimcount - 1] being zero.

uberbelim[elimcount - 1][0] = uberbelim[elimcount - 1][0] / uberelim[elimcount - 1][elimcount - 1];

In my case, the NaN values occur when the calculated moments of a specific grain are Ixx=4.5, Iyy=3.5=Izz=3.5, Ixy=Iyz=Ixz=-1, and the resulting uber matrix for j=1 is {{0, -1, -1}, {-1, -1, -1}{-1, -1, -1}}. Here is a picture of this "failed" grain for what is worth:

failed_grain

I'm not sure what the true root cause of this is, though.

@imikejackson
Copy link
Contributor

Thank you for the test base. The FeatureId that has the issue is 219. Debugging through the case we end up in a case with a 0/0 which will give NaN....

@imikejackson
Copy link
Contributor

The issue is also present in DREAM.3D 6.5 (Currently Publicly released version) in addition to the current 'develop' branch.

@imikejackson
Copy link
Contributor

imikejackson commented Mar 16, 2021

in the function void FindShapes::find_axiseulers() if Ixy, Iyz, Ixz all equal -1 then NaN values will be produced for the axis Euler values. this seems to happen with the feature is in the shape from @cartercocke original post above. I'm not sure if this is an edge case or if there is a subtle error in the codes. Further investigation is needed.

@imikejackson
Copy link
Contributor

This image shows 4 features from the sample data set that all have the same values for Ixy, Iyz, Ixz but 26 and 126 will not produce NaN values where as 219 and 261 will produce NaN values. Attached image shows the details.

971

There is probably an edge case that is not taken into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants