equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
110 stars 58 forks source link

ENH: improve cube window attributes #1238

Closed jcrivenaes closed 2 months ago

jcrivenaes commented 2 months ago

This PR replaces #1234

It should close issue #1232

After a lot of testing, I found that doing numpy statististics where rather ineffecient, and made a C++ (pybind11) routine to do that task. That speed up the task a magnitude of order, and a typical execution (total) could go from 40 seconds to 5 seconds.

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 94.07895% with 9 lines in your changes missing coverage. Please review.

Project coverage is 81.13%. Comparing base (0375fed) to head (eb180e6). Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
src/xtgeo/cube/_cube_window_attributes.py 94.69% 4 Missing and 3 partials :warning:
src/xtgeo/cube/cube1.py 66.66% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1238 +/- ## ========================================== + Coverage 80.02% 81.13% +1.10% ========================================== Files 98 93 -5 Lines 13680 12324 -1356 Branches 2203 1995 -208 ========================================== - Hits 10948 9999 -949 + Misses 1999 1668 -331 + Partials 733 657 -76 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.