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

add forward_projector, grainmaps and updates with forward_model etc to forward compute #393

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

haixing0a
Copy link
Collaborator

The main changes are:

  1. add forward_projector.py, take the experimentally reconstructed tensor map (from pbp_tensor_refined or tensor map in xx_grains.h5), define the beam profile and forward compute peaks and output them as cf_2d, cf_3d and cf_4d, which have the same formats as ImageD11 column file. The goal is to check the peaks difference and bridge with DCT, and hopefully helps to develop iterative forward and back projections;
  2. add grainmaps.py, main features are i) merge regions when the voxels have similar orientations, 'similar' is defined by calculating the misorientation to the mean orientation of the region, therefore a min_misorientation is defined by the user to identify grain IDs (called 'labels'); ii) indexing_iterative for match peaks with already-indexed grains, then use the remaining peaks to index new grains and the obtained new grains will be merged with already-indexed grains to remove duplication
  3. updates with forward_model etc, to add logging, improve computational speed etc and add testing notebooks

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jadball
Copy link
Contributor

jadball commented Feb 4, 2025

some of the stuff (like the disorientation code) we may already have in ImageD11 in the sym_u library - I think it could also be possible to combine the grain_map and TensorMap classes by just adding new the new grain merging methods to TensorMap.

For now, though, I suggest merging as-is, then we can work on integrating it more with existing code in the future

@haixing0a
Copy link
Collaborator Author

Yes, I fully agree. In the future, it would be nice to see TensorMap has the options: i) to merge regions for rendering effective 'labels' (grainIDs); ii) remove noisy grains and update the grain IDs; iii) compute the completeness so one knows what grain is more trustable and what is less. These options are right now available in grainmaps.py, but better to be integrated with TensorMap.

Also this "indexing_iterative" should be in the future go together with some of the grain indexing functions. I think we can integrate better after we do more testings on these codes. In the future, I would be happy to see grainmaps.py gone after it is integrated well with other functionalities.

@jonwright
Copy link
Member

OK - I will merge the code as it is and we see about making things more integrated in the future.

@jonwright jonwright merged commit b3ac099 into FABLE-3DXRD:master Feb 5, 2025
6 checks passed
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.

3 participants