Skip to content

dials.generate_distortion_maps: much faster generation of elliptical distortion maps#2745

Merged
dagewa merged 17 commits intomainfrom
faster-elliptical-distortion-map
Oct 11, 2024
Merged

dials.generate_distortion_maps: much faster generation of elliptical distortion maps#2745
dagewa merged 17 commits intomainfrom
faster-elliptical-distortion-map

Conversation

@dagewa
Copy link
Copy Markdown
Member

@dagewa dagewa commented Sep 25, 2024

Move the loop over pixels from Python to C++. For a large detector (Gatan K3, $4092 \times 5760$ pixels) this reduced the whole program run time from 2m56.584s to just 0m3.203s (i.e. 55 times speed improvement).

In addition, set sensible defaults for ellipse map generation, including automatic ellipse centring at the beam centre.

@dagewa
Copy link
Copy Markdown
Member Author

dagewa commented Sep 25, 2024

Nevertheless, the maps remain useless because of #2744

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.14%. Comparing base (796eba4) to head (d81a0b8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2745      +/-   ##
==========================================
- Coverage   78.15%   78.14%   -0.01%     
==========================================
  Files         617      618       +1     
  Lines       76731    76726       -5     
  Branches     8930     8929       -1     
==========================================
- Hits        59968    59957      -11     
- Misses      14528    14532       +4     
- Partials     2235     2237       +2     

@dagewa dagewa merged commit f3b4f6b into main Oct 11, 2024
@dagewa dagewa deleted the faster-elliptical-distortion-map branch October 11, 2024 07:13
graeme-winter pushed a commit that referenced this pull request Nov 19, 2024
…l distortion maps (#2745)

Move algorithm to C++ for >50* faster version of the elliptical distortion map calculation
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