def __init__(self, sensor, layer):
# Set size of phase matrix: active needs an extended phase matrix
if sensor.mode == 'P':
self.npol = 2
self.m_max = 0
else:
self.npol = 3
self.m_max = 3
# Bring layer and sensor properties into emmodel
self.frac_volume = layer.frac_volume
self.microstructure = layer.microstructure # Do this here, so can pass FT of correlation fn to phase function
self.e0 = layer.permittivity(0, sensor.frequency) # background permittivity
self.eps = layer.permittivity(1, sensor.frequency) # scatterer permittivity
self.k0 = 2 * np.pi * sensor.frequency / C_SPEED # Wavenumber in free space
# Calculate depolarization factors and iba_coefficient
self.depol_xyz = depolarization_factors()
self._effective_permittivity = self.effective_permittivity()
self.iba_coeff = self.compute_iba_coeff()
# Absorption coefficient for general lossy medium under assumption of low-loss medium.
self.ka = self.compute_ka()
# Calculate scattering coefficient: integrate p11+p12 over mu
k = 6 # number of samples. This should be adaptative depending on the size/wavelength
mu = np.linspace(1, -1, 2**k + 1)
y = self.ks_integrand(mu)
ks_int = scipy.integrate.romb(y, mu[0] - mu[1]) # integrate between 0 and pi (i.e. mu between -1 and 1)
self.ks = ks_int / 4. # Ding et al. (2010), normalised by (1/4pi)
assert(self.ks >= 0)
评论列表
文章目录