pycraf


Namepycraf JSON
Version 2.0.2 PyPI version JSON
download
home_pageNone
Summarypycraf - compatibility studies for radio astronomy spectrum management
upload_time2024-04-14 21:49:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseGPLv3
keywords astronomy astrophysics radio astronomy spectrum management compatibility studies
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ******
pycraf
******

- *Version:* 2.0.2
- *Authors:* Benjamin Winkel, Marta Bautista, Federico Di Vruno,
  Gyula I. G. Józsa
- *User manual:* `stable <https://bwinkel.github.io/pycraf/>`__ |
  `developer <https://bwinkel.github.io/pycraf/latest/>`__

.. image:: https://img.shields.io/pypi/v/pycraf.svg
    :target: https://pypi.python.org/pypi/pycraf
    :alt: PyPI tag

.. image:: https://img.shields.io/badge/license-GPL-blue.svg
    :target: https://www.github.com/bwinkel/pycraf/blob/master/COPYING
    :alt: License

.. image:: https://zenodo.org/badge/doi/10.5281/zenodo.1244192.svg
    :target: https://doi.org/10.5281/zenodo.1244192
    :alt: 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 <http://pypi.python.org/pypi/pycraf>`_,
and development is occurring at the
`project's github page <http://github.com/bwinkel/pycraf/>`_.

Project Status
==============

.. image:: https://dev.azure.com/bwinkel78/Benjamin-Winkel-Projects/_apis/build/status/bwinkel.pycraf?repoName=bwinkel%2Fpycraf&branchName=master
    :target: https://dev.azure.com/bwinkel78/Benjamin-Winkel-Projects/_build?definitionId=2
    :alt: Pycrafs's CI Status on Azure Pipelines


Features
========

- Full implementation of `ITU-R Rec. P.452-17 <https://www.itu.int/rec/R-REC-P.452-17-202109-I/en>`_ that allows to calculate path
  attenuation for the distance between interferer and victim service (`ITU-R Rec. P.452-18 <https://www.itu.int/rec/R-REC-P.452-18-202310-I/en>`_ is possible with adding clutter heights manually.). Supports
  to load NASA's `Shuttle Radar Topography Mission (SRTM) <https://www2.jpl.nasa.gov/srtm/>`_ data for height-profile generation.
- Full implementation of `ITU-R Rec. P.676-13 <https://www.itu.int/rec/R-REC-P.676-13-202208-I/en>`_, 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 <https://bwinkel.github.io/pycraf/>`_. Furthermore, you can find tutorials and HowTos in
the `notebooks <http://nbviewer.jupyter.org/github/bwinkel/pycraf/blob/master/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 <https://github.com/bwinkel/pycraf/blob/master/licenses/>`_ in the repository. The pycraf Python package
itself is published under `GPL v3 <https://github.com/bwinkel/pycraf/blob/master/licenses/COPYING>`_, 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 <https://www.itu.int/rec/R-REC-P.676-13-202208-I/en>`_.
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 <https://www.itu.int/rec/R-REC-P.452-17-202109-I/en>`_

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 <https://www.github.com/bwinkel/pycraf/blob/master/licenses/LICENSE.ITU>`_ file.

Some of the examples/images in the pycraf documentation and tutorial notebooks
make use of `Copernicus <https://www.copernicus.eu/en>`_ data. For these, the
conditions in `COPERNICUS.EU <https://www.github.com/bwinkel/pycraf/blob/master/COPERNICUS.EU>`_ apply.

Since pycraf uses the `Astropy Package Template <https://github.com/astropy/package-template>`_ for packaging, we also refer to the associated  `license <https://github.com/bwinkel/pycraf/blob/master/licenses/LICENSE_ASTROPY_PACKAGE_TEMPLATE.rst>`_.


Installation
============

We strongly recommend to use the `Anaconda Python distribution
<https://www.anaconda.com/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 <https://bwinkel.github.io/pycraf/install.html>`_. 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 <https://www.itu.int/rec/R-REC-P.452-17-202109-I/en>`_), we recommend to use NASA's
`Shuttle Radar Topography Mission (SRTM) <https://www2.jpl.nasa.gov/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 <http://www.astropy.org/>`_ community. pycraf uses the Astropy package and also the
`Astropy Package Template <https://github.com/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*

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pycraf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "astronomy, astrophysics, radio astronomy, spectrum management, compatibility studies",
    "author": null,
    "author_email": "Benjamin Winkel <bwinkel@mpifr.de>",
    "download_url": null,
    "platform": null,
    "description": "******\npycraf\n******\n\n- *Version:* 2.0.2\n- *Authors:* Benjamin Winkel, Marta Bautista, Federico Di Vruno,\n  Gyula I. G. J\u00f3zsa\n- *User manual:* `stable <https://bwinkel.github.io/pycraf/>`__ |\n  `developer <https://bwinkel.github.io/pycraf/latest/>`__\n\n.. image:: https://img.shields.io/pypi/v/pycraf.svg\n    :target: https://pypi.python.org/pypi/pycraf\n    :alt: PyPI tag\n\n.. image:: https://img.shields.io/badge/license-GPL-blue.svg\n    :target: https://www.github.com/bwinkel/pycraf/blob/master/COPYING\n    :alt: License\n\n.. image:: https://zenodo.org/badge/doi/10.5281/zenodo.1244192.svg\n    :target: https://doi.org/10.5281/zenodo.1244192\n    :alt: Zenodo DOI\n\nThe pycraf Python package provides functions and procedures for\nvarious tasks in spectrum-management compatibility studies. A typical example\nwould be to calculate the interference levels at a radio telescope produced\nfrom a radio broadcasting tower.\n\nReleases are `registered on PyPI <http://pypi.python.org/pypi/pycraf>`_,\nand development is occurring at the\n`project's github page <http://github.com/bwinkel/pycraf/>`_.\n\nProject Status\n==============\n\n.. image:: https://dev.azure.com/bwinkel78/Benjamin-Winkel-Projects/_apis/build/status/bwinkel.pycraf?repoName=bwinkel%2Fpycraf&branchName=master\n    :target: https://dev.azure.com/bwinkel78/Benjamin-Winkel-Projects/_build?definitionId=2\n    :alt: Pycrafs's CI Status on Azure Pipelines\n\n\nFeatures\n========\n\n- Full implementation of `ITU-R Rec. P.452-17 <https://www.itu.int/rec/R-REC-P.452-17-202109-I/en>`_ that allows to calculate path\n  attenuation for the distance between interferer and victim service (`ITU-R Rec. P.452-18 <https://www.itu.int/rec/R-REC-P.452-18-202310-I/en>`_ is possible with adding clutter heights manually.). Supports\n  to load NASA's `Shuttle Radar Topography Mission (SRTM) <https://www2.jpl.nasa.gov/srtm/>`_ data for height-profile generation.\n- Full implementation of `ITU-R Rec. P.676-13 <https://www.itu.int/rec/R-REC-P.676-13-202208-I/en>`_, which provides two atmospheric\n  models to calculate the attenuation for paths through Earth's atmosphere.\n- Provides various antenna patterns necessary for compatibility studies (e.g.,\n  RAS, IMT, fixed-service links).\n- Functions to convert power flux densities, field strengths, transmitted and\n  received powers at certain distances and frequencies into each other.\n\nUsage\n=====\n\nExamples and Documentation\n--------------------------\n\nWe provide `an online documentation and API reference <https://bwinkel.github.io/pycraf/>`_. Furthermore, you can find tutorials and HowTos in\nthe `notebooks <http://nbviewer.jupyter.org/github/bwinkel/pycraf/blob/master/notebooks/>`_\ndirectory on the pycraf repository.\n\nTesting\n-------\n\nAfter installation (see below) you can test, if everything works as intended::\n\n    import pycraf\n\n    pycraf.test()\n\nBy default, the `test` function will skip over tests that require\ndata from the internet. One can include them by::\n\n    pycraf.test(remote_data='any')\n\nThis will *always* download SRTM data (few tiles only) to test the\nauto-download functionality! Do this only, if you can afford the network\ntraffic.\n\n\nLicense\n=======\n\nSeveral licenses apply; see the `license directory <https://github.com/bwinkel/pycraf/blob/master/licenses/>`_ in the repository. The pycraf Python package\nitself is published under `GPL v3 <https://github.com/bwinkel/pycraf/blob/master/licenses/COPYING>`_, an open-source license.\n\nFor some of the functionality provided in pycraf, data files provided by the\nITU are necessary. For example, the atmospheric model in the *pycraf.atm*\nsubpackage implements the algorithm described in `ITU-R Recommendation P.676 <https://www.itu.int/rec/R-REC-P.676-13-202208-I/en>`_.\nAnnex 1 of this Recommendation makes use of spectroscopic information of the\noxygen and water vapour lines given in Tables 1 and 2 of P.676. Another\nexample are the radiometeorological data files that are distributed alongside\n`ITU-R Rec. P.452-17 <https://www.itu.int/rec/R-REC-P.452-17-202109-I/en>`_\n\nITU kindly gave us permission to include data files into pycraf that are\ndistributed with the Recommendations on the ITU servers. This makes it possible\nto just use pycraf without the need to manually download necessary data files.\nHowever, these data files are not free for commercial use. For details, please\nsee the `LICENSE.ITU <https://www.github.com/bwinkel/pycraf/blob/master/licenses/LICENSE.ITU>`_ file.\n\nSome of the examples/images in the pycraf documentation and tutorial notebooks\nmake use of `Copernicus <https://www.copernicus.eu/en>`_ data. For these, the\nconditions in `COPERNICUS.EU <https://www.github.com/bwinkel/pycraf/blob/master/COPERNICUS.EU>`_ apply.\n\nSince pycraf uses the `Astropy Package Template <https://github.com/astropy/package-template>`_ for packaging, we also refer to the associated  `license <https://github.com/bwinkel/pycraf/blob/master/licenses/LICENSE_ASTROPY_PACKAGE_TEMPLATE.rst>`_.\n\n\nInstallation\n============\n\nWe strongly recommend to use the `Anaconda Python distribution\n<https://www.anaconda.com/distribution/>`_, as it allows to download `pycraf`\nbinaries for all major platforms (Linux, OSX, Windows). After installing\nAnaconda/Miniconda, one can use the `conda` package manager to install it::\n\n    conda install pycraf -c conda-forge\n\nOf course, it is always a good idea to do this in its own environment, such\nthat you don't mess up with your standard environment, e.g.::\n\n    conda create -n pycraf-env python=3.10 pycraf\n\nIf you don't like Anaconda, the easiest way to install pycraf is via pip::\n\n    pip install pycraf\n\nThe installation is also possible from source. Download the tar.gz-file,\nextract (or clone from GitHub) and simply execute::\n\n    python -m pip install .\n\nFor further details, we refer to the online documention `installation\ninstructions <https://bwinkel.github.io/pycraf/install.html>`_. It also\nincludes some hints for running pycraf on Windows or MacOS. Older versions\nof the packages may work, but no support will be provided.\n\nSRTM data\n---------\n\nTo make full use of the path attenuation calculations provided by pycraf\n(implements `ITU-R Rec. P.452 <https://www.itu.int/rec/R-REC-P.452-17-202109-I/en>`_), we recommend to use NASA's\n`Shuttle Radar Topography Mission (SRTM) <https://www2.jpl.nasa.gov/srtm/>`_\ndata for height-profile generation. pycraf can work with so-called *.hgt*\nfiles, a very simple binary format. Each *.hgt* file, a so-called tile, just\ncontains 1201x1201 16-bit integers. From the file naming scheme, one can infer\nthe associated coordinates. Most tiles contain one square-degree.\n\nUnfortunately, we cannot provide SRTM data as part of the package, due to the\nlarge file sizes and legal reasons. But once you downloaded the necessary\ntiles (all or only a subset appropriate for your region), simply define the\nenvironment variable *SRTMDATA*, let it point to the folder containing the\ntiles, and pycraf will find the files when it is imported from Python.\n\nOn windows::\n\n    set SRTMDATA=C:\\[path-to-srtm]\\\n\nOn Linux/MacOS (sh-like)::\n\n    export SRTMDATA=[path-to-srtm]/\n\nThere is also the possibility to change the path to the SRTM directory during\nrun-time (see documentation).\n\nAcknowledgments\n===============\nWe are very grateful for the kind support from ITU study groups and ITU's\nlegal department.\n\nThis code is makes use of the excellent work provided by the\n`Astropy <http://www.astropy.org/>`_ community. pycraf uses the Astropy package and also the\n`Astropy Package Template <https://github.com/astropy/package-template>`_\nfor the packaging.\n\nWho do I talk to?\n=================\n\nIf you encounter any problems or have questions, do not hesitate to raise an\nissue or make a pull request. Moreover, you can contact the devs directly:\n\n- *bwinkel@mpifr.de*\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "pycraf - compatibility studies for radio astronomy spectrum management",
    "version": "2.0.2",
    "project_urls": {
        "Changelog": "https://github.com/bwinkel/pycraf/CHANGES.rst",
        "Documentation": "https://bwinkel.github.io/pycraf/",
        "Homepage": "https://pypi.org/project/pycraf/",
        "Issues": "https://github.com/bwinkel/pycraf/issues",
        "Repository": "https://github.com/bwinkel/pycraf"
    },
    "split_keywords": [
        "astronomy",
        " astrophysics",
        " radio astronomy",
        " spectrum management",
        " compatibility studies"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd41e9f6be7aa0e716e97da1c2146ddc355649db147f06f7cc5f7736f3929795",
                "md5": "f2ed631927ffdaf464f234e30b030433",
                "sha256": "e621f4cd86d8350a159894c62b549d26aad938ee2d471b3c095dc26e183e4509"
            },
            "downloads": -1,
            "filename": "pycraf-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f2ed631927ffdaf464f234e30b030433",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 6750277,
            "upload_time": "2024-04-14T21:49:31",
            "upload_time_iso_8601": "2024-04-14T21:49:31.342558Z",
            "url": "https://files.pythonhosted.org/packages/bd/41/e9f6be7aa0e716e97da1c2146ddc355649db147f06f7cc5f7736f3929795/pycraf-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c06871914babd7fa1af11d202382defb4dcd222c575abfcd221da8e6a9498437",
                "md5": "b5ce17b5f5b13feee4aa5648f8ea5daa",
                "sha256": "ed200ec6c2c20c15589c2f426c52d2ee112cf8c48405a7b11ac29fb2fdcd7ef1"
            },
            "downloads": -1,
            "filename": "pycraf-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b5ce17b5f5b13feee4aa5648f8ea5daa",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 6752012,
            "upload_time": "2024-04-14T21:46:08",
            "upload_time_iso_8601": "2024-04-14T21:46:08.969181Z",
            "url": "https://files.pythonhosted.org/packages/c0/68/71914babd7fa1af11d202382defb4dcd222c575abfcd221da8e6a9498437/pycraf-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f13b45bf0092046151b358c957e6e1c0de8b4b964e53f729d10b841fb28b4451",
                "md5": "02479998dbe1ad83fa98cfaa3648b166",
                "sha256": "50b7992e22e679fe85e85a53b91a2c8cf62d84fc8832f0df971d1e1d9f33ea13"
            },
            "downloads": -1,
            "filename": "pycraf-2.0.2-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "02479998dbe1ad83fa98cfaa3648b166",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 6715391,
            "upload_time": "2024-04-14T21:52:35",
            "upload_time_iso_8601": "2024-04-14T21:52:35.190587Z",
            "url": "https://files.pythonhosted.org/packages/f1/3b/45bf0092046151b358c957e6e1c0de8b4b964e53f729d10b841fb28b4451/pycraf-2.0.2-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07421dbff63aaa060d56611cfef8d59a05640749b80f874095fbc41b5a9347cc",
                "md5": "52ed4d09d5c59a66bb4c8eb7540f6932",
                "sha256": "6760d0bcdd8f6b5d0f0080f07d6c4e8a9fc36d18c261f79ba337e2d77170e531"
            },
            "downloads": -1,
            "filename": "pycraf-2.0.2-cp312-cp312-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "52ed4d09d5c59a66bb4c8eb7540f6932",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 6749379,
            "upload_time": "2024-04-14T21:49:11",
            "upload_time_iso_8601": "2024-04-14T21:49:11.739142Z",
            "url": "https://files.pythonhosted.org/packages/07/42/1dbff63aaa060d56611cfef8d59a05640749b80f874095fbc41b5a9347cc/pycraf-2.0.2-cp312-cp312-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-14 21:49:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bwinkel",
    "github_project": "pycraf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pycraf"
}
        
Elapsed time: 0.23724s