RF-INFO(1)

NAME
rf-info - rf-info Documentation

RF-INFO
Python 3Documentation StatusUpdates

Command line & Python library for obtaining details about a radio frequency

•   Free software: MIT license

•   Documentation: https://rf-info.readthedocs.io.

•   Python 3.5, 3.6, 3.7, 3.8 & pypy3 tested. Not compatible with Python 2.x

•   Linux & Windows with color, raw parsable output, json output, and interactive terminal support

  Features

Returns information about a radio frequency.

•   "Radio Display" format (Dotted notaton)

•   hz, khz, Mhz and Ghz representations of the frequency

•   Frequency Wavelength

•   ITU Band Description

•   ITU Band Abbreviation

•   ITU Band Number

•   ISM Band Type & Description

•   IEEE Band Name

•   NATO Band Name

•   Waveguide Band Name

•   Microwave Band Name & Description

•   Fixed Station & Mobile Station Designations

•   IEEE Primary Band Allocations

•   IEEE Secondary Band Allocations

•   Detailed IEEE footnotes for each band allocation

•   All active & upcomming satellite frequencys & details (406 Satellites as of 1/18/20)

•   Amateur Radio Modes, License Class, Max Power (US Only)

•   Broadcasting Band Number & Details (US Only)

•   WIFI Frequency Details (US Only)

•   Other Services CB, GMRS, Aircraft Band, Etc (US Only)

    Currently supported band allocations for countries: United States (US), Canada (CA), Brazil (BR), Spain (ES), United Kingdom (GB), Russian Federation (RU), Ukraine (UA), Japan (JP), India (IN), Korea, Republic of (KR), Thailand (TH), Switzerland (CH), Chile (CL), Denmark (DK), Finland (FI), France (FR), Hungary (HU), Indonesia (ID), Iceland (IS), Italy (IT), Mexico (MX), Netherlands (NL), New Zealand (NZ), Norway (NO), Poland (PL), South Africa (ZA), Sweden (SE), Venezuela (VE), Australia (AU), Slovenia (SI), Ireland (IE), Belgium (BE), Austria (AT), Argentina (AR), Israel (IL), Romania (RO), China (CN), Uruguay (UY), Greece (GR), Panama (PA), Peru (PE)

    I can easily add support for more countries upon request

    Includes man pages and texinfo documentation

  Install

$ pip install rf-info

  Command Line Usage

$ rf-info <frequency> [<units>] [<country>]

Frequency format examples:

$ rf-info 89910000
$ rf-info 23,450,000
$ rf-info 12,634.534
$ rf-info 12_000_000
$ rf-info 344_500.100

Also supports "Radio Display" frequency representation (Dotted notation):

$ rf-info 124.125.000
$ rf-info 1.500.125.000
$ rf-info 000.012.500

Unit examples: hz, khz, Mhz, Ghz (Case Insensitive):

$ rf-info 123.100 mhz
$ rf-info 4.5 ghz

Country examples (2 digit abbriviation, 3 digit abbriviation, 3 digit number, or full name) US, USA, 040, JPN, Spain (Case Insensitive):

$ rf-info 144.400.000 hz US
$ rf-info 88 mhz JPN

  Python Library Usage

>>> from rf_info import Frequency
>>> freq = Frequency('112.434.000')
>>> freq.details()

Returns a dictionary:

>>> {'display': '144.100.000', 'hz': 144100000, 'khz': 144100.0, 'mhz': 144.1, 'ghz': 0.1441, 'wavelength': '2m', 'itu_band': 'Very High Frequency', 'itu_abbr': 'VHF', 'itu_num': 8, 'ieee_band': 'VHF', 'ieee_description': 'Very High Frequency', 'nato_band': 'A', 'waveguide_band': None, 'country_abbr': 'US', 'country_name': 'United States of America', 'amateur': True, 'fixed_station': False, 'mobile_station': False, 'broadcast': False, 'primary_allocation': ['Amateur', 'Amateur-Satellite'], 'secondary_allocation': [], 'allocation_notes': ['[5.216]: Additional allocation: in China, the band 144-146 MHz is also allocated to the aeronautical mobile (OR) service on a secondary basis.']}

Or you can get individual items directly:

>>> freq.itu_band
>>> freq.wavelength
>>> freq.primary_allocation

Also supports adding and subtracting frequencies. Either a frequency object, int, or string representation of a frequency, returns a new frequency object:

>>> new_freq_object = Frequency('001.123.000') + Frequency('7', 'khz')  # Adds 7 khz to 1.123 mhz
>>> new_freq_object = Frequency('1', 'mhz') + 15000  # Adds 15 khz to 1 mhz
>>> new_freq_object = Frequency('123,000') - '000.007.000'  # Subtracts 7 khz from 123 khz

  Output Example

$ rf-info 144.100.000 hz US
Display: 145.825.000
Hz: 145825000
Khz: 145825.0
Mhz: 145.825
Ghz: 0.145825
Wavelength: 2m
ITU Band: Very High Frequency
ITU Abbr: VHF
ITU Num: 8
IEEE Band: VHF
IEEE Description: Very High Frequency
NATO Band: A
Microwave Details: ()
Country Abbr: JP
Country Name: Japan
Fixed Station: False
Mobile Station: False
Broadcasting: False
Sattelite: True
Satellite Details:
    Name: USNAP1 (BRICSAT2 NO-103)
    Sat-Id: 44355
    Link: Downlink
    Modes: 1k2/9k6* FSK
    Callsign: USNAP1-1
    Status: Active
Amateur: True
Primary Allocation:
    Amateur
    Amateur-Satellite
Allocation Notes:
    [5.216]: Additional allocation: in China, the band 144-146 MHz is also allocated to the aeronautical mobile (OR) service on a secondary basis.

  Todo

•   Add interactive terminal mode

  Credits

M. Ian Perry (ianperry99@gmail.com) AD8DL

INSTALLATION

  Requirements

rf-info requires the iso3166 library, and the colorama library for the command line. These are automatically installed when rf-info is installed.

  Stable Version

To install rf-info, run this command in your terminal:

$ pip install rf-info

This is the preferred method to install rf-info, as it will always install the most recent stable release.

If you don't have pip installed, this Python installation guide can guide you through the process.

  Latest Version from sources

The sources for rf-info can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/cosmicc/rf_info

Or download the tarball:

$ curl -OJL https://github.com/cosmicc/rf_info/tarball/master

Once you have a copy of the source, you can install it with:

$ python setup.py install

USAGE

  Python

To use rf-info in a python project:

>>> from rf_info import Frequency
>>> freq = Frequency('112.434.000')

then:

>>> freq.details()

Returns a dictionary of all details:

>>> {'display': '144.100.000', 'hz': 144100000, 'khz': 144100.0, 'mhz': 144.1, 'ghz': 0.1441, 'wavelength': '2m', 'itu_band': 'Very High Frequency', 'itu_abbr': 'VHF', 'itu_num': 8, 'ieee_band': 'VHF', 'ieee_description': 'Very High Frequency', 'nato_band': 'A', 'waveguide_band': None, 'country_abbr': 'US', 'country_name': 'United States of America', 'amateur': True, 'fixed_station': False, 'mobile_station': False, 'broadcast': False, 'primary_allocation': ['Amateur', 'Amateur-Satellite'], 'secondary_allocation': [], 'allocation_notes': ['[5.216]: Additional allocation: in China, the band 144-146 MHz is also allocated to the aeronautical mobile (OR) service on a secondary basis.']}

You can also get each detail individually:

>>> freq.itu_band
>>> freq.wavelength
>>> freq.Primary_Allocation

Also supports adding and subtracting frequencies. Start with a frequency object then annd or subtract another frequency object, int, or string representation of a frequency, returns a new frequency object:

>>> new_freq_object = Frequency('001.123.000') + Frequency('7', 'khz')  # Adds 7 khz to 1.123 mhz
>>> new_freq_object = Frequency('1', 'mhz') + 15000  # Adds 15 khz to 1 mhz
>>> new_freq_object = Frequency('123,000') - '000.007.000'  # Subtracts 7 khz from 123 khz

  Command Line

To use the rf-info command line tool:

$ rf-info <frequency> [<units>] [<country>]

Frequency format examples:

$ rf-info 89910000
$ rf-info 23,450,000
$ rf-info 12,634.534
$ rf-info 12_000_000
$ rf-info 344_500.100

Also supports "Radio Display" frequency representation (Dotted notation):

$ rf-info 124.125.000
$ rf-info 1.500.125.000
$ rf-info 000.012.500

Suffix examples: hz, khz, Mhz, Ghz (Case Insensitive):

$ rf-info 123.100 mhz
$ rf-info 4.5 ghz

Country examples (2 digit abbriviation, 3 digit abbriviation, 3 digit number, or full name): US, USA, 040, JPN, es, Spain (Case Insensitive):

$ rf-info 144.400.000 hz US
$ rf-info 88 mhz JPN

Example command line output:

$ rf-info 144.100.000 hz US
Display: 144.100.000
Hz: 144100000
Khz: 144100.0
Mhz: 144.1
Ghz: 0.1441
Wavelength: 2m
Itu_Band: Very High Frequency
Itu_Abbr: VHF
Itu_Num: 8
Ieee_Band: VHF
Ieee_Description: Very High Frequency
Nato_Band: A
Country_Abbr: US
Country_Name: United States of America
Fixed_Station: False
Mobile_Station: False
Broadcasting: False
Amateur: True
Amateur_Details:
    General CW and weak signals
    License Class
Max Power
Primary_Allocation:
    Amateur
    Amateur-Satellite
Allocation_Notes:
    [5.216]: Additional allocation: in China, the band 144-146 MHz is also allocated to the aeronautical mobile (OR) service on a

You also can print the info in raw or json formatted output:

$ rf-info 144.000 hz --raw
$ rf-info 144.000 hz --json

RF_INFO

  rf_info package

  Subpackages

  rf_info.data package

  Submodules

  rf_info.data.a_allocations module

  rf_info.data.b_allocations module

  rf_info.data.c_allocations module

  rf_info.data.international module

  rf_info.data.rangekeydict module

class rf_info.data.rangekeydict.RangeKeyDict(my_dict)
    Bases: object

  rf_info.data.satellites module

  rf_info.data.us module

  Module contents

  Submodules

  rf_info.cli module

rf_info.cli.country_list()

rf_info.cli.country_shortlist()

rf_info.cli.display_json(frequency_obj)

rf_info.cli.display_raw(frequency_obj)

rf_info.cli.display_results(frequency, unit, country)

rf_info.cli.get_frequency_obj(frequency, unit, country)

rf_info.cli.main(argv=None)

rf_info.cli.verify_country(country)

  rf_info.countrymap module

  rf_info.rf_info module

class rf_info.rf_info.Frequency(freq, unit='hz', country='us')
    Bases: object

details()

info()

rf_info.rf_info.parse_freq(freq, unit)

  Module contents

CONTRIBUTING

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

  Types of Contributions

  Report Bugs

Report bugs at https://github.com/cosmicc/rf_info/issues.

If you are reporting a bug, please include:

•   Your operating system name and version.

•   Any details about your local setup that might be helpful in troubleshooting.

•   Detailed steps to reproduce the bug.

  Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.

  Implement Features

Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.

  Write Documentation

rf-info could always use more documentation, whether as part of the official rf-info docs, in docstrings, or even on the web in blog posts, articles, and such.

  Submit Feedback

The best way to send feedback is to file an issue at https://github.com/cosmicc/rf_info/issues.

If you are proposing a feature:

•   Explain in detail how it would work.

•   Keep the scope as narrow as possible, to make it easier to implement.

•   Remember that this is a volunteer-driven project, and that contributions are welcome :)

  Get Started!

Ready to contribute? Here's how to set up rf_info for local development.

1.  Fork the rf_info repo on GitHub.

2.  Clone your fork locally:

    $ git clone git@github.com:your_name_here/rf_info.git

3.  Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

    $ mkvirtualenv rf_info
    $ cd rf_info/
    $ python setup.py develop

4.  Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature

    Now you can make your changes locally.

5.  When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

    $ flake8 rf_info tests
    $ python setup.py test or pytest
    $ tox

    To get flake8 and tox, just pip install them into your virtualenv.

6.  Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature

7.  Submit a pull request through the GitHub website.

  Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

1.  The pull request should include tests.

2.  If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.

3.  The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check https://travis-ci.org/cosmicc/rf_info/pull_requests and make sure that the tests pass for all supported Python versions.

  Tips

To run a subset of tests:

$ pytest tests.test_rf_info

  Deploying

A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:

$ bump2version patch # possible: major / minor / patch
$ git push
$ git push --tags

Travis will then deploy to PyPI if tests pass.

CREDITS

  Development Lead

•   Ian Perry <ianperry99@gmail.com>

  Contributors

None yet. Why not be the first?

HISTORY

  0.7.1b (2020-01-23)

•   First Stable Pre-release

•   genindex

•   modindex

•   search

AUTHOR
Ian Perry

COPYRIGHT
2020, Ian Perry