From ca988e43b58a361ef4df904d0978b03ee91d8934 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Tue, 19 Jul 2016 10:45:18 +0100 Subject: [PATCH] Fixed bug with complex number in Lorenz material coefficients. --- gprMax/materials.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gprMax/materials.py b/gprMax/materials.py index aa62dce9..37562f97 100644 --- a/gprMax/materials.py +++ b/gprMax/materials.py @@ -107,8 +107,8 @@ class Material(object): # tau for Lorentz materials are pole frequencies # alpha for Lorentz materials are the damping coefficients wp2 = (2 * np.pi * self.tau[x]) * (2 * np.pi * (1 / self.tau[x])) - self.w[x] = -(wp2 * self.deltaer[x]) * j / np.sqrt(wp2 - (self.alpha[x] * self.alpha[x])) - self.q[x] = -self.alpha[x] + np.sqrt(wp2 - (self.alpha[x] * self.alpha[x])) * j + self.w[x] = -(wp2 * self.deltaer[x]) * 1j / np.sqrt(wp2 - (self.alpha[x] * self.alpha[x])) + self.q[x] = -self.alpha[x] + np.sqrt(wp2 - (self.alpha[x] * self.alpha[x])) * 1j elif self.type == 'drude': # tau for Drude materials are pole frequencies # alpha for Drude materials are the inverse of relaxation times