Skip to main content

A Python wrapper for the NTIA/ITS implementation of the Low Frequency / Medium Frequency (LF/MF) Propagation Model

Project description

Low Frequency / Medium Frequency (LF/MF) Propagation Model, Python® Wrapper

NTIA/ITS PropLib PyPI Release GitHub Actions Unit Test Status GitHub Issues DOI

This code repository contains a Python wrapper for the NTIA/ITS implementation of the Low Frequency / Medium Frequency (LF/MF) Propagation Model. LF/MF predicts basic transmission loss in the frequency range 0.01 - 30 MHz for propagation paths over a smooth Earth and antenna heights less than 50 meters. This Python package wraps the NTIA/ITS C++ implementation.

Getting Started

This software is distributed on PyPI and is easily installable using the following command.

pip install proplib-lfmf

General information about using this model is available on its page on the NTIA/ITS Propagation Library Wiki. Additionally, Python-specific instructions and code examples are available here.

If you're a developer and would like to contribute to or extend this repository, please review the guide for contributors here or open an issue to start a discussion.

Development

This repository contains code which wraps the C++ shared library as an importable Python module. If you wish to contribute to this repository, testing your changes will require the inclusion of this shared library. You may retrieve this either from the relevant GitHub Releases page, or by compiling it yourself from the C++ source code. Either way, ensure that the shared library (.dll, .dylib, or .so file) is placed in src/ITS/Propagation/LFMF/, alongside __init__.py.

Below are the steps to build and install the Python package from the source code. Working installations of Git and a currently-supported version of Python are required. Additional requirements exist if you want to compile the shared library from C++ source code; see relevant build instructions here.

  1. Optionally, configure and activate a virtual environment using a tool such as venv or conda.

  2. Clone this repository, then initialize the Git submodule containing the test data.

    # Clone the repository
    git clone https://github.com/NTIA/LFMF-python
    cd LFMF-python
    
    # Initialize Git submodule containing test data
    git submodule init
    
    # Clone the submodule
    git submodule update
    
  3. Download the shared library (.dll, .so, or .dylib) from a GitHub Release. Then place the downloaded file in src/ITS/Propagation/LFMF/ (alongside __init__.py).

  4. Install the local package and development dependencies into your current environment:

    pip install .[dev]
    
  5. To build the wheel for your platform:

    hatchling build
    

Running Tests

Python unit tests can be run to confirm successful installation. You will need to clone this repository's test data submodule (as described above). Then, run the tests with pytest using the following command.

pytest

References

  • ITS Propagation Library Wiki
  • LFMF Wiki Page
  • ITS.Propagation.LFMF C++ API Reference
  • Bremmer, H. "Terrestrial Radio Waves" Elsevier, 1949.
  • DeMinco, N. "Medium Frequency Propagation Prediction Techniques and Antenna Modeling for Intelligent Transportation Systems (ITS) Broadcast Applications", NTIA Report 99-368, August 1999
  • DeMinco, N. "Ground-wave Analysis Model For MF Broadcast System", NTIA Report 86-203, September 1986
  • Sommerfeld, A. "The propagation of waves in wireless telegraphy", Ann. Phys., 1909, 28, p.665
  • Wait, J. "Radiation From a Vertical Antenna Over a Curved Stratified Ground", Journal of Research of the National Bureau of Standards. Vol 56, No. 4, April 1956. Research Paper 2671

License

See LICENSE.

"Python" and the Python logos are trademarks or registered trademarks of the Python Software Foundation, used by the National Telecommunications and Information Administration with permission from the Foundation.

Contact

For technical questions, contact code@ntia.gov.

Disclaimer

Certain commercial equipment, instruments, or materials are identified in this project were used for the convenience of the developers. In no case does such identification imply recommendation or endorsement by the National Telecommunications and Information Administration, nor does it imply that the material or equipment identified is necessarily the best available for the purpose.

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

proplib_lfmf-1.1.0.tar.gz (176.1 kB view details)

Uploaded Source

Built Distribution

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

proplib_lfmf-1.1.0-py3-none-any.whl (162.7 kB view details)

Uploaded Python 3

File details

Details for the file proplib_lfmf-1.1.0.tar.gz.

File metadata

  • Download URL: proplib_lfmf-1.1.0.tar.gz
  • Upload date:
  • Size: 176.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for proplib_lfmf-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9650b9ee0a13086c5e7a416b5853ac4e9bd8e6fdd6c2b8a0201cd80b91f070ef
MD5 53d5faaf92a9cb65e70b40bf5e6386ed
BLAKE2b-256 f952ec822c97abd0e7968cd4a0b0cbcc517204970538c917ed0eaefa54efe5b6

See more details on using hashes here.

File details

Details for the file proplib_lfmf-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: proplib_lfmf-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 162.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for proplib_lfmf-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84b047b771a5b6ad705af9bd643b718fe09e2faad7c631786e12de02ad4dbff7
MD5 098c40e70f9a739dca372531d66f7d78
BLAKE2b-256 8179cb13db9ae70322357dec3247ab018d1f2d3df8094a6a832892cdcada5e29

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