xmax = 500 gridsize = 250 x0 = np.linspace(-xmax, xmax, gridsize) y0 = np.linspace(-xmax, xmax, gridsize) z0 = 1e3 x, y = np.meshgrid(x0, y0) phi0 = np.linspace(0, 2 * np.pi, gridsize) r0 = np.linspace(0, xmax, gridsize) phi, r = np.meshgrid(phi0, r0) surface = [np.zeros(x.size), np.zeros(x.size), np.zeros(x.size)] pulse = Pulse(surface, 'Ku', x=x0, y=y0, r0=[0, 0, z0]) theta0 = pulse.main() plt.figure() plt.contourf(x, y, theta0.reshape(x.shape)) plt.colorbar() fig, ax = plt.subplots(subplot_kw=dict(projection='polar')) pulse = Pulse(surface, 'Ku', x=r * np.cos(phi), y=r * np.sin(phi), r0=[0, 0, z0]) theta0 = pulse.main() im = ax.contourf(phi, r, theta0.reshape(x.shape)) fig.colorbar(im)
kernel_ku[blockspergrid, threadsperblock](band_ku, x, y, k, offset, phi, A, F, psi) x0 = x0 - offsetx y0 = y0 - offsety z0 = 3e6 c = 3e8 omega = 2 * np.pi * 12e9 k = omega / c timp = 3e-9 T0 = z0 / c T = np.linspace(T0 - timp, np.sqrt(z0**2 + Xmax**2) / c, 200) P = np.zeros(T.size) pulse = Pulse(band_c, 'C', x0, y0, [0, 0, z0], timp=timp) theta0_c = pulse.main() theta0_c = theta0_c.reshape((x.size, y.size)) pulse = Pulse(band_ku, 'Ku', x0, y0, [0, 0, z0], timp=timp) theta0_ku = pulse.main() theta0_ku = theta0_c.reshape((x.size, y.size)) data.export(x0, y0, surface, ku_band=band_ku, c_band=band_c, theta0_c=theta0_c, theta0_ku=theta0_ku) # print(surface.U10)