def specular_reflection_matrix(self, frequency, eps_1, mu1, npol, compute_coherent_only):
if npol > 2 and not hasattr(self, "stop_pol2_warning"):
print("active model is not yet fully implemented, need modification for the third component") # !!!
self.stop_pol2_warning = True
if self.specular_reflection is None and self.backscattering_coefficient is None:
self.specular_reflection = 1
if isinstance(self.specular_reflection, dict): # we have a dictionary with polarization
spec_refl_coeff = np.empty(npol*len(mu1))
spec_refl_coeff[0::npol] = self._get_refl(self.specular_reflection['V'], mu1)
spec_refl_coeff[1::npol] = self._get_refl(self.specular_reflection['H'], mu1)
else: # we have a scalar, both polarization are the same
spec_refl_coeff = np.repeat(self._get_refl(self.specular_reflection, mu1), npol)
return scipy.sparse.diags(spec_refl_coeff, 0)
评论列表
文章目录