Skip to content

Commit

Permalink
0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicc committed Jan 17, 2020
1 parent c662c78 commit 20bfe7a
Show file tree
Hide file tree
Showing 6 changed files with 656 additions and 10 deletions.
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,29 +71,33 @@ hz, khz, Mhz, Ghz (Case Insensitive)


Command Line:
::

rf-info <frequency> [<suffix>]
$ rf-info <frequency> [<suffix>]


Python:
::

from rf-info import Frequency
>>> from rf-info import Frequency

freq = Frequency('112.434.000')
>>> freq = Frequency('112.434.000')

Then:

freq.details()
::
>>> freq.details()

returns a dictionary:

{'display': '144.051.000', 'hz': 144051000, 'khz': 144051.0, 'mhz': 144.051, 'ghz': 0.144051, '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, 'band_use': (), 'amateur_band': (True, 'Class', 'Use', 'General CW and weak signals')}

or you can get individual items directly:

freq.itu_band
::

>>> freq.itu_band

freq.wavelength
>>> freq.wavelength

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

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 20bfe7a

Please sign in to comment.