Skip to content

Commit

Permalink
incompatible matrix shape solved
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainp committed Sep 3, 2019
1 parent 984088b commit ddd05c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions smrt/interface/geometrical_optics_backscatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import numpy as np

from smrt.core.fresnel import fresnel_transmission_matrix, fresnel_coefficients # a modifier quand on fusionne
from smrt.core.lib import smrt_matrix
from smrt.core.lib import smrt_matrix, len_atleast_1d
from smrt.core.interface import Interface
from smrt.interface.geometrical_optics import shadow_function, GeometricalOptics

Expand Down Expand Up @@ -115,9 +115,9 @@ def coherent_transmission_matrix(self, frequency, eps_1, eps_2, mu1, npol):
go = GeometricalOptics(mean_square_slope=self.mean_square_slope, shadow_function=self.shadow_correction)
total_reflection = go.reflection_coefficients(frequency, eps_1, eps_2, mu1)

transmission_matrix = smrt_matrix.zeros((npol, len(mu1)))
transmission_matrix[0] = 1 - total_reflection
transmission_matrix[1] = 1 - total_reflection
transmission_matrix = smrt_matrix.zeros((npol, len_atleast_1d(mu1)))
transmission_matrix[0] = 1 - total_reflection[0]
transmission_matrix[1] = 1 - total_reflection[1]

return transmission_matrix

Expand Down

0 comments on commit ddd05c6

Please sign in to comment.