phased-array-systems 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phased_array_systems-0.1.0/.github/workflows/ci.yml +71 -0
- phased_array_systems-0.1.0/.github/workflows/publish.yml +32 -0
- phased_array_systems-0.1.0/.gitignore +146 -0
- phased_array_systems-0.1.0/CLAUDE.md +98 -0
- phased_array_systems-0.1.0/LICENSE +21 -0
- phased_array_systems-0.1.0/PKG-INFO +174 -0
- phased_array_systems-0.1.0/README.md +132 -0
- phased_array_systems-0.1.0/examples/01_comms_single_case.py +208 -0
- phased_array_systems-0.1.0/examples/02_comms_doe_trade.py +307 -0
- phased_array_systems-0.1.0/examples/configs/comms_basic.yaml +75 -0
- phased_array_systems-0.1.0/examples/configs/comms_doe.yaml +87 -0
- phased_array_systems-0.1.0/notebooks/tutorial_phased_array_trade_study.ipynb +688 -0
- phased_array_systems-0.1.0/package_design_and_requirements.txt +531 -0
- phased_array_systems-0.1.0/pyproject.toml +84 -0
- phased_array_systems-0.1.0/ruff.toml +38 -0
- phased_array_systems-0.1.0/src/phased_array_systems/__about__.py +4 -0
- phased_array_systems-0.1.0/src/phased_array_systems/__init__.py +10 -0
- phased_array_systems-0.1.0/src/phased_array_systems/architecture/__init__.py +15 -0
- phased_array_systems-0.1.0/src/phased_array_systems/architecture/config.py +152 -0
- phased_array_systems-0.1.0/src/phased_array_systems/cli.py +25 -0
- phased_array_systems-0.1.0/src/phased_array_systems/constants.py +55 -0
- phased_array_systems-0.1.0/src/phased_array_systems/evaluate.py +136 -0
- phased_array_systems-0.1.0/src/phased_array_systems/io/__init__.py +13 -0
- phased_array_systems-0.1.0/src/phased_array_systems/io/config_loader.py +86 -0
- phased_array_systems-0.1.0/src/phased_array_systems/io/exporters.py +171 -0
- phased_array_systems-0.1.0/src/phased_array_systems/io/schema.py +145 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/__init__.py +5 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/antenna/__init__.py +15 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/antenna/adapter.py +190 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/antenna/metrics.py +166 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/base.py +30 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/comms/__init__.py +9 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/comms/link_budget.py +171 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/comms/propagation.py +84 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/swapc/__init__.py +9 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/swapc/cost.py +98 -0
- phased_array_systems-0.1.0/src/phased_array_systems/models/swapc/power.py +102 -0
- phased_array_systems-0.1.0/src/phased_array_systems/requirements/__init__.py +15 -0
- phased_array_systems-0.1.0/src/phased_array_systems/requirements/core.py +244 -0
- phased_array_systems-0.1.0/src/phased_array_systems/scenarios/__init__.py +11 -0
- phased_array_systems-0.1.0/src/phased_array_systems/scenarios/base.py +30 -0
- phased_array_systems-0.1.0/src/phased_array_systems/scenarios/comms.py +56 -0
- phased_array_systems-0.1.0/src/phased_array_systems/scenarios/radar.py +42 -0
- phased_array_systems-0.1.0/src/phased_array_systems/trades/__init__.py +16 -0
- phased_array_systems-0.1.0/src/phased_array_systems/trades/design_space.py +241 -0
- phased_array_systems-0.1.0/src/phased_array_systems/trades/doe.py +146 -0
- phased_array_systems-0.1.0/src/phased_array_systems/trades/pareto.py +266 -0
- phased_array_systems-0.1.0/src/phased_array_systems/trades/runner.py +245 -0
- phased_array_systems-0.1.0/src/phased_array_systems/types.py +54 -0
- phased_array_systems-0.1.0/src/phased_array_systems/utils/__init__.py +8 -0
- phased_array_systems-0.1.0/src/phased_array_systems/utils/hashing.py +70 -0
- phased_array_systems-0.1.0/src/phased_array_systems/viz/__init__.py +9 -0
- phased_array_systems-0.1.0/src/phased_array_systems/viz/plots.py +324 -0
- phased_array_systems-0.1.0/tests/__init__.py +1 -0
- phased_array_systems-0.1.0/tests/test_antenna_adapter.py +179 -0
- phased_array_systems-0.1.0/tests/test_architecture.py +148 -0
- phased_array_systems-0.1.0/tests/test_comms_link_budget.py +208 -0
- phased_array_systems-0.1.0/tests/test_doe.py +206 -0
- phased_array_systems-0.1.0/tests/test_evaluate.py +219 -0
- phased_array_systems-0.1.0/tests/test_pareto.py +287 -0
- phased_array_systems-0.1.0/tests/test_requirements.py +233 -0
- phased_array_systems-0.1.0/tests/test_runner.py +225 -0
- phased_array_systems-0.1.0/tests/test_swapc.py +198 -0
- phased_array_systems-0.1.0/tests/test_viz.py +168 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install -e ".[dev]"
|
|
29
|
+
pip install pyarrow # For parquet tests
|
|
30
|
+
|
|
31
|
+
- name: Run linting with Ruff
|
|
32
|
+
run: |
|
|
33
|
+
ruff check . --output-format=github
|
|
34
|
+
|
|
35
|
+
- name: Run tests with pytest
|
|
36
|
+
run: |
|
|
37
|
+
pytest tests/ -v --tb=short --cov=phased_array_systems --cov-report=xml
|
|
38
|
+
|
|
39
|
+
- name: Upload coverage to Codecov
|
|
40
|
+
uses: codecov/codecov-action@v4
|
|
41
|
+
if: matrix.python-version == '3.12'
|
|
42
|
+
with:
|
|
43
|
+
files: ./coverage.xml
|
|
44
|
+
fail_ci_if_error: false
|
|
45
|
+
|
|
46
|
+
build:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
|
|
51
|
+
- name: Set up Python
|
|
52
|
+
uses: actions/setup-python@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: "3.12"
|
|
55
|
+
|
|
56
|
+
- name: Install build dependencies
|
|
57
|
+
run: |
|
|
58
|
+
python -m pip install --upgrade pip
|
|
59
|
+
pip install build twine
|
|
60
|
+
|
|
61
|
+
- name: Build package
|
|
62
|
+
run: python -m build
|
|
63
|
+
|
|
64
|
+
- name: Check package
|
|
65
|
+
run: twine check dist/*
|
|
66
|
+
|
|
67
|
+
- name: Upload build artifacts
|
|
68
|
+
uses: actions/upload-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: dist
|
|
71
|
+
path: dist/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
environment: pypi
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write # Required for trusted publishing
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Install build dependencies
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
pip install build
|
|
26
|
+
|
|
27
|
+
- name: Build package
|
|
28
|
+
run: python -m build
|
|
29
|
+
|
|
30
|
+
- name: Publish to PyPI
|
|
31
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
32
|
+
# Uses trusted publishing - no token needed if configured on PyPI
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
|
|
51
|
+
# Translations
|
|
52
|
+
*.mo
|
|
53
|
+
*.pot
|
|
54
|
+
|
|
55
|
+
# Django stuff:
|
|
56
|
+
*.log
|
|
57
|
+
local_settings.py
|
|
58
|
+
db.sqlite3
|
|
59
|
+
db.sqlite3-journal
|
|
60
|
+
|
|
61
|
+
# Flask stuff:
|
|
62
|
+
instance/
|
|
63
|
+
.webassets-cache
|
|
64
|
+
|
|
65
|
+
# Scrapy stuff:
|
|
66
|
+
.scrapy
|
|
67
|
+
|
|
68
|
+
# Sphinx documentation
|
|
69
|
+
docs/_build/
|
|
70
|
+
|
|
71
|
+
# PyBuilder
|
|
72
|
+
.pybuilder/
|
|
73
|
+
target/
|
|
74
|
+
|
|
75
|
+
# Jupyter Notebook
|
|
76
|
+
.ipynb_checkpoints
|
|
77
|
+
|
|
78
|
+
# IPython
|
|
79
|
+
profile_default/
|
|
80
|
+
ipython_config.py
|
|
81
|
+
|
|
82
|
+
# pyenv
|
|
83
|
+
.python-version
|
|
84
|
+
|
|
85
|
+
# pipenv
|
|
86
|
+
Pipfile.lock
|
|
87
|
+
|
|
88
|
+
# PEP 582
|
|
89
|
+
__pypackages__/
|
|
90
|
+
|
|
91
|
+
# Celery stuff
|
|
92
|
+
celerybeat-schedule
|
|
93
|
+
celerybeat.pid
|
|
94
|
+
|
|
95
|
+
# SageMath parsed files
|
|
96
|
+
*.sage.py
|
|
97
|
+
|
|
98
|
+
# Environments
|
|
99
|
+
.env
|
|
100
|
+
.venv
|
|
101
|
+
env/
|
|
102
|
+
venv/
|
|
103
|
+
ENV/
|
|
104
|
+
env.bak/
|
|
105
|
+
venv.bak/
|
|
106
|
+
|
|
107
|
+
# Spyder project settings
|
|
108
|
+
.spyderproject
|
|
109
|
+
.spyproject
|
|
110
|
+
|
|
111
|
+
# Rope project settings
|
|
112
|
+
.ropeproject
|
|
113
|
+
|
|
114
|
+
# mkdocs documentation
|
|
115
|
+
/site
|
|
116
|
+
|
|
117
|
+
# mypy
|
|
118
|
+
.mypy_cache/
|
|
119
|
+
.dmypy.json
|
|
120
|
+
dmypy.json
|
|
121
|
+
|
|
122
|
+
# Pyre type checker
|
|
123
|
+
.pyre/
|
|
124
|
+
|
|
125
|
+
# pytype static type analyzer
|
|
126
|
+
.pytype/
|
|
127
|
+
|
|
128
|
+
# Cython debug symbols
|
|
129
|
+
cython_debug/
|
|
130
|
+
|
|
131
|
+
# IDE
|
|
132
|
+
.idea/
|
|
133
|
+
.vscode/
|
|
134
|
+
*.swp
|
|
135
|
+
*.swo
|
|
136
|
+
*~
|
|
137
|
+
|
|
138
|
+
# OS
|
|
139
|
+
.DS_Store
|
|
140
|
+
Thumbs.db
|
|
141
|
+
|
|
142
|
+
# Project specific
|
|
143
|
+
results/
|
|
144
|
+
*.parquet
|
|
145
|
+
*.csv
|
|
146
|
+
!examples/configs/*.yaml
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
`phased-array-systems` is an open-source Python package for phased array antenna system design, optimization, and performance visualization for wireless communications and radar applications. It implements an MBSE/MDAO workflow: requirements → architecture → analytical models → trade studies → Pareto selection → reporting.
|
|
8
|
+
|
|
9
|
+
**Core dependency:** `phased-array-modeling>=1.2.0` (provides array geometries, steering, tapering, impairments, and pattern visualization)
|
|
10
|
+
|
|
11
|
+
**Project status:** Design phase (no code implemented yet). See `package_design_and_requirements.txt` for the complete SDD.
|
|
12
|
+
|
|
13
|
+
## Build & Development Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Installation (once implemented)
|
|
17
|
+
pip install phased-array-systems
|
|
18
|
+
pip install phased-array-systems[dev] # Development deps (pytest, ruff, mypy)
|
|
19
|
+
pip install phased-array-systems[plotting] # Visualization (plotly, kaleido)
|
|
20
|
+
|
|
21
|
+
# Testing
|
|
22
|
+
pytest tests/
|
|
23
|
+
pytest tests/test_comms_link_budget.py -v
|
|
24
|
+
pytest tests/ --cov=phased_array_systems
|
|
25
|
+
|
|
26
|
+
# Linting & Formatting
|
|
27
|
+
ruff check .
|
|
28
|
+
ruff format .
|
|
29
|
+
mypy src/phased_array_systems
|
|
30
|
+
|
|
31
|
+
# CLI (planned)
|
|
32
|
+
pasys run config.yaml # Single case evaluation
|
|
33
|
+
pasys doe config.yaml # DOE batch study
|
|
34
|
+
pasys pareto results.parquet --x cost_usd --y eirp_dbw
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Architecture
|
|
38
|
+
|
|
39
|
+
### Layer Structure
|
|
40
|
+
- **Layer 0:** `phased-array-modeling` (external) - EM/pattern computations
|
|
41
|
+
- **Layer 1:** This package - system models, trade studies, optimization
|
|
42
|
+
- **Layer 2:** Interfaces - Python API, CLI, config I/O
|
|
43
|
+
|
|
44
|
+
### Package Layout (`src/phased_array_systems/`)
|
|
45
|
+
- `requirements/` - Constraint/objective definitions, verification reports
|
|
46
|
+
- `architecture/` - ArrayConfig, RFChainConfig, PowerThermalConfig, CostConfig
|
|
47
|
+
- `models/antenna/` - Adapter wrapping `phased-array-modeling`, pattern metrics extraction
|
|
48
|
+
- `models/comms/` - Link budget (SNR, margin, EIRP), propagation models
|
|
49
|
+
- `models/radar/` - Radar equation, PD/PFA threshold helpers, integration gains
|
|
50
|
+
- `models/swapc/` - Power, thermal, and cost models
|
|
51
|
+
- `trades/` - DOE generation, batch runner, Pareto extraction, optimization
|
|
52
|
+
- `viz/` - Plots (Pareto, scatter-matrix), HTML/Markdown report generation
|
|
53
|
+
- `io/` - Config loading (YAML/JSON), results export (Parquet/CSV)
|
|
54
|
+
- `cli.py` - `pasys` command entrypoint
|
|
55
|
+
|
|
56
|
+
### Core Contracts
|
|
57
|
+
|
|
58
|
+
**ModelBlock Protocol:**
|
|
59
|
+
```python
|
|
60
|
+
class ModelBlock(Protocol):
|
|
61
|
+
name: str
|
|
62
|
+
def evaluate(self, arch: Architecture, scenario: Scenario, context: dict) -> dict:
|
|
63
|
+
"""Returns flat metrics dict"""
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Canonical Metrics Dictionary** (universal exchange format):
|
|
67
|
+
- Antenna: `g_peak_db`, `beamwidth_az_deg`, `beamwidth_el_deg`, `sll_db`, `scan_loss_db`
|
|
68
|
+
- Comms: `eirp_dbw`, `path_loss_db`, `snr_rx_db`, `link_margin_db`
|
|
69
|
+
- Radar: `snr_single_pulse_db`, `snr_required_db`, `snr_margin_db`, `pd`, `pfa`
|
|
70
|
+
- SWaP-C: `prime_power_w`, `weight_kg`, `cost_usd`
|
|
71
|
+
- Metadata: `meta.case_id`, `meta.runtime_s`, `meta.seed`, `meta.error`
|
|
72
|
+
|
|
73
|
+
### Data Flow
|
|
74
|
+
```
|
|
75
|
+
Config (YAML/JSON) → Pydantic validation → [Architecture + Scenario + RequirementSet]
|
|
76
|
+
→ DOE case generation → Batch evaluation (parallel, cached)
|
|
77
|
+
→ Requirement verification → Pareto extraction → Visualization/Reports
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Design Principles
|
|
81
|
+
|
|
82
|
+
1. **Requirements as first-class objects** - Every run produces pass/fail + margins with traceability
|
|
83
|
+
2. **Trade-space first** - DOE + Pareto over single-point designs; grey-out infeasible cases
|
|
84
|
+
3. **Flat metrics dictionary** - All models return consistent `dict[str, float]` for interchange
|
|
85
|
+
4. **Config-driven reproducibility** - Stable case IDs, seed control, version stamping
|
|
86
|
+
5. **Safe configs** - No `eval()`, data-driven configs only
|
|
87
|
+
6. **Case-level error handling** - DOE runs never crash for single-case failures
|
|
88
|
+
|
|
89
|
+
## Implementation Phases
|
|
90
|
+
|
|
91
|
+
1. **Phase 1 (MVP):** Schemas, config loader, requirements verification, antenna adapter, comms link budget
|
|
92
|
+
2. **Phase 2:** DOE generator, batch runner with resume, Pareto extraction, plots, Parquet export
|
|
93
|
+
3. **Phase 3:** Radar equation, detection threshold helpers, radar trade examples
|
|
94
|
+
4. **Phase 4:** CLI (`pasys`), HTML/Markdown report generation, PyPI publish
|
|
95
|
+
|
|
96
|
+
## Future Goals
|
|
97
|
+
|
|
98
|
+
**Interactive Web Application:** The package is designed to eventually power an interactive Streamlit or Vercel webapp for browser-based trade studies and visualization. Keep the core logic decoupled from CLI/reporting concerns to facilitate web integration.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 John Hodge
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phased-array-systems
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Phased array antenna system design, optimization, and performance visualization
|
|
5
|
+
Project-URL: Homepage, https://github.com/jman4162/phased-array-systems
|
|
6
|
+
Project-URL: Documentation, https://github.com/jman4162/phased-array-systems#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/jman4162/phased-array-systems
|
|
8
|
+
Project-URL: Issues, https://github.com/jman4162/phased-array-systems/issues
|
|
9
|
+
Author: phased-array-systems contributors
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: RF,antenna,communications,optimization,phased array,radar,system design,trade study
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: matplotlib>=3.7.0
|
|
26
|
+
Requires-Dist: numpy>=1.24.0
|
|
27
|
+
Requires-Dist: pandas>=2.0.0
|
|
28
|
+
Requires-Dist: phased-array-modeling>=1.2.0
|
|
29
|
+
Requires-Dist: pydantic>=2.0
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Requires-Dist: scipy>=1.10.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: mypy>=1.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pandas-stubs>=2.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
38
|
+
Provides-Extra: plotting
|
|
39
|
+
Requires-Dist: kaleido>=0.2; extra == 'plotting'
|
|
40
|
+
Requires-Dist: plotly>=5.0; extra == 'plotting'
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
|
|
43
|
+
# phased-array-systems
|
|
44
|
+
|
|
45
|
+
[](https://github.com/jman4162/phased-array-systems/actions/workflows/ci.yml)
|
|
46
|
+
[](https://badge.fury.io/py/phased-array-systems)
|
|
47
|
+
[](https://www.python.org/downloads/)
|
|
48
|
+
[](https://opensource.org/licenses/MIT)
|
|
49
|
+
|
|
50
|
+
Phased array antenna system design, optimization, and performance visualization for wireless communications and radar applications.
|
|
51
|
+
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
- **Requirements as first-class objects**: Every run produces pass/fail + margins with traceability
|
|
55
|
+
- **Trade-space exploration**: DOE + Pareto optimization over single-point designs
|
|
56
|
+
- **Flat metrics dictionary**: All models return consistent `dict[str, float]` for interchange
|
|
57
|
+
- **Config-driven reproducibility**: Stable case IDs, seed control, version stamping
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install phased-array-systems
|
|
63
|
+
|
|
64
|
+
# Development dependencies
|
|
65
|
+
pip install phased-array-systems[dev]
|
|
66
|
+
|
|
67
|
+
# Visualization extras
|
|
68
|
+
pip install phased-array-systems[plotting]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Quick Start
|
|
72
|
+
|
|
73
|
+
### Single Case Evaluation
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from phased_array_systems.architecture import Architecture, ArrayConfig, RFChainConfig
|
|
77
|
+
from phased_array_systems.scenarios import CommsLinkScenario
|
|
78
|
+
from phased_array_systems.evaluate import evaluate_case
|
|
79
|
+
|
|
80
|
+
# Define architecture
|
|
81
|
+
arch = Architecture(
|
|
82
|
+
array=ArrayConfig(nx=8, ny=8, dx_lambda=0.5, dy_lambda=0.5),
|
|
83
|
+
rf=RFChainConfig(tx_power_w_per_elem=1.0, pa_efficiency=0.3),
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
# Define scenario
|
|
87
|
+
scenario = CommsLinkScenario(
|
|
88
|
+
freq_hz=10e9,
|
|
89
|
+
bandwidth_hz=10e6,
|
|
90
|
+
range_m=100e3,
|
|
91
|
+
required_snr_db=10.0,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Evaluate
|
|
95
|
+
metrics = evaluate_case(arch, scenario)
|
|
96
|
+
print(f"EIRP: {metrics['eirp_dbw']:.1f} dBW")
|
|
97
|
+
print(f"Link Margin: {metrics['link_margin_db']:.1f} dB")
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### DOE Trade Study
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from phased_array_systems.trades import DesignSpace, generate_doe, BatchRunner, extract_pareto
|
|
104
|
+
|
|
105
|
+
# Define design space
|
|
106
|
+
space = (
|
|
107
|
+
DesignSpace()
|
|
108
|
+
.add_variable("array.nx", "int", low=4, high=16)
|
|
109
|
+
.add_variable("array.ny", "int", low=4, high=16)
|
|
110
|
+
.add_variable("rf.tx_power_w_per_elem", "float", low=0.5, high=3.0)
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
# Generate DOE
|
|
114
|
+
doe = generate_doe(space, method="lhs", n_samples=100, seed=42)
|
|
115
|
+
|
|
116
|
+
# Run batch evaluation
|
|
117
|
+
runner = BatchRunner(scenario)
|
|
118
|
+
results = runner.run(doe)
|
|
119
|
+
|
|
120
|
+
# Extract Pareto frontier
|
|
121
|
+
pareto = extract_pareto(results, [
|
|
122
|
+
("cost_usd", "minimize"),
|
|
123
|
+
("eirp_dbw", "maximize"),
|
|
124
|
+
])
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Examples
|
|
128
|
+
|
|
129
|
+
See the `examples/` directory:
|
|
130
|
+
- `01_comms_single_case.py` - Single case evaluation
|
|
131
|
+
- `02_comms_doe_trade.py` - Full DOE trade study workflow
|
|
132
|
+
|
|
133
|
+
### Tutorial Notebook
|
|
134
|
+
|
|
135
|
+
[](https://colab.research.google.com/github/jman4162/phased-array-systems/blob/main/notebooks/tutorial_phased_array_trade_study.ipynb)
|
|
136
|
+
|
|
137
|
+
Try the interactive tutorial in Google Colab!
|
|
138
|
+
|
|
139
|
+
## Package Structure
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
phased_array_systems/
|
|
143
|
+
├── architecture/ # Array, RF chain, cost configurations
|
|
144
|
+
├── scenarios/ # CommsLinkScenario, RadarDetectionScenario
|
|
145
|
+
├── requirements/ # Requirement definitions and verification
|
|
146
|
+
├── models/
|
|
147
|
+
│ ├── antenna/ # Phased array adapter and metrics
|
|
148
|
+
│ ├── comms/ # Link budget, propagation models
|
|
149
|
+
│ └── swapc/ # Power and cost models
|
|
150
|
+
├── trades/ # DOE, batch runner, Pareto analysis
|
|
151
|
+
├── viz/ # Plotting utilities
|
|
152
|
+
└── io/ # Config loading, results export
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Development
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Clone the repository
|
|
159
|
+
git clone https://github.com/jman4162/phased-array-systems.git
|
|
160
|
+
cd phased-array-systems
|
|
161
|
+
|
|
162
|
+
# Install in development mode
|
|
163
|
+
pip install -e ".[dev]"
|
|
164
|
+
|
|
165
|
+
# Run tests
|
|
166
|
+
pytest tests/ -v
|
|
167
|
+
|
|
168
|
+
# Run linting
|
|
169
|
+
ruff check .
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## License
|
|
173
|
+
|
|
174
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# phased-array-systems
|
|
2
|
+
|
|
3
|
+
[](https://github.com/jman4162/phased-array-systems/actions/workflows/ci.yml)
|
|
4
|
+
[](https://badge.fury.io/py/phased-array-systems)
|
|
5
|
+
[](https://www.python.org/downloads/)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
Phased array antenna system design, optimization, and performance visualization for wireless communications and radar applications.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Requirements as first-class objects**: Every run produces pass/fail + margins with traceability
|
|
13
|
+
- **Trade-space exploration**: DOE + Pareto optimization over single-point designs
|
|
14
|
+
- **Flat metrics dictionary**: All models return consistent `dict[str, float]` for interchange
|
|
15
|
+
- **Config-driven reproducibility**: Stable case IDs, seed control, version stamping
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install phased-array-systems
|
|
21
|
+
|
|
22
|
+
# Development dependencies
|
|
23
|
+
pip install phased-array-systems[dev]
|
|
24
|
+
|
|
25
|
+
# Visualization extras
|
|
26
|
+
pip install phased-array-systems[plotting]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
### Single Case Evaluation
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from phased_array_systems.architecture import Architecture, ArrayConfig, RFChainConfig
|
|
35
|
+
from phased_array_systems.scenarios import CommsLinkScenario
|
|
36
|
+
from phased_array_systems.evaluate import evaluate_case
|
|
37
|
+
|
|
38
|
+
# Define architecture
|
|
39
|
+
arch = Architecture(
|
|
40
|
+
array=ArrayConfig(nx=8, ny=8, dx_lambda=0.5, dy_lambda=0.5),
|
|
41
|
+
rf=RFChainConfig(tx_power_w_per_elem=1.0, pa_efficiency=0.3),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# Define scenario
|
|
45
|
+
scenario = CommsLinkScenario(
|
|
46
|
+
freq_hz=10e9,
|
|
47
|
+
bandwidth_hz=10e6,
|
|
48
|
+
range_m=100e3,
|
|
49
|
+
required_snr_db=10.0,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
# Evaluate
|
|
53
|
+
metrics = evaluate_case(arch, scenario)
|
|
54
|
+
print(f"EIRP: {metrics['eirp_dbw']:.1f} dBW")
|
|
55
|
+
print(f"Link Margin: {metrics['link_margin_db']:.1f} dB")
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### DOE Trade Study
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from phased_array_systems.trades import DesignSpace, generate_doe, BatchRunner, extract_pareto
|
|
62
|
+
|
|
63
|
+
# Define design space
|
|
64
|
+
space = (
|
|
65
|
+
DesignSpace()
|
|
66
|
+
.add_variable("array.nx", "int", low=4, high=16)
|
|
67
|
+
.add_variable("array.ny", "int", low=4, high=16)
|
|
68
|
+
.add_variable("rf.tx_power_w_per_elem", "float", low=0.5, high=3.0)
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Generate DOE
|
|
72
|
+
doe = generate_doe(space, method="lhs", n_samples=100, seed=42)
|
|
73
|
+
|
|
74
|
+
# Run batch evaluation
|
|
75
|
+
runner = BatchRunner(scenario)
|
|
76
|
+
results = runner.run(doe)
|
|
77
|
+
|
|
78
|
+
# Extract Pareto frontier
|
|
79
|
+
pareto = extract_pareto(results, [
|
|
80
|
+
("cost_usd", "minimize"),
|
|
81
|
+
("eirp_dbw", "maximize"),
|
|
82
|
+
])
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Examples
|
|
86
|
+
|
|
87
|
+
See the `examples/` directory:
|
|
88
|
+
- `01_comms_single_case.py` - Single case evaluation
|
|
89
|
+
- `02_comms_doe_trade.py` - Full DOE trade study workflow
|
|
90
|
+
|
|
91
|
+
### Tutorial Notebook
|
|
92
|
+
|
|
93
|
+
[](https://colab.research.google.com/github/jman4162/phased-array-systems/blob/main/notebooks/tutorial_phased_array_trade_study.ipynb)
|
|
94
|
+
|
|
95
|
+
Try the interactive tutorial in Google Colab!
|
|
96
|
+
|
|
97
|
+
## Package Structure
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
phased_array_systems/
|
|
101
|
+
├── architecture/ # Array, RF chain, cost configurations
|
|
102
|
+
├── scenarios/ # CommsLinkScenario, RadarDetectionScenario
|
|
103
|
+
├── requirements/ # Requirement definitions and verification
|
|
104
|
+
├── models/
|
|
105
|
+
│ ├── antenna/ # Phased array adapter and metrics
|
|
106
|
+
│ ├── comms/ # Link budget, propagation models
|
|
107
|
+
│ └── swapc/ # Power and cost models
|
|
108
|
+
├── trades/ # DOE, batch runner, Pareto analysis
|
|
109
|
+
├── viz/ # Plotting utilities
|
|
110
|
+
└── io/ # Config loading, results export
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Development
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Clone the repository
|
|
117
|
+
git clone https://github.com/jman4162/phased-array-systems.git
|
|
118
|
+
cd phased-array-systems
|
|
119
|
+
|
|
120
|
+
# Install in development mode
|
|
121
|
+
pip install -e ".[dev]"
|
|
122
|
+
|
|
123
|
+
# Run tests
|
|
124
|
+
pytest tests/ -v
|
|
125
|
+
|
|
126
|
+
# Run linting
|
|
127
|
+
ruff check .
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
MIT License - see [LICENSE](LICENSE) for details.
|