Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Jun 8, 2021
1 parent 7ed5d01 commit 39cf110
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions webviz_subsurface/plugins/_surface_viewer_fmu.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,13 +731,12 @@ def calculate_surface_difference(
surface2: xtgeo.RegularSurface,
calculation: str = "Difference",
) -> xtgeo.RegularSurface:
surface_copy = surface.copy()
if calculation == "Difference":
surface_copy.subtract(surface2)
diff_surf = surface - surface2
elif calculation == "Sum":
surface_copy.add(surface2)
diff_surf = surface + surface2
elif calculation == "Product":
surface_copy.multiply(surface2)
diff_surf = surface * surface2
elif calculation == "Quotient":
surface_copy.divide(surface2)
return surface_copy
diff_surf = surface / surface2
return diff_surf

0 comments on commit 39cf110

Please sign in to comment.