From 019ad778538093bd9fe1cd1aacd175966d9105a8 Mon Sep 17 00:00:00 2001
From: Anchal Gupta <anchal@caltech.edu>
Date: Tue, 29 Dec 2020 12:31:07 -0800
Subject: [PATCH] Using explicit np.flipud instead of providing axis=0 or
 relying on default behavior

---
 gwinc/noise/coatingthermal.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gwinc/noise/coatingthermal.py b/gwinc/noise/coatingthermal.py
index 4512f3a1..a53cc3b5 100644
--- a/gwinc/noise/coatingthermal.py
+++ b/gwinc/noise/coatingthermal.py
@@ -935,8 +935,8 @@ def getCoatReflAndDer(nN, nsub, dOpt):
     # rhoN[0] is total complex reflectivity of the coating stack.
     rhoN = np.zeros_like(Refl, np.complex128)
 
-    phiNmkm1 = np.flip(Phi)             # phi_{N-k-1}
-    rNmkm1 = np.flip(Refl[:-1])              # r_{N-k-1}
+    phiNmkm1 = np.flipud(Phi)             # phi_{N-k-1}
+    rNmkm1 = np.flipud(Refl[:-1])              # r_{N-k-1}
     exp2iphiNmkm1 = np.exp(2j*phiNmkm1)      # exp(2i phi_{N-k-1})
 
     # Recursion relation for complex reflectivity
@@ -955,11 +955,11 @@ def getCoatReflAndDer(nN, nsub, dOpt):
     delRhokp1_delPhiNmkm1 = np.append(0, -2j * rhoN[:-1] * delRhokp1_delRhok)
 
     # Derivative of rho_{N} wrt to rho_{N-j}
-    delRhoN_delRhoNmj = np.append(1, np.cumprod(np.flip(delRhokp1_delRhok)))
+    delRhoN_delRhoNmj = np.append(1, np.cumprod(np.flipud(delRhokp1_delRhok)))
 
     # Derivative of rho_{N} wrt to r_k and phi_k
-    delRho_delRk = - delRhoN_delRhoNmj * np.flip(delRhokp1_delRNmkm1)
-    delRho_delPhik = - delRhoN_delRhoNmj * np.flip(delRhokp1_delPhiNmkm1)
+    delRho_delRk = - delRhoN_delRhoNmj * np.flipud(delRhokp1_delRNmkm1)
+    delRho_delPhik = - delRhoN_delRhoNmj * np.flipud(delRhokp1_delPhiNmkm1)
     delLogRho_delReflk = delRho_delRk / rhoN[-1]
     delLogRho_delPhik = delRho_delPhik / rhoN[-1]
     delLogRho_delPhik[-1] = 0        # Define this as per Eq (26)
-- 
GitLab