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

Scanning 3DXRD Strain refinement #339

Merged
merged 33 commits into from
Oct 18, 2024
Merged

Scanning 3DXRD Strain refinement #339

merged 33 commits into from
Oct 18, 2024

Conversation

jadball
Copy link
Contributor

@jadball jadball commented Oct 17, 2024

Summary:

We can now do point-by-point strain refinement for S3DXRD data, by implementing a method provided by @AxelHenningsson . Thanks for your help!
This works for grain maps coming from both the point-by-point indexing process and the tomographic mapping process.

PBPRefine:

This is a class to manage the point-by-point refinement process, similar to the PBP class.
Like the PBP class, we choose some peaks for self.icolf which we will refine with.
The class also has an input multi-valued map (self.pbpmap), a refinement mask (self.mask) and a single-valued 'choice' of the multi-valued map (required for computing x origins for each grain) (self.singlemap). For now this is computed from PBPMap.choose_best.
Features:

  • Save and load from HDF5
  • self.get_origins(): Compute origin-of-diffraction for each peak in self.icolf
  • self.run_refine(): Initiate point-by-point refinement, either locally or on a cluster machine through SLURM
    Solves GrainMap class #278

PBPMap:

This is now a subclass of ImageD11.columnfile.columnfile. This solves the confusions with multi-valued data structures, ragged arrays, etc etc. in a very simple way that we were already using for the PBP refinement results

  • Added plotting methods for nuniq histogram and best results (from notebooks)
  • Added strain support (for strain refinement methods)
  • Solves Multi-tensor map class #325

PBP:

  • Now computes corrected origin of diffraction for g-vectors to account for x-position in the sample

Other bits and bobs:

  • Updated Zenodo dataset with multiphase pars (updated fetch_data.py and its test accordingly)
  • Renamed scanning notebooks to more clearly define the choice of processing routes (and how they diverge then merge together later)
  • Added some more documentation to the scanning notebooks in the form of markdown text blocks
  • Added some new utility functions to ImageD11/sinograms/geometry.py
  • Added some more stress and strain functions to ImageD11/sinograms/tensor_map.py

TODO:

  • Automated tests that run explicitly against @AxelHenningsson 's implementation (during development this was being done semi-manually)
  • Test the functions I had to grab from ImageD11 to Numba-fy against their references
  • Test stress stuff in TensorMap

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jadball
Copy link
Contributor Author

jadball commented Oct 18, 2024

Python 2 tests are currently failing because roi_iradon is trying to import scipy.fft and failing

@jadball
Copy link
Contributor Author

jadball commented Oct 18, 2024

@jonwright are you happy to merge as-is and we exclude point_by_point tests on Python 2.7? I think this is the first time our CI touches the roi_iradon code which is why we haven't seen this before.

@jonwright
Copy link
Member

Sure - go ahead and merge. I have the feeling that numpy V2 is going to break python 27 anyway. Probably it means skipping tests as I would like to keep a fitallb compatible code at least until we sort out the error bars on strain. Maybe that is quite close with this merge?

@jadball
Copy link
Contributor Author

jadball commented Oct 18, 2024

Got it, merging now! Managed to skip the test.

@jadball jadball merged commit f765cbc into FABLE-3DXRD:master Oct 18, 2024
6 checks passed
This was referenced Oct 18, 2024
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