From 0f8f12e884103e9d86ac3dd1b5b87f3ad14b4b40 Mon Sep 17 00:00:00 2001
From: Christian Pavese <cpav@jess.dtu.dk>
Date: Fri, 14 Oct 2016 11:00:08 +0200
Subject: [PATCH] Excessive Cases.int_envelope(ch1,ch2,Nx) removed

---
 wetb/prepost/Simulations.py | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py
index 751149b..510ffed 100755
--- a/wetb/prepost/Simulations.py
+++ b/wetb/prepost/Simulations.py
@@ -5204,38 +5204,6 @@ class Cases(object):
 
         return envelope
 
-    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
-        # close the curve
-
-        upper = []
-        lower = []
-
-        indmax = np.argmax(ch1)
-        indmin = np.argmin(ch1)
-        if indmax > indmin:
-            lower = np.array([ch1[indmin:indmax+1],ch2[indmin:indmax+1]]).T
-            upper = np.concatenate((np.array([ch1[indmax:],ch2[indmax:]]).T,\
-                            np.array([ch1[:indmin+1],ch2[:indmin+1]]).T),axis=0)
-        else:
-            upper = np.array([ch1[indmax:indmin+1,:],ch2[indmax:indmin+1,:]]).T
-            lower = np.concatenate((np.array([ch1[indmin:],ch2[indmin:]]).T,\
-                                np.array([ch1[:indmax+1],ch2[:indmax+1]]).T),axis=0)
-
-
-        int_1 = np.linspace(min(min(upper[:,0]),min(lower[:,0])),\
-                            max(max(upper[:,0]),max(upper[:,0])),Nx/2+1)
-        upper = np.flipud(upper)
-        int_2_up = np.interp(int_1,np.array(upper[:,0]),np.array(upper[:,1]))
-        int_2_low = np.interp(int_1,np.array(lower[:,0]),np.array(lower[:,1]))
-
-        int_env = np.concatenate((np.array([int_1[:-1],int_2_up[:-1]]).T,\
-                                np.array([int_1[::-1],int_2_low[::-1]]).T),axis=0)
-
-        return int_env
-
     def envelope(self, silent=False, ch_list=[], append=''):
         """
         Calculate envelopes and save them in a table.
-- 
GitLab