From ee7e4b8732e23c298da10e07163748156c16d0fa Mon Sep 17 00:00:00 2001 From: "Tobias Wellnitz, DH1TW" Date: Sun, 20 May 2018 20:10:25 +0200 Subject: [PATCH] FT8 as mode. FT8 frequencies are now marked as DIGITAL --- docs/source/changelog.rst | 10 +++++++++- pyhamtools/consts.py | 2 +- pyhamtools/frequency.py | 27 +++++++++++++++------------ pyhamtools/version.py | 2 +- test/test_utils_freq_to_band.py | 21 +++++++++++---------- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 6bad659..69acc73 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1,11 +1,19 @@ Changelog --------- +PyHamTools 0.7.1 +================ + +21. May 2018 + + * Refined FT8 frequencies + + PyHamTools 0.7.0 ================ 20. May 2018 - * Added FT8 to modes + * Added FT8 frequencies as DIGITAL * Updated test fixtures * Minor fixes wrt Kosovo & AD1C Countryfiles diff --git a/pyhamtools/consts.py b/pyhamtools/consts.py index 8bd9b13..2e6a8c5 100644 --- a/pyhamtools/consts.py +++ b/pyhamtools/consts.py @@ -39,7 +39,7 @@ class LookupConventions: LSB = u"LSB" DIGITAL = u"DIGITAL" FM = u"FM" - FT8 = u'FT8' + # FT8 = u'FT8' #DX Spot SPOTTER = u"spotter" diff --git a/pyhamtools/frequency.py b/pyhamtools/frequency.py index 06f0d96..51ad88b 100644 --- a/pyhamtools/frequency.py +++ b/pyhamtools/frequency.py @@ -31,7 +31,6 @@ def freq_to_band(freq): - USB - LSB - DIGITAL - - FT8 """ @@ -47,7 +46,7 @@ def freq_to_band(freq): elif ((freq >= 1838) and (freq < 1840)): mode = const.DIGITAL elif (freq == 1840): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 1840) and (freq < 2000)): mode = const.LSB elif ((freq >= 3500) and (freq <= 4000)): @@ -55,7 +54,7 @@ def freq_to_band(freq): if ((freq >= 3500) and (freq < 3573)): mode = const.CW elif (freq == 3573): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 3573) and (freq < 3580)): mode = const.CW elif ((freq >= 3580) and (freq < 3600)): @@ -73,7 +72,7 @@ def freq_to_band(freq): elif ((freq >= 7050) and (freq < 7074)): mode = const.LSB elif (freq == 7074): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 7074) and (freq < 7300)): mode = const.LSB elif ((freq >= 10100) and (freq <= 10150)): @@ -81,7 +80,7 @@ def freq_to_band(freq): if ((freq >= 10100) and (freq < 10136)): mode = const.CW elif (freq == 10136): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 10136) and (freq < 10140)): mode = const.CW elif ((freq >= 10140) and (freq < 10150)): @@ -93,7 +92,7 @@ def freq_to_band(freq): elif ((freq >= 14070) and (freq < 14074)): mode = const.DIGITAL elif (freq == 14074): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 14074) and (freq < 14099)): mode = const.DIGITAL elif ((freq >= 14100) and (freq < 14350)): @@ -105,7 +104,7 @@ def freq_to_band(freq): elif ((freq >= 18095) and (freq < 18100)): mode = const.DIGITAL elif (freq == 18100): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 18100) and (freq < 18110)): mode = const.DIGITAL elif ((freq >= 18110) and (freq < 18268)): @@ -117,7 +116,7 @@ def freq_to_band(freq): elif ((freq >= 21070) and (freq < 21074)): mode = const.DIGITAL elif (freq == 21074): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 21074) and (freq < 21150)): mode = const.DIGITAL elif ((freq >= 21150) and (freq < 21450)): @@ -127,7 +126,7 @@ def freq_to_band(freq): if ((freq >= 24890) and (freq < 24915)): mode = const.CW elif (freq == 24915): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 24915) and (freq < 24930)): mode = const.DIGITAL elif ((freq >= 24930) and (freq < 24990)): @@ -139,7 +138,7 @@ def freq_to_band(freq): elif ((freq >= 28070) and (freq < 28074)): mode = const.DIGITAL elif (freq == 28074): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 28074) and (freq < 28190)): mode = const.DIGITAL elif ((freq >= 28300) and (freq < 29700)): @@ -151,7 +150,7 @@ def freq_to_band(freq): elif ((freq >= 50100) and (freq < 50313)): mode = const.USB elif (freq == 50313): - mode = const.FT8 + mode = const.DIGITAL #FT8 elif ((freq > 50313) and (freq < 50500)): mode = const.USB elif ((freq >= 50500) and (freq < 51000)): @@ -163,7 +162,11 @@ def freq_to_band(freq): band = 2 if ((freq >= 144000) and (freq < 144150)): mode = const.CW - elif ((freq >= 144150) and (freq < 144400)): + elif ((freq >= 144150) and (freq < 144174)): + mode = const.USB + elif (freq >= 144174) and (freq < 144175): + mode = const.DIGITAL #FT8 + elif ((freq > 144175) and (freq < 144400)): mode = const.USB elif ((freq >= 144400) and (freq < 148000)): mode = None diff --git a/pyhamtools/version.py b/pyhamtools/version.py index a0bcc73..b3c0e4e 100644 --- a/pyhamtools/version.py +++ b/pyhamtools/version.py @@ -1,3 +1,3 @@ -VERSION = (0, 7, 0) +VERSION = (0, 7, 1) __release__ = ''.join(['-.'[type(x) == int]+str(x) for x in VERSION])[1:] __version__ = '.'.join((str(VERSION[0]), str(VERSION[1]))) diff --git a/test/test_utils_freq_to_band.py b/test/test_utils_freq_to_band.py index 94ab6f4..1373f0c 100644 --- a/test/test_utils_freq_to_band.py +++ b/test/test_utils_freq_to_band.py @@ -81,13 +81,14 @@ class Test_utils_freq_to_band(): freq_to_band(16304) def test_ft_frequencies(self): - assert freq_to_band(1840) == {"band": 160, "mode": const.FT8} - assert freq_to_band(3573) == {"band": 80, "mode": const.FT8} - assert freq_to_band(7074) == {"band": 40, "mode": const.FT8} - assert freq_to_band(10136) == {"band": 30, "mode": const.FT8} - assert freq_to_band(14074) == {"band": 20, "mode": const.FT8} - assert freq_to_band(18100) == {"band": 17, "mode": const.FT8} - assert freq_to_band(21074) == {"band": 15, "mode": const.FT8} - assert freq_to_band(24915) == {"band": 12, "mode": const.FT8} - assert freq_to_band(28074) == {"band": 10, "mode": const.FT8} - assert freq_to_band(50313) == {"band": 6, "mode": const.FT8} \ No newline at end of file + assert freq_to_band(1840) == {"band": 160, "mode": const.DIGITAL} #FT8 + assert freq_to_band(3573) == {"band": 80, "mode": const.DIGITAL} #FT8 + assert freq_to_band(7074) == {"band": 40, "mode": const.DIGITAL} #FT8 + assert freq_to_band(10136) == {"band": 30, "mode": const.DIGITAL} #FT8 + assert freq_to_band(14074) == {"band": 20, "mode": const.DIGITAL} #FT8 + assert freq_to_band(18100) == {"band": 17, "mode": const.DIGITAL} #FT8 + assert freq_to_band(21074) == {"band": 15, "mode": const.DIGITAL} #FT8 + assert freq_to_band(24915) == {"band": 12, "mode": const.DIGITAL} #FT8 + assert freq_to_band(28074) == {"band": 10, "mode": const.DIGITAL} #FT8 + assert freq_to_band(50313) == {"band": 6, "mode": const.DIGITAL} #FT8 + assert freq_to_band(144174.5) == {"band": 2, "mode": const.DIGITAL} #FT8 \ No newline at end of file