Skip to content

Fix UniversalHermannMauguin dataset parsing in GrainMapper3D reader#1620

Open
nikprabhu wants to merge 1 commit into
BlueQuartzSoftware:developfrom
nikprabhu:bugfix/grainmapper3D-hermann-mauguin
Open

Fix UniversalHermannMauguin dataset parsing in GrainMapper3D reader#1620
nikprabhu wants to merge 1 commit into
BlueQuartzSoftware:developfrom
nikprabhu:bugfix/grainmapper3D-hermann-mauguin

Conversation

@nikprabhu
Copy link
Copy Markdown

Summary

This PR fixes a likely typo/bug in GrainMapperReader::readPhaseInfo() (in GrainMapper3DUtilities.cpp).

Previously, phase.UniversalHermannMauguin was incorrectly assigned using k_Name instead of k_UniversalHermannMauguin.

As a result, the UniversalHermannMauguin field always duplicated the phase name instead of reading the intended HDF5 dataset.

This fix updates the reader to correctly load the UniversalHermannMauguin dataset.


Additional Question / Discussion

While tracing the full metadata flow and looking through the test case example, I noticed that this field is currently never written into the SIMPLNX DataStructure.

At the moment, only:

  • MaterialName
  • CrystalStructures
  • LatticeConstants

are written into the ensemble arrays.

I wanted to ask whether omitting UniversalHermannMauguin was:

  • intentional for compatibility/minimal metadata reasons,
  • or simply an unfinished implementation.

My understanding is that some information is already reduced when converting the full space group into a Laue group / crystal structure representation. Preserving UniversalHermannMauguin would help retain the original crystallographic metadata when translating GrainMapper3D data into DREAM3D/SIMPLNX format.

On the other hand, if the intention was to keep ensemble metadata minimal, then it may also make sense to avoid reading metadata that is never persisted, since that would make the workflow and intent of the code clearer.

For that reason, I have intentionally kept this PR limited to fixing the dataset read itself and have not modified the code to write this metadata into the SIMPLNX DataStructure.

If support for writing this metadata is desired, I would be happy to open a follow-up PR to store it as an ensemble StringArray, as I have already wrapped my head around the metadata flow through the reader and ensemble creation logic.

@imikejackson
Copy link
Copy Markdown
Contributor

I'm not sure if I intentially left it blank or I just forgot about it. Clearly the unit test did not reveal the bug so that will need to be updated also.

I do think we should keep as much of the meta data as possible for these data sets. Especially if the user is writing the results out to a .dream3d file, as you stated, there would be some loss of information which really should be preserved.

@nikprabhu
Copy link
Copy Markdown
Author

Thanks for the clarification. As mentioned, I will leave this PR as is since it is already approved, unless you would prefer the metadata preservation changes to be included here as well.

Otherwise, in the follow-up PR, I will also address extending the test coverage.

@imikejackson
Copy link
Copy Markdown
Contributor

@all-contributors please add @nikprabhu for bug

@allcontributors
Copy link
Copy Markdown
Contributor

@imikejackson

I've put up a pull request to add @nikprabhu! 🎉

@imikejackson
Copy link
Copy Markdown
Contributor

@nikprabhu Let's go ahead and do the full meta data and unit test update.

@imikejackson imikejackson force-pushed the bugfix/grainmapper3D-hermann-mauguin branch from 7c9a85f to 62f6d79 Compare May 19, 2026 17:26
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

Successfully merging this pull request may close these issues.

2 participants