Double knife-edge diffraction¶
[7]:
import os
os.chdir('../../')
from rwp.kediffraction import *
from rwp.antennas import *
from rwp.environment import *
from rwp.vis import *
Preparing environment
[8]:
env = Troposphere(flat=True)
env.z_max = 150
env.knife_edges = [KnifeEdge(range=200, height=50), KnifeEdge(range=800, height=50)]
antenna = GaussAntenna(freq_hz=300e6, height=50, beam_width=15, elevation_angle=0, polarz='H')
Starting calculation
[9]:
kdc = KnifeEdgeDiffractionCalculator(src=antenna, env=env, max_range_m=1000)
field = kdc.calculate()
Visualising results
[10]:
vis = FieldVisualiser(field, env=env, trans_func=lambda v: 10 * cm.log10(1e-16 + abs(v)), label='ke')
plt = vis.plot2d(min=-40, max=0)
plt.title('The intensity of the field component 10log10|u|')
plt.xlabel('Range (m)')
plt.ylabel('Height (m)')
plt.show()
plt = vis.plot_hor(51)
plt.title('The intensity of the field component 10log10|u| at the height 51 m')
plt.xlabel('Range (m)')
plt.ylabel('10log|u| (dB)')
plt.show()


[ ]: