def get_radar_variables_Exponential_fwScattering(N0=None, Lambda=None, D_max=None): scatterer.psd = psd.ExponentialPSD(N0=N0, Lambda=Lambda, D_max=D_max) return [ radar.Ai(scatterer, h_pol=True), radar.Ai(scatterer, h_pol=False), radar.Kdp(scatterer) ]
def test_integrated_x_sca(self): """Test Rayleigh scattering cross section integrated over sizes. """ m = complex(3.0, 0.5) K = (m**2 - 1) / (m**2 + 2) N0 = 10 Lambda = 1e4 sca = Scatterer(wavelength=1, m=m) sca.psd_integrator = psd.PSDIntegrator() sca.psd = psd.ExponentialPSD(N0=N0, Lambda=Lambda) sca.psd.D_max = 0.002 sca.psd_integrator.D_max = sca.psd.D_max # 256 is quite low, but we want to run the test reasonably fast sca.psd_integrator.num_points = 256 sca.psd_integrator.init_scatter_table(sca, angular_integration=True) # This size-integrated scattering cross section has an analytical value. # Check that we can reproduce it. sca_xsect_ref = 480 * N0 * np.pi**5 * abs(K)**2 / Lambda**7 sca_xsect = scatter.sca_xsect(sca) test_less(self, abs(1 - sca_xsect / sca_xsect_ref), 1e-3)
def get_radar_variables_Exponential(N0=None, Lambda=None, D_max=None): scatterer.psd = psd.ExponentialPSD(N0=N0, Lambda=Lambda, D_max=D_max) return [ 10. * np.log10(radar.refl(scatterer)), 10. * np.log10(radar.Zdr(scatterer)) ]
fig, (ax1,ax2,ax3) = plt.subplots(3,1)#,sharex=True) Zdr_array = [] Z_array = [] for wl in wavelengths: ref_func = m_rho_func(wl) for lamb in lambdas: scatterer = tmatrix.Scatterer(wavelength=wl, axis_ratio=1.0/ar, Kw_sqr=tmatrix_aux.K_w_sqr[wl]) scatterer.psd_integrator = psd.PSDIntegrator() scatterer.psd_integrator.m_func = ref_func scatterer.psd_integrator.geometries=[tmatrix_aux.geom_horiz_back,tmatrix_aux.geom_horiz_forw,] scatterer.set_geometry(tmatrix_aux.geom_horiz_back) scatterer.psd = psd.ExponentialPSD(N0=1.0,Lambda=lamb,D_max=20.0) scatterer.psd_integrator.D_max = 20.0 scatterer.psd_integrator.init_scatter_table(scatterer) Zdr = 10.0*np.log10(radar.Zdr(scatterer)) scatterer.set_geometry(tmatrix_aux.geom_horiz_forw) W = np.pi*1e3*(1.0/lamb)**4 Kdp = 1.0e6*radar.Kdp(scatterer)/W Zdr_array.append(Zdr) Z_array.append(Kdp) ax1.plot(D0s,Zdr_array,label=wl) ax2.plot(D0s,Z_array,label=wl) Zdr_array = [] Z_array = [] ax1.legend() ax1.grid() ax2.grid()
def get_radar_variables_Exponential(N0=None,Lambda=None,D_max=None): scatterer.psd = psd.ExponentialPSD(N0=N0, Lambda=Lambda, D_max=D_max) return [radar.refl(scatterer), radar.Zdr(scatterer), radar.ldr(scatterer)]