diff --git a/README.md b/README.md index 756ca5d..859c823 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ [![Downloads](https://static.pepy.tech/personalized-badge/lyceanem?period=total&units=international_system&left_color=black&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/lyceanem) [![status](https://joss.theoj.org/papers/618868c0e8d7e1f7ae6b9f0b4e1e5a2a/status.svg)](https://joss.theoj.org/papers/618868c0e8d7e1f7ae6b9f0b4e1e5a2a) +![LyceanEM Logo](docs/source/_static/LY_logo_RGB_2000px.png) + LyceanEM was conceived to enable rapid assesments of the suitability of difference antenna apertures for a wide range of platforms. This is based upon the use of ray tracing to determine the field of view of points of interest on the platform, whether building, train, plane, or mobile phone handset. Allowing the application of Wheelers formulation of the gain of an aperture. diff --git a/docs/examples/07_aperture_farfield_polarisation.py b/docs/examples/07_aperture_farfield_polarisation.py index 1426200..d8c34cd 100644 --- a/docs/examples/07_aperture_farfield_polarisation.py +++ b/docs/examples/07_aperture_farfield_polarisation.py @@ -25,8 +25,8 @@ # The wavelength of interest is also an important variable for antenna array analysis, so we set it now for 10GHz, # an X band aperture. -az_res = 37 -elev_res = 37 +az_res = 181 +elev_res = 73 wavelength = 3e8 / 10e9 # %% @@ -40,6 +40,7 @@ horn_antenna=antenna_structures(structures(solids=[structure]), points(points=[array_points])) +horn_antenna.visualise_antenna() from lyceanem.models.frequency_domain import calculate_farfield @@ -125,8 +126,12 @@ # %% # The point source can then be rotated, by providing a rotation matrix, and the u,v,n directions are moved with it in a consistent way. +from scipy.spatial.transform import Rotation as R + +r=R.from_euler('xyz', np.radians(np.asarray([45.0,45.0,0.0]))) +horn_antenna.rotate_antenna(r.as_matrix()) +horn_antenna.visualise_antenna() -horn_antenna.rotate_antenna(o3d.geometry.get_rotation_matrix_from_axis_angle(np.radians(np.asarray([45.0,0.0,0.0])))) desired_E_axis = np.zeros((1, 3), dtype=np.complex64) desired_E_axis[0, 0] = 1.0 diff --git a/docs/examples/08_beamforming_architecture.py b/docs/examples/08_beamforming_architecture.py index 6907a8d..82056e8 100644 --- a/docs/examples/08_beamforming_architecture.py +++ b/docs/examples/08_beamforming_architecture.py @@ -26,7 +26,7 @@ # The wavelength of interest is also an important variable for antenna array analysis, so we set it now for 10GHz, # an X band aperture. -az_res = 181 +az_res = 37 elev_res = 37 wavelength = 3e8 / 10e9 diff --git a/docs/source/_static/LY_logo_RGB_2000px.png b/docs/source/_static/LY_logo_RGB_2000px.png new file mode 100644 index 0000000..85b90c8 Binary files /dev/null and b/docs/source/_static/LY_logo_RGB_2000px.png differ diff --git a/docs/source/index.rst b/docs/source/index.rst index 5de4eed..1e46c29 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,8 +6,8 @@ Welcome to LyceanEM's documentation! ==================================== -.. image:: _static/lynx.png - :width: 200px +.. image:: _static/LY_logo_RGB_2000px.png + :width: 300px :align: center :alt: LyceanEM Logo diff --git a/lyceanem/electromagnetics/beamforming.py b/lyceanem/electromagnetics/beamforming.py index 2cf5e54..3787084 100644 --- a/lyceanem/electromagnetics/beamforming.py +++ b/lyceanem/electromagnetics/beamforming.py @@ -4,6 +4,7 @@ import mpl_toolkits.mplot3d.art3d as art3d import numpy as np import open3d as o3d +import pylab as pl import scipy.stats from matplotlib import cm from matplotlib.patches import Wedge @@ -101,7 +102,7 @@ def ArbitaryCoherenceWeights(source_coords, target_coord, wavelength): """ Generate Wavefront coherence weights based upon the desired wavelength and the coordinates of the target point """ - weights = np.zeros((len(source_coords)), dtype=np.complex64) + weights = np.zeros((len(source_coords),1), dtype=np.complex64) # calculate distances of coords from steering_vector by using it to calculate arbitarily distant point dist = distance.cdist(source_coords, target_coord) dist = dist - np.min(dist) @@ -1399,6 +1400,7 @@ def PatternPlot2D( ticknum=6, line_labels=None, title_text=None, + fontsize=16, ): # condition data data = np.abs(data) @@ -1426,6 +1428,7 @@ def PatternPlot2D( logdata[logdata <= pattern_min] = pattern_min tick_marks = np.linspace(pattern_min, plot_max, ticknum) az_rad = np.radians(az) + pl.rcParams.update({'font.size':fontsize}) fig, ax = plt.subplots(subplot_kw={"projection": "polar"}) if multiline == True: for line in range(num_lines): @@ -1437,7 +1440,7 @@ def PatternPlot2D( ax.plot(az_rad, logdata) ax.set_rmax(plot_max) - ax.set_rticks(tick_marks) # Less radial ticks + ax.set_rticks(tick_marks,fontsize=fontsize) # Less radial ticks ax.set_rlabel_position(-22.5) # Move radial labels away from plotted line ax.grid(True) if not (line_labels == None): @@ -1449,10 +1452,11 @@ def PatternPlot2D( 0.5 + np.cos(legend_angle) / 2, 0.5 + np.sin(legend_angle) / 2, ), + fontsize = fontsize, ) if not (title_text == None): - ax.set_title(title_text, va="bottom") + ax.set_title(title_text, va="bottom",fontsize=fontsize) label_angle = np.deg2rad(280) ax.text(label_angle, plot_max * 1.2, bar_label)