eas-3d-pattern
A Python library for visualizing and computing beam efficiency on 3D antenna radiation patterns conforming to the NGMN BASTA JSON schema.
What is this?
Given a 3D radiation pattern in JSON format which follows the NGMN BASTA (Base Station Antenna Standards) specification, with this library you can:
- Parse the BASTA-compliant JSON, handles multiple coordinate systems and sampling formats automatically
- Calculate beam efficiency across configurable sectors (EAS methodology)
- Visualize patterns as 2D heatmaps and 3D polar plots
Installation
pip install eas-3d-pattern
Development installation
git clone https://github.com/Ericsson/eas-3d-pattern.git
cd eas-3d-pattern
poetry install
Run tests:
poetry run pytest
Lint and format:
poetry run ruff check .
poetry run ruff format .
Quick Start
from eas_3d_pattern import AntennaPattern, SAMPLE_JSON
# Load a 3D radiation pattern from JSON
pattern = AntennaPattern(SAMPLE_JSON[0])
# Inspect antenna parameters
print(f"{pattern.antenna_model} @ {pattern.frequency_hz / 1e6:.0f} MHz — {pattern.gain_dbi:.1f} dBi")
# → ANTMODEL1 @ 2100 MHz — 18.3 dBi
# Calculate beam efficiency (EAS default sectors)
efficiency = pattern.calculate_beam_efficiency()
print(f"Cell sector: {efficiency['Cell'] * 100:.1f}%")
# → Cell sector: 72.4%
# Visualize the normalized power pattern
pattern.plot()
Features
| Feature | Description |
|---|---|
| Multi-format parsing | Accepts uniform and non-uniform sampling, all NGMN coordinate systems (SPCS_Polar, SPCS_CW, SPCS_CCW, SPCS_Geo) |
| Schema validation | Optional validation against the official NGMN BASTA JSON Schema |
| Beam efficiency | Compute power distribution across predefined EAS sectors or custom rectangular regions |
| Custom sectors | Define your own analysis regions with arbitrary θ/φ boundaries |
| Directivity & losses | Calculate directivity and estimate ohmic losses from declared gain |
| Visualization | Interactive heatmaps and 3D polar plots |
| Batch reporting | Process a directory of JSON files into a structured Excel report with optional PNG exports |
Examples
See the example notebooks for detailed walkthroughs.
Resources
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Metadata
Release files for eas-3d-pattern 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eas_3d_pattern-0.2.0.tar.gz | 5.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eas_3d_pattern-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.8 MB
Release files / eas_3d_pattern-0.2.0.tar.gz
| Download URL | eas_3d_pattern-0.2.0.tar.gz |
|---|---|
| Size | 5.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03cfe49243273443bef74fbe226f2561938b9d85581fc0a86c3147ff101a36d9
|
|
BLAKE2b-256 checksum How to use checksums |
ebdcbb2be4a7408b4ca45504cc11048850f15f82738cb4fe54191fbad4f2d21f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.4 Linux/6.18.33.2-microsoft-standard-WSL2
|
Release files / eas_3d_pattern-0.2.0-py3-none-any.whl
| Download URL | eas_3d_pattern-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40b3a85071ea9124d09c7f065cece1024578ec88f13dad2fbd535068dfef5654
|
|
BLAKE2b-256 checksum How to use checksums |
c6005f871fb253e626dec7a28132517a098cf8cc0aaf8bf3409d6190e6610dec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.4 Linux/6.18.33.2-microsoft-standard-WSL2
|