<div align="left">
<img src="pics/doa_py.svg" alt="DOA_Py logo" width="20%">
</div>
# 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:

Check [examples](https://github.com/zhiim/doa_py/tree/master/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.
- _MixedSignal_: Narrorband and broadband mixed signal
### 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/zhiim/doa_py",
"name": "doa-py",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Qian Xu <xuq3196@outlook.com>",
"keywords": "doa, direction of arrival, doa estimation, array signal processing",
"author": "Qian Xu",
"author_email": "Qian Xu <xuq3196@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/a7/59/87465b025076f020839cc073d751622187ea0e4af37f9da7b74ac35de5da/doa_py-0.3.0.tar.gz",
"platform": null,
"description": "<div align=\"left\">\n <img src=\"pics/doa_py.svg\" alt=\"DOA_Py logo\" width=\"20%\">\n</div>\n\n# DOA_Py\n\nDOA Estimation algorithms implemented in Python. It can be used for ULA, UCA and broadband/wideband DOA estimation.\n\n## Getting Started\n\n### Installation\n\n```bash\npip install doa_py\n```\n\nor install from source\n\n```bash\ngit clone https://github.com/zhiim/doa_py.git\ncd doa_py\npip install .\n```\n\n### Usage\n\nA sample example of DOA estimation using MUSIC algorithm.\n\n```python\nimport numpy as np\n\nfrom doa_py import arrays, signals\nfrom doa_py.algorithm import music\nfrom doa_py.plot import plot_spatial_spectrum\n\n# Create a 8-element ULA with 0.5m spacing\nula = arrays.UniformLinearArray(m=8, dd=0.5)\n# Create a complex stochastic signal\nsource = signals.ComplexStochasticSignal(fc=3e8)\n\n# Simulate the received data\nreceived_data = ula.received_signal(\n signal=source, snr=0, nsamples=1000, angle_incidence=np.array([0, 30]), unit=\"deg\"\n)\n\n# Calculate the MUSIC spectrum\nangle_grids = np.arange(-90, 90, 1)\nspectrum = music(\n received_data=received_data,\n num_signal=2,\n array=ula,\n signal_fre=3e8,\n angle_grids=angle_grids,\n unit=\"deg\",\n)\n\n# Plot the spatial spectrum\nplot_spatial_spectrum(\n spectrum=spectrum,\n ground_truth=np.array([0, 30]),\n angle_grids=angle_grids,\n num_signal=2,\n)\n```\n\nYou will a get a figure like this:\n\n\nCheck [examples](https://github.com/zhiim/doa_py/tree/master/examples) for more examples.\n\n## What's implemented\n\n### Array Structures\n\n- Uniform Linear Array (ULA)\n- Uniform Rectangular Array (URA, to be implemented)\n- Uniform Circular Array (UCA)\n\n### Signal Models\n\n- **Narrowband**\n - _ComplexStochasticSignal_: The amplitude of signals at each sampling point is a complex random variable.\n - _RandomFreqSignal_: Signals transmitted by different sources have different intermediate frequencies (IF).\n- **Broadband**\n - _ChirpSignal_: Chirp signals with different chirp bandwidths within the sampling period.\n - _MultiFreqSignal_: Broadband signals formed by the superposition of multiple single-frequency signals within a certain frequency band.\n - _MixedSignal_: Narrorband and broadband mixed signal\n\n### Algorithms\n\n- DOA estimation for ULA\n - [x] MUSIC\n - [x] ESPRIT\n - [x] Root-MUSIC\n - [x] OMP\n - [x] l1-SVD\n- DOA estimation for URA\n - [ ] URA-MUSIC\n - [ ] URA-ESPRIT\n- DOA estimation for UCA\n - [x] UCA-RB-MUSIC\n - [x] UCA-ESPRIT\n- Broadband/Wideband DOA estimation\n - [x] ISSM\n - [x] CSSM\n - [x] TOPS\n\n## License\n\nThis project is licensed under the [MIT](LICENSE) License - see the LICENSE file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "DOA estimation algorithms implemented in Python",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/zhiim/doa_py"
},
"split_keywords": [
"doa",
" direction of arrival",
" doa estimation",
" array signal processing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4281a096ccd65b70529bfc2f92f8cc1169be9da7e126fe782bc65297169a03c2",
"md5": "6cc039bb99c4f7f733608427b8bb6407",
"sha256": "1e699c06d8813ebd6f57d5aa3a3b7392ec8183f5da52f54d6597ba02ac7f68f4"
},
"downloads": -1,
"filename": "doa_py-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6cc039bb99c4f7f733608427b8bb6407",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 21214,
"upload_time": "2024-12-25T13:38:46",
"upload_time_iso_8601": "2024-12-25T13:38:46.219109Z",
"url": "https://files.pythonhosted.org/packages/42/81/a096ccd65b70529bfc2f92f8cc1169be9da7e126fe782bc65297169a03c2/doa_py-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a75987465b025076f020839cc073d751622187ea0e4af37f9da7b74ac35de5da",
"md5": "74150f90b23bc12f547791999da44990",
"sha256": "99b280eddade8196358e69f317a88dfee66f2bd510ad4021e33134efeed115c9"
},
"downloads": -1,
"filename": "doa_py-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "74150f90b23bc12f547791999da44990",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 17335,
"upload_time": "2024-12-25T13:38:48",
"upload_time_iso_8601": "2024-12-25T13:38:48.354136Z",
"url": "https://files.pythonhosted.org/packages/a7/59/87465b025076f020839cc073d751622187ea0e4af37f9da7b74ac35de5da/doa_py-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-25 13:38:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zhiim",
"github_project": "doa_py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "doa-py"
}