def coherent_transmission_matrix(self, frequency, eps_1, eps_2, mu1, npol): """compute the transmission coefficients for the azimuthal mode m and for an array of incidence angles (given by their cosine) in medium 1. Medium 2 is where the beam is transmitted. :param eps_1: permittivity of the medium where the incident beam is propagating. :param eps_2: permittivity of the other medium. :param mu1: array of cosine of incident angles. :param npol: number of polarization. :return: the transmission matrix """ R01_v, R01_h, R1t_v, R1t_h, exp_kd, exp_2kd, mu_t = self._prepare_computation(frequency, eps_1, eps_2, mu1) T_v = (1 + R01_v) * (1 + R1t_v) * exp_kd / (1 + R01_v * R1t_v * exp_2kd) # see TsnagI 5.2.10-12 T_h = (1 + R01_h) * (1 + R1t_h) * exp_kd / (1 + R01_h * R1t_h * exp_2kd) transmission_coefficients = smrt_matrix.ones((npol, len(mu1))) nt = np.sqrt(eps_2 / eps_1).real transmission_coefficients[0] = abs2(T_v) * mu_t / mu1 / nt # for the coef see TsangIII 2.1.140b transmission_coefficients[1] = abs2(T_h) * mu_t / mu1 * nt # for the coef see TsangIII 2.1.140a if npol >= 3: # this part is to be confirmed. R_v = (R01_v + R1t_v * exp_2kd) / (1 + R01_v * R1t_v * exp_2kd) R_h = (R01_h + R1t_h * exp_2kd) / (1 + R01_h * R1t_h * exp_2kd) transmission_coefficients[2] = mu_t / mu1 * ((1 + R_v) * np.conj(1 + R_h)).real # TsangI Eq 7.2.95 return transmission_coefficients
def specular_reflection_matrix(self, frequency, eps_1, eps_2, mu1, npol): """compute the reflection coefficients for an array of incidence angles (given by their cosine) in medium 1. Medium 2 is where the beam is transmitted. :param eps_1: permittivity of the medium where the incident beam is propagating. :param eps_2: permittivity of the other medium. :param mu1: array of cosine of incident angles. :param npol: number of polarization. :return: the reflection matrix """ R01_v, R01_h, R1t_v, R1t_h, exp_kd, exp_2kd, mu_t = self._prepare_computation(frequency, eps_1, eps_2, mu1) R_v = (R01_v + R1t_v * exp_2kd) / (1 + R01_v * R1t_v * exp_2kd) R_h = (R01_h + R1t_h * exp_2kd) / (1 + R01_h * R1t_h * exp_2kd) reflection_coefficients = smrt_matrix.ones((npol, len(mu1))) reflection_coefficients[0] = abs2(R_v) reflection_coefficients[1] = abs2(R_h) if npol >= 3: reflection_coefficients[2] = (R_v * np.conj(R_h)).real # TsangI Eq 7.2.93 return reflection_coefficients
def fresnel_reflection_matrix(eps_1, eps_2, mu1, npol): """compute the fresnel reflection matrix for/in medium 1 laying above medium 2. :param npol: number of polarizations to return. :param eps_1: permittivity of medium 1. :param eps_2: permittivity of medium 2. :param mu1: cosine zenith angle in medium 1. :returns: a matrix or the diagional depending on `return_as_diagonal` """ mu1 = np.atleast_1d(mu1) assert len(mu1.shape) == 1 # 1D array reflection_coefficients = smrt_matrix.ones((npol, len(mu1))) rv, rh, _ = fresnel_coefficients(eps_1, eps_2, mu1) reflection_coefficients[0] = abs2(rv) reflection_coefficients[1] = abs2(rh) if npol >= 3: reflection_coefficients[2] = (rv * np.conj(rh)).real # TsangI Eq 7.2.93 return reflection_coefficients
def coherent_transmission_matrix(self, frequency, eps_1, eps_2, mu1, npol): """compute the transmission coefficients for the azimuthal mode m and for an array of incidence angles (given by their cosine) in medium 1. Medium 2 is where the beam is transmitted. :param eps_1: permittivity of the medium where the incident beam is propagating. :param eps_2: permittivity of the other medium :param mu1: array of cosine of incident angles :param npol: number of polarization :return: the transmission matrix """ return smrt_matrix.ones((npol, len(mu1)))