Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.8.0 #12

Merged
merged 4 commits into from Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
86 changes: 43 additions & 43 deletions README.rst
Expand Up @@ -37,8 +37,8 @@ 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
* Linux & Windows with color & interactive terminal support
* Python 3.5, 3.6, 3.7, 3.8 & pypy3 tested. Not compatible with Python 2.x
* Linux & Windows with color, json output, and interactive terminal support


Features
Expand Down Expand Up @@ -72,16 +72,14 @@ United States (US), Canada (CA), Brazil (BR), Spain (ES), United Kingdom (GB), R

I can easily add support for more countries upon request

Command line supports color, raw parsable, and json output

Includes man pages and texinfo documentation


Install
-------
::

$ pip3 install rf-info
$ pip install rf-info


Command Line Usage
Expand Down Expand Up @@ -122,18 +120,20 @@ Python Library Usage
::

>>> from rf_info import Frequency
>>> freq = Frequency('112.434.000')
>>> freq = Frequency('144.890.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.']}
>>> {'display': '144.890.000', 'units': {'hz': 144890000, 'khz': 144890.0, 'mhz': 144.89, 'ghz': 0.14489}, 'wavelength': '2m', 'itu': {'number': 8, 'band': 'Very High Frequency', 'abbr': 'VHF'}, 'ieee': {'band': 'VHF', 'description': 'Very High Frequency'}, 'nato': {'band': 'A'}, 'ism': {'band': None, 'description': None}, 'waveguide': {'band': None}, 'microwave': {'band': None, 'allocation': None}, 'country': {'name': 'United States of America', 'abbr': 'US'}, 'broadcasting': {'allocated': False, 'details': ()}, 'wifi': {'allocated': False, 'details': None}, 'amateur': {'allocated': True, 'modes': 'CW, Phone, Image, RTTY/Data', 'license': 'Tech, General, Extra', 'power': 'MAX'}, 'satellite': {'allocated': False, 'name': None, 'sat-id': None, 'link': None, 'modes': None, 'callsign': None, 'status': None}, 'services': None, 'station': {'fixed': False, 'mobile': False}, 'ieee_allocation': {'primary': ('Amateur', 'Amateur-Satellite'), 'secondary': (), '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.itu
>>> freq.itu['band']
>>> freq.wavelength
>>> freq.primary_allocation
>>> freq.ieee_allocation['primary']

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

Expand All @@ -146,40 +146,40 @@ 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.
$ rf-info 435.890.000 hz US

Display: 435.890.000
Hz: 435,890,000
Khz: 435,890
Mhz: 435.89
Ghz: 0.43589
Wavelength: 68cm
ITU Band: 9 - UHF (Ultra High Frequency)
IEEE Band: UHF (Ultra High Frequency)
NATO Band: B
Waveguide Band: None
Microwave Band: None
Country: United States of America (US)
Broadcasting: False
Wifi: False
Amateur: True
Modes: Satellite only uplink/downlink
License: Tech, General, Extra
Power: MAX
Satellite: True
Name: JAS-2 (FO-29) [24278]
Link: Downlink
Modes: SSB CW (DigiTalker)
Status: Active
Fixed Station: False
Mobile Station: False
Primary Allocation:
- Radiolocation
Secondary Allocation:
- Amateur
- Earth Exploration-Satellite (Active) [5.279A]
Allocation Notes:
- [5.279A]: The use of the frequency band 432-438 MHz by sensors in the Earth exploration-satellite service (active) shall be in accordance with Recommendation ITU-R RS.1260-1. Additionally, the Earth exploration-satellite service (active) in the frequency band 432-438 MHz shall not cause harmful interference to the aeronautical radionavigation service in China. The provisions of this footnote in no way diminish the obligation of the Earth exploration-satellite service (active) to operate as a secondary service in accordance with Nos. 5.29 and 5.30. (WRC-15)


Todo
Expand Down
20 changes: 10 additions & 10 deletions docs/rf_info.data.rst
Expand Up @@ -28,14 +28,6 @@ rf\_info.data.c\_allocations module
:undoc-members:
:show-inheritance:

rf\_info.data.countrymap module
-------------------------------

.. automodule:: rf_info.data.countrymap
:members:
:undoc-members:
:show-inheritance:

rf\_info.data.international module
----------------------------------

Expand All @@ -52,10 +44,18 @@ rf\_info.data.rangekeydict module
:undoc-members:
:show-inheritance:

rf\_info.data.us\_extras module
rf\_info.data.satellites module
-------------------------------

.. automodule:: rf_info.data.us_extras
.. automodule:: rf_info.data.satellites
:members:
:undoc-members:
:show-inheritance:

rf\_info.data.us module
-----------------------

.. automodule:: rf_info.data.us
:members:
:undoc-members:
:show-inheritance:
Expand Down
2 changes: 1 addition & 1 deletion rf_info/__init__.py
Expand Up @@ -2,7 +2,7 @@

__author__ = """Ian Perry"""
__email__ = 'ianperry99@gmail.com'
__version__ = '0.7.2'
__version__ = '0.8.0'
__license__ = 'MIT'
__progname__ = 'rf-info'
__description__ = "Radio Frequency Information"