Skip to content

Commit

Permalink
bug: sqrt(eps_1) appeared twice in the phase computation
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainp committed Aug 29, 2019
1 parent 8d16d0d commit 21ad8d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smrt/interface/coherent_flat.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def _prepare_computation(self, frequency, eps_1, eps_2, mu1):
R01_v, R01_h, mu_1 = fresnel_coefficients(eps_0, eps_1, mu_0)
R1t_v, R1t_h, mu_t = fresnel_coefficients(eps_1, eps_t, mu_1)

k = 2 * np.pi / C_SPEED * frequency * np.sqrt(eps_1)
k_1 = 2 * np.pi / C_SPEED * frequency * np.sqrt(eps_1)

phase = k * mu_1 * np.sqrt(eps_1) * self.layer.thickness
phase = k_1 * mu_1 * self.layer.thickness
assert np.all(phase.imag >=0)

incoherent = phase.real > 3 * np.pi / 4 # we consider coherency up to 3 pi / 2 like in MEMLS
Expand Down

0 comments on commit 21ad8d3

Please sign in to comment.