Skip to main content

pycraf - compatibility studies for radio astronomy spectrum management

Project description

  • Version: 2.1.0

  • Authors: Benjamin Winkel, Marta Bautista, Federico Di Vruno, Gyula I. G. Józsa

  • User manual: stable | developer

PyPI tag License Zenodo DOI

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

Pycrafs's CI Status on Azure Pipelines

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


Download files

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

Source Distribution

pycraf-2.1.0.tar.gz (18.4 MB view details)

Uploaded Source

Built Distributions

pycraf-2.1.0-cp312-cp312-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.12Windows x86-64

pycraf-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pycraf-2.1.0-cp312-cp312-macosx_10_13_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

pycraf-2.1.0-cp311-cp311-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.11Windows x86-64

pycraf-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pycraf-2.1.0-cp311-cp311-macosx_10_13_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

pycraf-2.1.0-cp310-cp310-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.10Windows x86-64

pycraf-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl (10.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pycraf-2.1.0-cp310-cp310-macosx_10_13_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

File details

Details for the file pycraf-2.1.0.tar.gz.

File metadata

  • Download URL: pycraf-2.1.0.tar.gz
  • Upload date:
  • Size: 18.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for pycraf-2.1.0.tar.gz
Algorithm Hash digest
SHA256 daa3c7cb63a24d0e2ec814e71d58ab7e3be65985d4dd23593faf6c646b2119c1
MD5 1c101a9b675c2b7e756691f957ca3387
BLAKE2b-256 29c876b0f450d3ef6f34865f64a4863e685b61a5d30e65afe6363091648b03b9

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pycraf-2.1.0-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/6.1.0 CPython/3.9.13

File hashes

Hashes for pycraf-2.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 682b775471645397418a6185a8df02c5b97c43d25c7a478ba58524f98dffec3a
MD5 5701a9c1d73ed2c5121264da3d88caed
BLAKE2b-256 e41c0450a36539364bda67d10f930170cccf3f8cd92b18ebf3c269f2118ddd66

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycraf-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4f0ff428c5357bcf2b4379632e4ab98a4b172fe4b5f7a69b122e8c0aab36691f
MD5 029f7db95e602147638e6feac2c1bf12
BLAKE2b-256 f298152357689ee089881260272481668b2525a5c4326b111ac670db71c324ef

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pycraf-2.1.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8c7b931cfe7b8649bdaf72475965b8ec67b937d7d403451c9692bc0c426a49d0
MD5 950c34f5be58436a385aa296df79007b
BLAKE2b-256 6f9c546c44a3d3d9acba44169543c95f7dc6c8acc38d9a0be4984a3af5f17cbd

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pycraf-2.1.0-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/6.1.0 CPython/3.9.13

File hashes

Hashes for pycraf-2.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ada5d12ca290a700331d6b59b8ea60f1d3cbe83973710a2f684442b32c5fc623
MD5 a47e000e1f8722ab04e3cd20fece6cfc
BLAKE2b-256 5fffc336fd1ec2516c69c13fa76d9e8c4ed61c0ba3d98f2e04e92d3609bd1245

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycraf-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4e7d2d1c15e0d57c440d298134054b703c8d0366d999f1ed379b3673cd4576d5
MD5 e3672e5fc13dd5bec9a6e7ccbe5c4f99
BLAKE2b-256 be893a08e96637080ba84e25358e7e889a421b4aada0cc4f55d8be3311233fb0

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pycraf-2.1.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 3108e5b0dd350081d1552444cb3c13775e20d7cae283e1541348a8a1caaf76dd
MD5 dec7b852ba9b3f73452667b2c0788ae3
BLAKE2b-256 4f09de11a9f83017768c9d912b929dd2b3fcef3c6633deedac9fa88384e7ce5f

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pycraf-2.1.0-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/6.1.0 CPython/3.9.13

File hashes

Hashes for pycraf-2.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1e0d248e3ce27e269f4d5c2e7944911ebbaef4d3f9df037d35d1de48837faa93
MD5 ec1979b6cce20d660b8db2beced8b350
BLAKE2b-256 3db48be5f4c3a03da745234ac1d195476dd6945fb2813f23dad30e85c997efc7

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycraf-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b08a690f1ec59efa839e71a0c720224b20e988de3a41e3b455e235bc6e890690
MD5 bfd56dcca376dc6b33f9742eb66330cf
BLAKE2b-256 92686b777079b52ad342de5af669944bbf55a23afb390f6542bacf68a3e8bd55

See more details on using hashes here.

File details

Details for the file pycraf-2.1.0-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pycraf-2.1.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 58997bdbc3e8eb8fcd87df237079994a394e3441f1b8428aaf83f35d34536734
MD5 d6d4f294d20154ee2875995c5ba92334
BLAKE2b-256 45d8bfe2dcfb28037539cfb1d0a283a8b624338a30e1c025a337d2099972b411

See more details on using hashes here.

Supported by

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