import pyant ant_n = 55 dr = 2.0 xv, yv = np.meshgrid( np.arange(-ant_n // 2, ant_n // 2) * dr, np.arange(-ant_n // 2, ant_n // 2) * dr, ) antennas = np.zeros((3, ant_n**2)) antennas[0, :] = xv.flatten() antennas[1, :] = yv.flatten() beam = pyant.Array( azimuth=0, elevation=90.0, frequency=46.5e6, antennas=antennas, ) beam_linp = pyant.Array( azimuth=0, elevation=90.0, frequency=46.5e6, polarization=np.array([1, 0]), antennas=antennas, ) k = np.array([0, 0, 1]) km = np.array([[0, 0, 1], [0, 0.1, 0.9], [0, 0.1, 0.8]]).T print(f'Gain LHCP: {beam.gain(k)}')
) beam_2.frequency = beam_2.frequency[1:] pyant.plotting.gain_heatmap(beam, resolution=301, min_elevation=80.0) pyant.plotting.gain_heatmap(beam_2, resolution=301, min_elevation=80.0) pyant.plotting.show() xv, yv = np.meshgrid(np.linspace(-50, 50, num=22), np.linspace(-50, 50, num=22)) antennas = np.zeros((3, 22**2)) antennas[0, :] = xv.flatten() antennas[1, :] = yv.flatten() arr = pyant.Array( azimuth=0, elevation=90.0, frequency=46.5e6, antennas=antennas, ) arr2 = arr.copy() arr2.antennas[:100, 1] += 25 arr2.antennas[:100, 0] -= 25 arr.sph_point( azimuth=0, elevation=80, ) pyant.plotting.gain_heatmap(arr, resolution=301, min_elevation=80.0) pyant.plotting.gain_heatmap(arr2, resolution=301, min_elevation=80.0) pyant.plotting.show()