Skip to content

Commit

Permalink
update header comment in package's __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiim committed Oct 18, 2024
1 parent 985dd61 commit b420b2d
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 22 deletions.
117 changes: 116 additions & 1 deletion doa_py/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,117 @@
__version__ = "0.2.1"
"""
# DOA_py
DOA Estimation algorithms implemented in Python. It can be used for ULA, UCA and
broadband/wideband DOA estimation.
## Getting Started
### Installation
```bash
pip install doa_py
```
or install from source
```bash
git clone https://github.com/zhiim/doa_py.git
cd doa_py
pip install .
```
### Usage
A sample example of DOA estimation using MUSIC algorithm.
```python
import numpy as np
from doa_py import arrays, signals
from doa_py.algorithm import music
from doa_py.plot import plot_spatial_spectrum
# Create a 8-element ULA with 0.5m spacing
ula = arrays.UniformLinearArray(m=8, dd=0.5)
# Create a complex stochastic signal
source = signals.ComplexStochasticSignal(fc=3e8)
# Simulate the received data
received_data = ula.received_signal(
signal=source, snr=0, nsamples=1000, angle_incidence=np.array([0, 30]),
unit="deg"
)
# Calculate the MUSIC spectrum
angle_grids = np.arange(-90, 90, 1)
spectrum = music(
received_data=received_data,
num_signal=2,
array=ula,
signal_fre=3e8,
angle_grids=angle_grids,
unit="deg",
)
# Plot the spatial spectrum
plot_spatial_spectrum(
spectrum=spectrum,
ground_truth=np.array([0, 30]),
angle_grids=angle_grids,
num_signal=2,
)
```
You will a get a figure like this:
![music_spectrum](https://github.com/zhiim/doa_py/blob/master/pics/music_spectrum.svg)
Check `examples` for more examples.
## What's implemented
### Array Structures
- Uniform Linear Array (ULA)
- Uniform Rectangular Array (URA, to be implemented)
- Uniform Circular Array (UCA)
### Signal Models
- Narrowband
**ComplexStochasticSignal**: The amplitude of signals at each sampling point
is a complex random variable.
**RandomFreqSignal**: Signals transmitted by different sources have different
intermediate frequencies (IF).
- Broadband
**ChirpSignal**: Chirp signals with different chirp bandwidths within the
sampling period.
**MultiFreqSignal**: Broadband signals formed by the superposition of multiple
single-frequency signals within a certain frequency band.
### Algorithms
- DOA estimation for ULA
- [x] MUSIC
- [x] ESPRIT
- [x] Root-MUSIC
- [x] OMP
- [x] l1-SVD
- DOA estimation for URA
- [ ] URA-MUSIC
- [ ] URA-ESPRIT
- DOA estimation for UCA
- [x] UCA-RB-MUSIC
- [x] UCA-ESPRIT
- Broadband/Wideband DOA estimation
- [x] ISSM
- [x] CSSM
- [x] TOPS
## License
This project is licensed under the [MIT](LICENSE) License - see the LICENSE
file for details.
"""

__version__ = "0.2.2"
__author__ = "Qian Xu"
43 changes: 22 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
[project]
name = "doa_py"
version = "0.2.1"
version = "0.2.2"
description = "DOA estimation algorithms implemented in Python"
readme = "README.md"
license = {text = "MIT"}
license = { text = "MIT" }
requires-python = ">=3.9"
authors = [
{name = "Qian Xu", email = "[email protected]"},
authors = [{ name = "Qian Xu", email = "[email protected]" }]
maintainers = [{ name = "Qian Xu", email = "[email protected]" }]
keywords = [
"doa",
"direction of arrival",
"doa estimation",
"array signal processing",
]
maintainers = [
{name = "Qian Xu", email = "[email protected]"},
]
keywords = ["doa", "direction of arrival", "doa estimation", "array signal processing"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
urls = {Homepage = "https://github.com/zhiim/doa_py"}
urls = { Homepage = "https://github.com/zhiim/doa_py" }
dependencies = [
"cvxpy>=1.5.3",
"matplotlib>=3.9.2",
"numpy>=2.1.1",
"scikit-image>=0.24.0",
"scipy>=1.14.1",
"cvxpy>=1.5.3",
"matplotlib>=3.9.2",
"numpy>=2.1.1",
"scikit-image>=0.24.0",
"scipy>=1.14.1",
]

0 comments on commit b420b2d

Please sign in to comment.