Skip to content

Commit

Permalink
Merge pull request #15 from LyceanEM/atmospheric_attenuation
Browse files Browse the repository at this point in the history
Atmospheric attenuation
  • Loading branch information
LyceanEM authored Dec 2, 2024
2 parents 9ba51f9 + 05fc5cf commit e12d363
Show file tree
Hide file tree
Showing 31 changed files with 2,302 additions and 787 deletions.
6 changes: 3 additions & 3 deletions .idea/LyceanEM-Python.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion docs/examples/01_aperture_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@

body, array, _ = data.exampleUAV(10e9)


import pyvista as pv
pl=pv.Plotter()
pl.add_mesh(pv.from_meshio(body),color="green")
pl.add_mesh(pv.from_meshio(array),color="aqua")
pl.show()

# %%
## .. image:: ../_static/open3d_structure.png
Expand All @@ -64,6 +68,10 @@
surface_array.cells[0].data = np.asarray(array.cells[0].data)[: (array.cells[0].data).shape[0] // 2, :]

surface_array.cell_data["Normals"] = np.array(array.cell_data["Normals"])[: (array.cells[0].data).shape[0] // 2]
#Recalculate Normals
from lyceanem.geometry.geometryfunctions import compute_normals
surface_array=compute_normals(surface_array)


# %%
# Structures
Expand Down
10 changes: 8 additions & 2 deletions docs/examples/02_coherently_polarised_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@

import pyvista as pv

pl=pv.Plotter()
pl.add_mesh(pv.from_meshio(body),color="green")
pl.add_mesh(pv.from_meshio(array),color="aqua")
pl.add_axes()
pl.show()

source_points = surface_array.points

Expand All @@ -87,6 +92,7 @@
wavelength=wavelength,
farfield_distance=20,
project_vectors=True,
beta=(2*np.pi)/wavelength
)

# %%
Expand All @@ -105,9 +111,9 @@
azimuth_resolution=az_res, elevation_resolution=elev_res
)
UAV_Static_Pattern.pattern[:, :, 0] = Etheta
UAV_Static_Pattern.pattern[:, :, 0] = Ephi
UAV_Static_Pattern.pattern[:, :, 1] = Ephi

UAV_Static_Pattern.display_pattern()
UAV_Static_Pattern.display_pattern(desired_pattern='Power')

# %%
# .. image:: ../_static/sphx_glr_02_coherently_polarised_array_001.png
Expand Down
5 changes: 3 additions & 2 deletions docs/examples/03_frequency_domain_channel_modelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Frequency and Mesh Resolution
# ------------------------------
#
freq = np.asarray(16.0e9)
freq = np.asarray(22.0e9)
wavelength = 3e8 / freq
mesh_resolution = 0.5 * wavelength

Expand Down Expand Up @@ -165,7 +165,8 @@ def structure_cells(array):
scatter_points=scatter_points,
wavelength=wavelength,
scattering=1,
project_vectors=False
project_vectors=False,
beta=(2*np.pi)/wavelength
)


Expand Down
1 change: 1 addition & 0 deletions docs/examples/04_time_domain_channel_modelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def structure_cells(array):
elements=False,
sampling_freq=sampling_freq,
num_samples=num_samples,
beta=(2 * np.pi) / wavelength
)

noise_volts = np.random.normal(mean_noise, noise_volts_peak, num_samples)
Expand Down
1 change: 1 addition & 0 deletions docs/examples/05_array_beamforming.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
farfield_distance=20,
elements=True,
project_vectors=True,
beta=(2*np.pi)/wavelength
)


Expand Down
2 changes: 2 additions & 0 deletions docs/examples/06_farfield_polarisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
farfield_distance=20,
elements=False,
project_vectors=False,
beta=(2*np.pi)/wavelength
)

# %%
Expand Down Expand Up @@ -117,6 +118,7 @@
farfield_distance=20,
elements=False,
project_vectors=False,
beta=(2*np.pi)/wavelength
)

n_pattern = antenna_pattern(
Expand Down
6 changes: 6 additions & 0 deletions docs/examples/07_aperture_farfield_polarisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
farfield_distance=20,
elements=False,
project_vectors=False,
beta=(2*np.pi)/wavelength
)

# %%
Expand Down Expand Up @@ -89,6 +90,7 @@
farfield_distance=20,
elements=False,
project_vectors=False,
beta=(2*np.pi)/wavelength
)


Expand All @@ -114,6 +116,7 @@
farfield_distance=20,
elements=False,
project_vectors=False,
beta=(2*np.pi)/wavelength
)

n_pattern = antenna_pattern(
Expand Down Expand Up @@ -143,6 +146,7 @@
farfield_distance=20,
elements=False,
project_vectors=False,
beta=(2*np.pi)/wavelength
)
u_pattern.pattern[:, :, 0] = Etheta
u_pattern.pattern[:, :, 1] = Ephi
Expand All @@ -161,6 +165,7 @@
farfield_distance=20,
elements=False,
project_vectors=False,
beta=(2*np.pi)/wavelength
)
v_pattern.pattern[:, :, 0] = Etheta
v_pattern.pattern[:, :, 1] = Ephi
Expand All @@ -179,6 +184,7 @@
farfield_distance=20,
elements=False,
project_vectors=False,
beta=(2*np.pi)/wavelength
)
n_pattern.pattern[:, :, 0] = Etheta
n_pattern.pattern[:, :, 1] = Ephi
Expand Down
Loading

0 comments on commit e12d363

Please sign in to comment.