Tools for dealing with phased arrays
Project description
This is the Phased Array Project.
Python utilities for working with phased array radars.
This is a hobby project for getting familiar with phased array radar beamforming.
Install
Install the normal way:
pip install phased_array
Basic usage
An example that creates a ULA and plots the array factor with Vispy.
You must have a Vispy backend installed to see this; e.g. pip install pyqt6
import vispy.plot as vp
import phased_array
import numpy as np
# spacing between elements
d = 0.05
# number of elements
n = 8
# wavelength
λ = 0.1
# pointing azimuth angle
az = 30
# create a uniform linear array
arr = phased_array.PhasedArray.ula(d, n)
# generate complex weights for pointing at az
weights = arr.weights_at_azel(λ, az, 0)
# sample array factor from -90 to +90.
x = np.linspace(-90, 90, 300)
θ = np.radians(x)
ϕ = np.zeros_like(θ)
af = arr.array_factor(λ, weights, θ, ϕ)
fig = vp.Fig()
plot = fig[0, 0]
af_db = 20 * np.log10(np.abs(af))
af_db -= np.max(af_db)
print("HERE")
plot.plot(
(x, af_db),
marker_size=0.0,
color="blue",
width=2.0,
xlabel="Angle (°)",
ylabel="Array Factor (dB)",
)
print("THERE")
plot.camera.set_range(y=[-40, 0])
print("AHHHHH")
fig.show(run=True)
For a planar array example, see the notebook
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phased_array-0.0.1.tar.gz.
File metadata
- Download URL: phased_array-0.0.1.tar.gz
- Upload date:
- Size: 237.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e18c9349a054317fc1418494c71827716ba44f74faeadec5455539c83e2798f6
|
|
| MD5 |
707c6a0561302117390a44d7b9c7c01f
|
|
| BLAKE2b-256 |
95d5bbf5752703b85f9d65a2d55594bf839098edf5dcbc6e6e9c76f7c3dd0d86
|
File details
Details for the file phased_array-0.0.1-py3-none-any.whl.
File metadata
- Download URL: phased_array-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d453743c339b3a31855df8256a5feee1e720e98291e6e48812a1f4dc047a384f
|
|
| MD5 |
7934f8e30aef7fab16407b08930461af
|
|
| BLAKE2b-256 |
87ef437c1335fa59b63bf2666245ce14bd39e6982e675966d1fc7853687f2af9
|