From f1e6d01d5389582a04354fc8f4360b89c1adf7be Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 30 Mar 2022 14:47:56 +0200 Subject: [PATCH] Fixed cospectrum: real part instead of abs --- swash/processing/post.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swash/processing/post.py b/swash/processing/post.py index eb97a32..15b0b79 100644 --- a/swash/processing/post.py +++ b/swash/processing/post.py @@ -56,8 +56,8 @@ G = H / U th_eta_u = np.angle(phi_eta_u[1]) R = np.sqrt( - (np.abs(phi_eta[1]) + np.abs(phi_u[1]) - 2 * np.abs(phi_eta_u[1])) - / (np.abs(phi_eta[1]) + np.abs(phi_u[1]) + 2 * np.abs(phi_eta_u[1])) + (np.abs(phi_eta[1]) + np.abs(phi_u[1]) - 2 * phi_eta_u[1].real) + / (np.abs(phi_eta[1]) + np.abs(phi_u[1]) + 2 * phi_eta_u[1].real) ) #R = np.sqrt( # (1 + G**2 - 2 * G * np.cos(th_eta_u)) @@ -89,8 +89,8 @@ if config.has_option("post", "compare"): th_eta_u_ = np.angle(phi_eta_u_[1]) R_ = np.sqrt( - (np.abs(phi_eta_[1]) + np.abs(phi_u_[1]) - 2 * np.abs(phi_eta_u_[1])) - / (np.abs(phi_eta_[1]) + np.abs(phi_u_[1]) + 2 * np.abs(phi_eta_u_[1])) + (np.abs(phi_eta_[1]) + np.abs(phi_u_[1]) - 2 * phi_eta_u_[1].real) + / (np.abs(phi_eta_[1]) + np.abs(phi_u_[1]) + 2 * phi_eta_u_[1].real) ) #R_ = np.sqrt( # (1 + G_**2 - 2 * G_ * np.cos(th_eta_u_))