Skip to content

Commit

Permalink
BUG,ENH: add algorithm 3 for cube window
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrivenaes committed Sep 14, 2023
1 parent 3e10946 commit e33e29b
Show file tree
Hide file tree
Showing 4 changed files with 592 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/clib/xtg/surf_cube_attr_intv.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pillar_attrs(double *pillar, int np, double *pattr)
static void
pillar_attrs_sums(double *pillar, int np, double *pattr)
{
/* SUM attributes are only menaingful on a discrete level*/
/* SUM attributes are only meaningful on a discrete level*/

int n;
for (n = 11; n <= 13; n++)
Expand Down
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 e33e29b

Please sign in to comment.