equinor / fmu-tools

fmu-tools is a library containing tools for pre- and post-processing in a Fast Model Update (FMU) context
https://equinor.github.io/fmu-tools/
GNU Lesser General Public License v3.0
10 stars 14 forks source link

Add disjoint-sets feature to fipmapper #135

Closed berland closed 3 years ago

berland commented 3 years ago

Solves the problem in https://equinor.slack.com/archives/C3HLP8ZTQ/p1620809891326900

berland commented 3 years ago

@tnatt this is for your "Source comparison" webviz volumetric viewer.

codecov-commenter commented 3 years ago

Codecov Report

Merging #135 (60dd2c5) into master (43178ce) will increase coverage by 0.69%. The diff coverage is 97.29%.

:exclamation: Current head 60dd2c5 differs from pull request most recent head 095f02f. Consider uploading reports for the commit 095f02f to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
+ Coverage   77.64%   78.34%   +0.69%     
==========================================
  Files          31       31              
  Lines        3011     3052      +41     
==========================================
+ Hits         2338     2391      +53     
+ Misses        673      661      -12     
Impacted Files Coverage Δ
src/fmu/tools/qcforward/_qcforward.py 94.17% <ø> (ø)
...ools/sensitivities/_add_webviz_tornado_onebyone.py 0.00% <ø> (ø)
src/fmu/tools/extract_grid_zone_tops.py 77.61% <50.00%> (-0.85%) :arrow_down:
src/fmu/tools/rms/create_rft_ertobs.py 91.25% <90.00%> (+0.59%) :arrow_up:
src/fmu/__init__.py 100.00% <100.00%> (ø)
src/fmu/tools/fipmapper/fipmapper.py 85.16% <100.00%> (+12.56%) :arrow_up:
src/fmu/tools/qcforward/_grid_statistics.py 91.34% <100.00%> (ø)
src/fmu/tools/qcproperties/_config_parser.py 91.20% <100.00%> (ø)
src/fmu/tools/qcproperties/_grid2df.py 96.82% <100.00%> (ø)
src/fmu/tools/qcproperties/_well2df.py 96.20% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0733f7d...095f02f. Read the comment docs.

berland commented 3 years ago

I would consider changing the type of the root in the data frame though. As although a cell within the partition identifies it uniquely, it is easy to put more into it then what it really is... I would map it to integers instead as a last step, but I leave the decision for you :)

Agree, now changed to integers, and lookup functions based on these integers added.