From 390e1402e634e2a2dc23b5b02ce309a5e5b768a3 Mon Sep 17 00:00:00 2001
From: cpav <cpav@VINDRI-D17205.win.dtu.dk>
Date: Thu, 21 Apr 2016 09:33:22 +0200
Subject: [PATCH] Corrections to the function for cartesian interpolation of
 envelopes: - number of interpolation points added to "compute_envelopes"

---
 wetb/prepost/Simulations.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py
index f0d2887..732b03d 100755
--- a/wetb/prepost/Simulations.py
+++ b/wetb/prepost/Simulations.py
@@ -4890,7 +4890,7 @@ class Cases(object):
 
         return result
 
-    def compute_envelope(self, sig, ch_list, int_env=False):
+    def compute_envelope(self, sig, ch_list, int_env=False, Nx=300):
 
         envelope= {}
         for ch in ch_list:
@@ -4905,7 +4905,7 @@ class Cases(object):
                                        axis=0)
             if int_env:
                 closed_contour_int = self.int_envelope(closed_contour[:,0],\
-                                                        closed_contour[:,1])                
+                                                    closed_contour[:,1],Nx=Nx)                
                 
                 
             for ich in range(2, len(ch)):
@@ -4916,7 +4916,7 @@ class Cases(object):
                 closed_contour = np.append(closed_contour, s0, axis=1)
                 if int_env:
                     extra_sensor = self.int_envelope(closed_contour[:,0],\
-                                                        closed_contour[:,ich])
+                                                    closed_contour[:,ich],Nx=Nx)
                     es = np.atleast_2d(np.array(extra_sensor[:,1])).T                                        
                     closed_contour_int = np.append(closed_contour_int,es,axis=1)
                 
@@ -4926,7 +4926,7 @@ class Cases(object):
                 envelope[ch[0]] = closed_contour
         return envelope
         
-    def int_envelope(ch1,ch2,Nx=300):
+    def int_envelope(ch1,ch2,Nx):
         # Function to interpolate envelopes and output arrays of same length
     
         # Number of points is defined by Nx + 1, where the + 1 is needed to
-- 
GitLab