From be6edd19c78c1f9ef0d9376d573c1a0569127f12 Mon Sep 17 00:00:00 2001
From: Christian Pavese <cpav@dtu.dk>
Date: Tue, 3 May 2016 16:00:26 +0200
Subject: [PATCH] more max() to .max()and bug fixed

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

diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py
index d46e0b1c..dc5d76d4 100755
--- a/wetb/prepost/Simulations.py
+++ b/wetb/prepost/Simulations.py
@@ -3413,8 +3413,8 @@ def int_envelope(ch1,ch2,Nx):
                                 axis=0)
                             
                         
-    int_1 = np.linspace(min(upper[:,0].min(),min(lower[:,0])),\
-                        max(upper[:,0].max(),max(upper[:,0])),Nx/2+1)
+    int_1 = np.linspace(min(upper[:,0].min(),lower[:,0].min()),\
+                        max(upper[:,0].max(),lower[:,0].max()),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]))
-- 
GitLab