Skip to main content

A tool to visualize 3D antenna pattern files in JSON format.

Project description

eas-3d-pattern

PyPI version PyPI - Python Version PyPI - License CI Ruff

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()

Antenna pattern heatmap

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eas_3d_pattern-0.1.4.tar.gz (5.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eas_3d_pattern-0.1.4-py3-none-any.whl (5.5 MB view details)

Uploaded Python 3

File details

Details for the file eas_3d_pattern-0.1.4.tar.gz.

File metadata

  • Download URL: eas_3d_pattern-0.1.4.tar.gz
  • Upload date:
  • Size: 5.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.4 Linux/6.18.33.2-microsoft-standard-WSL2

File hashes

Hashes for eas_3d_pattern-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2b55bc3cf8e52f0592669e8de06a6b3e75ab298c9c1d27eb37b5b5d263399ab0
MD5 6044239e90ab736904a86c9cba42b76e
BLAKE2b-256 11ecf869e2baaf7de4bceac6c9eb83d4801b7058725c1b61050004d8d058a3ec

See more details on using hashes here.

File details

Details for the file eas_3d_pattern-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: eas_3d_pattern-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.4 Linux/6.18.33.2-microsoft-standard-WSL2

File hashes

Hashes for eas_3d_pattern-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a2dec0f8b2f6ac54fad9a0c3872678f22b72e81e239013516a1d306f8580dd3c
MD5 7848be1a2891430f320b3b4706625c07
BLAKE2b-256 652648a6dd5dbda3412e76f50f6523a202deefc22686c92d44c196717570d87f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page