pycraf - compatibility studies for radio astronomy spectrum management
Project description
Version: 2.0.2
Authors: Benjamin Winkel, Marta Bautista, Federico Di Vruno, Gyula I. G. Józsa
The pycraf Python package provides functions and procedures for various tasks in spectrum-management compatibility studies. A typical example would be to calculate the interference levels at a radio telescope produced from a radio broadcasting tower.
Releases are registered on PyPI, and development is occurring at the project’s github page.
Project Status
Features
Full implementation of ITU-R Rec. P.452-17 that allows to calculate path attenuation for the distance between interferer and victim service (ITU-R Rec. P.452-18 is possible with adding clutter heights manually.). Supports to load NASA’s Shuttle Radar Topography Mission (SRTM) data for height-profile generation.
Full implementation of ITU-R Rec. P.676-13, which provides two atmospheric models to calculate the attenuation for paths through Earth’s atmosphere.
Provides various antenna patterns necessary for compatibility studies (e.g., RAS, IMT, fixed-service links).
Functions to convert power flux densities, field strengths, transmitted and received powers at certain distances and frequencies into each other.
Usage
Examples and Documentation
We provide an online documentation and API reference. Furthermore, you can find tutorials and HowTos in the notebooks directory on the pycraf repository.
Testing
After installation (see below) you can test, if everything works as intended:
import pycraf pycraf.test()
By default, the test function will skip over tests that require data from the internet. One can include them by:
pycraf.test(remote_data='any')
This will always download SRTM data (few tiles only) to test the auto-download functionality! Do this only, if you can afford the network traffic.
License
Several licenses apply; see the license directory in the repository. The pycraf Python package itself is published under GPL v3, an open-source license.
For some of the functionality provided in pycraf, data files provided by the ITU are necessary. For example, the atmospheric model in the pycraf.atm subpackage implements the algorithm described in ITU-R Recommendation P.676. Annex 1 of this Recommendation makes use of spectroscopic information of the oxygen and water vapour lines given in Tables 1 and 2 of P.676. Another example are the radiometeorological data files that are distributed alongside ITU-R Rec. P.452-17
ITU kindly gave us permission to include data files into pycraf that are distributed with the Recommendations on the ITU servers. This makes it possible to just use pycraf without the need to manually download necessary data files. However, these data files are not free for commercial use. For details, please see the LICENSE.ITU file.
Some of the examples/images in the pycraf documentation and tutorial notebooks make use of Copernicus data. For these, the conditions in COPERNICUS.EU apply.
Since pycraf uses the Astropy Package Template for packaging, we also refer to the associated license.
Installation
We strongly recommend to use the Anaconda Python distribution, as it allows to download pycraf binaries for all major platforms (Linux, OSX, Windows). After installing Anaconda/Miniconda, one can use the conda package manager to install it:
conda install pycraf -c conda-forge
Of course, it is always a good idea to do this in its own environment, such that you don’t mess up with your standard environment, e.g.:
conda create -n pycraf-env python=3.10 pycraf
If you don’t like Anaconda, the easiest way to install pycraf is via pip:
pip install pycraf
The installation is also possible from source. Download the tar.gz-file, extract (or clone from GitHub) and simply execute:
python -m pip install .
For further details, we refer to the online documention installation instructions. It also includes some hints for running pycraf on Windows or MacOS. Older versions of the packages may work, but no support will be provided.
SRTM data
To make full use of the path attenuation calculations provided by pycraf (implements ITU-R Rec. P.452), we recommend to use NASA’s Shuttle Radar Topography Mission (SRTM) data for height-profile generation. pycraf can work with so-called .hgt files, a very simple binary format. Each .hgt file, a so-called tile, just contains 1201x1201 16-bit integers. From the file naming scheme, one can infer the associated coordinates. Most tiles contain one square-degree.
Unfortunately, we cannot provide SRTM data as part of the package, due to the large file sizes and legal reasons. But once you downloaded the necessary tiles (all or only a subset appropriate for your region), simply define the environment variable SRTMDATA, let it point to the folder containing the tiles, and pycraf will find the files when it is imported from Python.
On windows:
set SRTMDATA=C:\[path-to-srtm]\
On Linux/MacOS (sh-like):
export SRTMDATA=[path-to-srtm]/
There is also the possibility to change the path to the SRTM directory during run-time (see documentation).
Acknowledgments
We are very grateful for the kind support from ITU study groups and ITU’s legal department.
This code is makes use of the excellent work provided by the Astropy community. pycraf uses the Astropy package and also the Astropy Package Template for the packaging.
Who do I talk to?
If you encounter any problems or have questions, do not hesitate to raise an issue or make a pull request. Moreover, you can contact the devs directly:
bwinkel@mpifr.de
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pycraf-2.0.2.tar.gz
.
File metadata
- Download URL: pycraf-2.0.2.tar.gz
- Upload date:
- Size: 18.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1701461c36f984160746ff28cabfd12e87a0f5dd56e71ed94bef50b19d76302e |
|
MD5 | 356fb1745586726780609dee9648201d |
|
BLAKE2b-256 | 030e87b6ca7b6ed935872b25c4a4d029801966cfbc20c7ecde5a01233f62650d |
File details
Details for the file pycraf-2.0.2-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | addc7c14f3710cf787689a0afb6b6a2c58ebd00b0c2354bfef62e87166db2c49 |
|
MD5 | 61295fd1925945c0a09c8c838ecc65b9 |
|
BLAKE2b-256 | 5d41ab0b3210a06937a5fd41ecfc4fb48cd7e493da7385369b37b14f93d25286 |
File details
Details for the file pycraf-2.0.2-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 10.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfd64b83b4074b343cd0a88737f01907c2ce936a0d7bafd9cad81757a473c2b9 |
|
MD5 | 5aee40c5aaf04bfd26b8b378720b35bd |
|
BLAKE2b-256 | 6a34a0fc97482677bb3d584826585399a40ed236fcaf824972ff2b7e638a1978 |
File details
Details for the file pycraf-2.0.2-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6760d0bcdd8f6b5d0f0080f07d6c4e8a9fc36d18c261f79ba337e2d77170e531 |
|
MD5 | 52ed4d09d5c59a66bb4c8eb7540f6932 |
|
BLAKE2b-256 | 07421dbff63aaa060d56611cfef8d59a05640749b80f874095fbc41b5a9347cc |
File details
Details for the file pycraf-2.0.2-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50b7992e22e679fe85e85a53b91a2c8cf62d84fc8832f0df971d1e1d9f33ea13 |
|
MD5 | 02479998dbe1ad83fa98cfaa3648b166 |
|
BLAKE2b-256 | f13b45bf0092046151b358c957e6e1c0de8b4b964e53f729d10b841fb28b4451 |
File details
Details for the file pycraf-2.0.2-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 10.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8a55796dae791018bc2bf65e86e2990d0e7c8518cbc31b88f19efd460594a8f |
|
MD5 | 1060b653443da326eba508452006fcdc |
|
BLAKE2b-256 | 25fcf0b999e301752e295ab8729109ebbcf2b4b7da116a898be88432d4d5ad87 |
File details
Details for the file pycraf-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed200ec6c2c20c15589c2f426c52d2ee112cf8c48405a7b11ac29fb2fdcd7ef1 |
|
MD5 | b5ce17b5f5b13feee4aa5648f8ea5daa |
|
BLAKE2b-256 | c06871914babd7fa1af11d202382defb4dcd222c575abfcd221da8e6a9498437 |
File details
Details for the file pycraf-2.0.2-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5223de4c7ba895e3e0c1e6366c1d61500aeabd179bdf9dfa52942ec2defa57f5 |
|
MD5 | 7432de8afeecf33313500227ba1572f6 |
|
BLAKE2b-256 | 711dddf6dc31936308b0d98b60101dab68c15f682d4c535387ff0b9224e0bfa3 |
File details
Details for the file pycraf-2.0.2-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 10.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09e35cf64b6b01bc00338c2a4ac9cb2d2bf20ba78799e24a895e735a92a44481 |
|
MD5 | 13236286fc95e53499bebe69a4eb3967 |
|
BLAKE2b-256 | ab1597c1c14b63e8e1834917cc0a6c8ca5ecf47c60fbcc3a822b54325f43b41c |
File details
Details for the file pycraf-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e621f4cd86d8350a159894c62b549d26aad938ee2d471b3c095dc26e183e4509 |
|
MD5 | f2ed631927ffdaf464f234e30b030433 |
|
BLAKE2b-256 | bd41e9f6be7aa0e716e97da1c2146ddc355649db147f06f7cc5f7736f3929795 |
File details
Details for the file pycraf-2.0.2-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c70cccb84a5bdb318149ea8cf5c5e78d292e99f3cfdf96f71cac4d83c846b711 |
|
MD5 | e4487edaf0c3af47f94b69512240b701 |
|
BLAKE2b-256 | 30848f00ef73994b14af456e3bd5d960cd1f6dd60378feaf9bba7e4859255f83 |
File details
Details for the file pycraf-2.0.2-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 10.0 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dbd82ab2a4b85dccd24939ef5fc04443bc3fa8adfe44d2492d1b13da927dd33 |
|
MD5 | 531a2278f7aed8b378f08f168c4425ab |
|
BLAKE2b-256 | 17d67b138da31eb7960593a32baa686003efc38b709a581b893405da0250077a |
File details
Details for the file pycraf-2.0.2-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pycraf-2.0.2-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 859d9b7eaa71cb70b6b9adda65b00a62e10bd4aac970f6a54c0bf0d330bab77d |
|
MD5 | f67ef0d4e3fdf43a00a7e052291d3827 |
|
BLAKE2b-256 | 6e1c427ff3d18b1a0bff46aa810f981dcfa345fcabf927a40a2d86c7f4163fe8 |