Skip to content

Commit

Permalink
ENH: add algorithm 3 for slice_cube_window()
Browse files Browse the repository at this point in the history
This algorithm is purely in Python which makes debugging significantly
easier. For niv > 1, the speed compared with algorithm 2 will be
somewhat decreased, but we can later see if it is possible to
speedup the refining of an existing cube.
  • Loading branch information
jcrivenaes committed Sep 24, 2023
1 parent 0f3fc8c commit 9829ac0
Show file tree
Hide file tree
Showing 3 changed files with 455 additions and 39 deletions.
27 changes: 23 additions & 4 deletions src/xtgeo/surface/_regsurf_cube_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

import numpy as np
import numpy.ma as ma
from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGShowProgress
from . import _regsurf_cube_window_v2 as cwv

from xtgeo.common import XTGeoDialog, XTGShowProgress

from . import _regsurf_cube_window_v2 as cwv2
from . import _regsurf_cube_window_v3 as cwv3

xtg = XTGeoDialog()

Expand Down Expand Up @@ -69,8 +71,25 @@ def slice_cube_window(
deadtraces=deadtraces,
)

elif algorithm == 2:
attrs = cwv2.slice_cube_window(
self,
cube,
zsurf=zsurf,
other=other,
other_position=other_position,
sampling=sampling,
mask=mask,
zrange=zrange,
ndiv=ndiv,
attribute=attribute,
maskthreshold=maskthreshold,
snapxy=snapxy,
showprogress=showprogress,
deadtraces=deadtraces,
)
else:
attrs = cwv.slice_cube_window(
attrs = cwv3.slice_cube_window(
self,
cube,
zsurf=zsurf,
Expand Down
Loading

0 comments on commit 9829ac0

Please sign in to comment.