HEXRD / hexrd

A cross-platform, open-source library for the analysis of X-ray diffraction data.
Other
56 stars 25 forks source link

Inverse distortion #584

Closed ZackAttack614 closed 9 months ago

ZackAttack614 commented 10 months ago

This PR focuses on the GE inverse distortion function. It has been rewritten into C++ and uses Eigen to do the heavy lifting of the matrix math.

In the multi-ruby example analysis running on my laptop, this PR takes the total runtime from 82 seconds to 62 seconds, cutting out roughly 25% of the runtime.

pep8speaks commented 9 months ago

Hello @ZackAttack614! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2023-11-24 20:52:14 UTC
psavery commented 9 months ago

I should also test a couple of state files with these changes to verify that there are no issues. I believe this PR means that the transforms functions will now be compiled with a C++ compiler instead of a C compiler. In theory, this shouldn't cause any issues, but I will do a quick check to verify.

After the comments have been addressed and a few state files tested, it will be good to merge!

psavery commented 9 months ago

I also tested a couple of state files and did not encounter any issues due to the fact that the compiler is C++ instead of C.

psavery commented 9 months ago

At some point, we can verify that this produces a speed improvement for a real example with many grains, but it looks good, and we can verify that later.