kopia lustrzana https://github.com/NanoVNA-Saver/nanovna-saver
Prepartion for new github orginisational location
rodzic
3c77a86b58
commit
d6acb7121c
|
@ -0,0 +1,37 @@
|
|||
# NanoVNASaver
|
||||
#
|
||||
# A python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
# Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
VERSION = "0.3.0"
|
||||
VERSION_URL = (
|
||||
"https://raw.githubusercontent.com/"
|
||||
"NanoVNA-Saver/nanovna-saver/master/NanoVNASaver/About.py")
|
||||
|
||||
INFO_URL="https://github.com/NanoVNA-Saver/nanovna-saver"
|
||||
INFO = f"""NanoVNASaver {VERSION}
|
||||
|
||||
Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
|
||||
This program comes with ABSOLUTELY NO WARRANTY
|
||||
This program is licensed under the GNU General Public License version 3
|
||||
|
||||
See {INFO_URL} for further details.
|
||||
"""
|
||||
|
||||
RELEASE_URL="https://github.com/NanoVNA-Saver/nanovna-saver"
|
|
@ -1,6 +1,8 @@
|
|||
# NanoVNASaver
|
||||
#
|
||||
# A python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
# Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
# Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -15,13 +17,14 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
import logging
|
||||
import re
|
||||
from time import sleep
|
||||
from typing import List
|
||||
|
||||
import serial
|
||||
from PyQt5 import QtWidgets, QtGui
|
||||
|
||||
from NanoVNASaver.Settings import Version
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -35,7 +38,7 @@ class VNA:
|
|||
self.version: Version = Version("0.0.0")
|
||||
self.features = set()
|
||||
self.validateInput = True
|
||||
self.datapoints = self._datapoints[0]
|
||||
self.datapoints = VNA._datapoints[0]
|
||||
|
||||
def readFeatures(self) -> List[str]:
|
||||
raw_help = self.readFromCommand("help")
|
||||
|
@ -184,9 +187,6 @@ class InvalidVNA(VNA):
|
|||
name = "Invalid"
|
||||
_datapoints = (0, )
|
||||
|
||||
def __init__(self, app: QtWidgets.QWidget, serial_port: serial.Serial):
|
||||
super().__init__(app, serial_port)
|
||||
|
||||
def setSweep(self, start, stop):
|
||||
return
|
||||
|
||||
|
@ -207,58 +207,3 @@ class InvalidVNA(VNA):
|
|||
|
||||
def flushSerialBuffers(self):
|
||||
return
|
||||
|
||||
|
||||
# TODO: should go to Settings.py and be generalized
|
||||
class Version:
|
||||
major = 0
|
||||
minor = 0
|
||||
revision = 0
|
||||
note = ""
|
||||
version_string = ""
|
||||
|
||||
def __init__(self, version_string):
|
||||
self.version_string = version_string
|
||||
results = re.match(
|
||||
r"(.*\s+)?(\d+)\.(\d+)\.(\d+)(.*)",
|
||||
version_string)
|
||||
if results:
|
||||
self.major = int(results.group(2))
|
||||
self.minor = int(results.group(3))
|
||||
self.revision = int(results.group(4))
|
||||
self.note = results.group(5)
|
||||
logger.debug(
|
||||
"Parsed version as \"%d.%d.%d%s\"",
|
||||
self.major, self.minor, self.revision, self.note)
|
||||
|
||||
def __gt__(self, other: "Version") -> bool:
|
||||
if self.major > other.major:
|
||||
return True
|
||||
if self.major < other.major:
|
||||
return False
|
||||
if self.minor > other.minor:
|
||||
return True
|
||||
if self.minor < other.minor:
|
||||
return False
|
||||
if self.revision > other.revision:
|
||||
return True
|
||||
return False
|
||||
|
||||
def __lt__(self, other: "Version") -> bool:
|
||||
return other > self
|
||||
|
||||
def __ge__(self, other: "Version") -> bool:
|
||||
return self > other or self == other
|
||||
|
||||
def __le__(self, other: "Version") -> bool:
|
||||
return self < other or self == other
|
||||
|
||||
def __eq__(self, other: "Version") -> bool:
|
||||
return (
|
||||
self.major == other.major and
|
||||
self.minor == other.minor and
|
||||
self.revision == other.revision and
|
||||
self.note == other.note)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{self.major}.{self.minor}.{self.revision}{self.note}"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# NanoVNASaver
|
||||
#
|
||||
# A python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
# Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
# Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -51,7 +53,7 @@ from .Marker import Marker
|
|||
from .SweepWorker import SweepWorker
|
||||
from .Settings import BandsModel
|
||||
from .Touchstone import Touchstone
|
||||
from .about import version as ver
|
||||
from .About import VERSION as ver
|
||||
from NanoVNASaver.RFTools import corrAttData
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# NanoVNASaver
|
||||
#
|
||||
# A python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
# Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
# Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -15,6 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
import logging
|
||||
import re
|
||||
import typing
|
||||
from typing import List, Tuple
|
||||
|
||||
|
@ -149,3 +152,56 @@ class BandsModel(QtCore.QAbstractTableModel):
|
|||
|
||||
def setColor(self, color):
|
||||
self.color = color
|
||||
|
||||
|
||||
class Version:
|
||||
RXP = re.compile(r"(.*\s+)?(\d+)\.(\d+)\.(\d+)(.*)")
|
||||
|
||||
def __init__(self, version_string: str):
|
||||
self.major = 0
|
||||
self.minor = 0
|
||||
self.revision = 0
|
||||
self.note = ""
|
||||
self.version_string = version_string
|
||||
|
||||
results = Version.RXP.match(version_string)
|
||||
if results:
|
||||
self.major = int(results.group(2))
|
||||
self.minor = int(results.group(3))
|
||||
self.revision = int(results.group(4))
|
||||
self.note = results.group(5)
|
||||
logger.debug(
|
||||
"Parsed version as \"%d.%d.%d%s\"",
|
||||
self.major, self.minor, self.revision, self.note)
|
||||
|
||||
def __gt__(self, other: "Version") -> bool:
|
||||
if self.major > other.major:
|
||||
return True
|
||||
if self.major < other.major:
|
||||
return False
|
||||
if self.minor > other.minor:
|
||||
return True
|
||||
if self.minor < other.minor:
|
||||
return False
|
||||
if self.revision > other.revision:
|
||||
return True
|
||||
return False
|
||||
|
||||
def __lt__(self, other: "Version") -> bool:
|
||||
return other > self
|
||||
|
||||
def __ge__(self, other: "Version") -> bool:
|
||||
return self > other or self == other
|
||||
|
||||
def __le__(self, other: "Version") -> bool:
|
||||
return self < other or self == other
|
||||
|
||||
def __eq__(self, other: "Version") -> bool:
|
||||
return (
|
||||
self.major == other.major and
|
||||
self.minor == other.minor and
|
||||
self.revision == other.revision and
|
||||
self.note == other.note)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{self.major}.{self.minor}.{self.revision}{self.note}"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# NanoVNASaver
|
||||
#
|
||||
# A python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
# Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
# Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -21,7 +23,8 @@ from urllib import request, error
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from NanoVNASaver.Hardware import Version
|
||||
from NanoVNASaver.About import VERSION_URL, INFO_URL
|
||||
from NanoVNASaver.Settings import Version
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -51,20 +54,24 @@ class AboutWindow(QtWidgets.QWidget):
|
|||
f"NanoVNASaver version {self.app.version}"))
|
||||
layout.addWidget(QtWidgets.QLabel(""))
|
||||
layout.addWidget(QtWidgets.QLabel(
|
||||
"\N{COPYRIGHT SIGN} Copyright 2019 Rune B. Broberg"))
|
||||
"\N{COPYRIGHT SIGN} Copyright 2019, 2020 Rune B. Broberg"
|
||||
"\N{COPYRIGHT SIGN} Copyright 2020 NanoVNA-Saver Authors"
|
||||
))
|
||||
layout.addWidget(QtWidgets.QLabel(
|
||||
"This program comes with ABSOLUTELY NO WARRANTY"))
|
||||
layout.addWidget(QtWidgets.QLabel(
|
||||
"This program is licensed under the GNU General Public License version 3"))
|
||||
"This program is licensed under the"
|
||||
" GNU General Public License version 3"))
|
||||
layout.addWidget(QtWidgets.QLabel(""))
|
||||
link_label = QtWidgets.QLabel(
|
||||
"For further details, see: <a href=\"https://mihtjel.github.io/nanovna-saver/\">"
|
||||
"https://mihtjel.github.io/nanovna-saver/</a>")
|
||||
f'For further details, see: <a href="{INFO_URL}">'
|
||||
f"{INFO_URL}")
|
||||
link_label.setOpenExternalLinks(True)
|
||||
layout.addWidget(link_label)
|
||||
layout.addWidget(QtWidgets.QLabel(""))
|
||||
|
||||
self.versionLabel = QtWidgets.QLabel("NanoVNA Firmware Version: Not connected.")
|
||||
self.versionLabel = QtWidgets.QLabel(
|
||||
"NanoVNA Firmware Version: Not connected.")
|
||||
layout.addWidget(self.versionLabel)
|
||||
|
||||
layout.addStretch()
|
||||
|
@ -73,11 +80,13 @@ class AboutWindow(QtWidgets.QWidget):
|
|||
btn_check_version.clicked.connect(self.findUpdates)
|
||||
|
||||
self.updateLabel = QtWidgets.QLabel("Last checked: ")
|
||||
self.updateCheckBox = QtWidgets.QCheckBox("Check for updates on startup")
|
||||
self.updateCheckBox = QtWidgets.QCheckBox(
|
||||
"Check for updates on startup")
|
||||
|
||||
self.updateCheckBox.toggled.connect(self.updateSettings)
|
||||
|
||||
check_for_updates = self.app.settings.value("CheckForUpdates", "Ask")
|
||||
check_for_updates = self.app.settings.value(
|
||||
"CheckForUpdates", "Ask")
|
||||
if check_for_updates == "Yes":
|
||||
self.updateCheckBox.setChecked(True)
|
||||
self.findUpdates(automatic=True)
|
||||
|
@ -125,7 +134,8 @@ class AboutWindow(QtWidgets.QWidget):
|
|||
selection = QtWidgets.QMessageBox.question(
|
||||
self.app,
|
||||
"Enable checking for updates?",
|
||||
"Would you like NanoVNA-Saver to check for updates automatically?")
|
||||
"Would you like NanoVNA-Saver to"
|
||||
" check for updates automatically?")
|
||||
if selection == QtWidgets.QMessageBox.Yes:
|
||||
self.updateCheckBox.setChecked(True)
|
||||
self.app.settings.setValue("CheckForUpdates", "Yes")
|
||||
|
@ -136,24 +146,27 @@ class AboutWindow(QtWidgets.QWidget):
|
|||
QtWidgets.QMessageBox.information(
|
||||
self.app,
|
||||
"Checking for updates disabled",
|
||||
"You can check for updates using the \"About\" window.")
|
||||
'You can check for updates using the "About" window.')
|
||||
else:
|
||||
self.app.settings.setValue("CheckForUpdates", "Ask")
|
||||
|
||||
def findUpdates(self, automatic=False):
|
||||
update_url = "http://mihtjel.dk/nanovna-saver/latest.json"
|
||||
|
||||
latest_version = Version("")
|
||||
latest_url = ""
|
||||
try:
|
||||
req = request.Request(update_url)
|
||||
req = request.Request(VERSION_URL)
|
||||
req.add_header('User-Agent', "NanoVNA-Saver/" + self.app.version)
|
||||
updates = json.load(request.urlopen(req, timeout=3))
|
||||
latest_version = Version(updates['version'])
|
||||
latest_url = updates['url']
|
||||
for line in request.urlopen(req, timeout=3):
|
||||
line = line.decode("utf-8")
|
||||
if line.startswith("VERSION ="):
|
||||
latest_version = Version(line[8:].strip(" \"'"))
|
||||
if line.startswith("RELEASE_URL ="):
|
||||
latest_url = line[13:].strip(" \"'")
|
||||
except error.HTTPError as e:
|
||||
logger.exception("Checking for updates produced an HTTP exception: %s", e)
|
||||
self.updateLabel.setText("Connection error.")
|
||||
return
|
||||
except json.JSONDecodeError as e:
|
||||
except TypeError as e:
|
||||
logger.exception("Checking for updates provided an unparseable file: %s", e)
|
||||
self.updateLabel.setText("Data error reading versions.")
|
||||
return
|
||||
|
@ -186,5 +199,6 @@ class AboutWindow(QtWidgets.QWidget):
|
|||
# Maybe consider showing it if not an automatic update.
|
||||
#
|
||||
self.updateLabel.setText(
|
||||
f"Last checked: {strftime('%Y-%m-%d %H:%M:%S', localtime())}")
|
||||
f"Last checked: "
|
||||
f"{strftime('%Y-%m-%d %H:%M:%S', localtime())}")
|
||||
return
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#! /bin/env python
|
||||
|
||||
# NanoVNASaver - a python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
#
|
||||
# NanoVNASaver
|
||||
#
|
||||
# A python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
# Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -15,60 +18,64 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
NanoVNASaver
|
||||
|
||||
A multiplatform tool to save Touchstone files from the
|
||||
NanoVNA, sweep frequency spans in segments to gain more
|
||||
data points, and generally display and analyze the
|
||||
resulting data.
|
||||
"""
|
||||
import argparse
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from .NanoVNASaver import NanoVNASaver
|
||||
from .about import debug
|
||||
from NanoVNASaver.About import VERSION, INFO
|
||||
from NanoVNASaver.NanoVNASaver import NanoVNASaver
|
||||
|
||||
|
||||
def main():
|
||||
print("NanoVNASaver " + NanoVNASaver.version)
|
||||
print("Copyright (C) 2019 Rune B. Broberg")
|
||||
print("This program comes with ABSOLUTELY NO WARRANTY")
|
||||
print("This program is licensed under the GNU General Public License version 3")
|
||||
print("")
|
||||
print("See https://github.com/mihtjel/nanovna-saver for further details")
|
||||
# Main code goes here
|
||||
parser = argparse.ArgumentParser(
|
||||
description=__doc__,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
parser.add_argument("-d", "--debug", action="store_true",
|
||||
help="Set loglevel to debug")
|
||||
parser.add_argument("-D", "--debug-file",
|
||||
help="File to write debug logging output to")
|
||||
parser.add_argument("--version", action="version",
|
||||
version=f"NanoVNASaver {VERSION}")
|
||||
args = parser.parse_args()
|
||||
|
||||
console_log_level = logging.WARNING
|
||||
file_log_level = logging.DEBUG
|
||||
log_file = ""
|
||||
|
||||
for i in range(len(sys.argv)):
|
||||
if sys.argv[i] == "-d":
|
||||
console_log_level = logging.DEBUG
|
||||
elif sys.argv[i] == "-D" and i < len(sys.argv) - 1:
|
||||
log_file = sys.argv[i+1]
|
||||
elif sys.argv[i] == "-D":
|
||||
print("You must enter a file name when using -D")
|
||||
return
|
||||
print(INFO)
|
||||
|
||||
if debug:
|
||||
if args.debug:
|
||||
console_log_level = logging.DEBUG
|
||||
|
||||
logger = logging.getLogger("NanoVNASaver")
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
ch = logging.StreamHandler()
|
||||
ch.setLevel(console_log_level)
|
||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
formatter = logging.Formatter(
|
||||
'%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
ch.setFormatter(formatter)
|
||||
logger.addHandler(ch)
|
||||
if log_file != "":
|
||||
try:
|
||||
fh = logging.FileHandler(log_file)
|
||||
except Exception as e:
|
||||
logger.exception("Error opening log file: %s", e)
|
||||
return
|
||||
|
||||
if args.debug_file:
|
||||
fh = logging.FileHandler(args.debug_file)
|
||||
fh.setLevel(file_log_level)
|
||||
fh.setFormatter(formatter)
|
||||
logger.addHandler(fh)
|
||||
|
||||
logger.info("Startup...")
|
||||
|
||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
|
||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling,
|
||||
True)
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = NanoVNASaver()
|
||||
window.show()
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
# NanoVNASaver - a python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
version = '0.2.3-dg5gbh'
|
||||
# debug = False
|
||||
debug = True
|
|
@ -4,7 +4,10 @@
|
|||
[![GitHub Releases](https://img.shields.io/github/downloads/mihtjel/nanovna-saver/latest/total)](https://github.com/mihtjel/nanovna-saver/releases/latest)
|
||||
[![Donate](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=T8KTGVDQF5K6E&item_name=NanoVNASaver+Development¤cy_code=EUR&source=url)
|
||||
|
||||
NanoVNASaver ============ A multiplatform tool to save Touchstone files from
|
||||
NanoVNASaver
|
||||
============
|
||||
|
||||
A multiplatform tool to save Touchstone files from
|
||||
the NanoVNA, sweep frequency spans in segments to gain more than 101 data
|
||||
points, and generally display and analyze the resulting data.
|
||||
|
||||
|
|
12
setup.cfg
12
setup.cfg
|
@ -1,2 +1,12 @@
|
|||
[metadata]
|
||||
description-file = README.md
|
||||
name = NanoVNASaver
|
||||
author = Rune B. Broberg
|
||||
license = GNU GPL V3
|
||||
license_file = LICENSE
|
||||
description = A multiplatform tool to save Touchstone files from the
|
||||
NanoVNA, sweep frequency spans in segments to gain more
|
||||
data points, and generally display and analyze the
|
||||
resulting data.
|
||||
long_description = file: README.md
|
||||
url = https://github.com/NanoVNA-Saver/nanovna-saver
|
||||
version = attr: NanoVNASaver.About.VERSION
|
||||
|
|
20
setup.py
20
setup.py
|
@ -1,5 +1,8 @@
|
|||
# NanoVNASaver - a python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
# NanoVNASaver
|
||||
#
|
||||
# A python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
# Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,9 +16,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
from NanoVNASaver.about import version
|
||||
|
||||
if sys.version_info < (3, 7):
|
||||
print("You need at least Python 3.7 for this application!")
|
||||
|
@ -30,19 +31,8 @@ except ImportError:
|
|||
print("Try installing them with pip install setuptools")
|
||||
sys.exit(1)
|
||||
|
||||
with open("README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setup(
|
||||
name='NanoVNASaver',
|
||||
url='https://github.com/mihtjel/nanovna-saver',
|
||||
version=version,
|
||||
author='Rune B. Broberg',
|
||||
author_email='',
|
||||
packages=find_packages(exclude=["test", ]),
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
license='LICENSE.txt',
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'NanoVNASaver = NanoVNASaver.__main__:main'
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# NanoVNASaver - a python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
# NanoVNASaver
|
||||
#
|
||||
# A python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019, 2020 Rune B. Broberg
|
||||
# Copyright (C) 2020 NanoVNA-Saver Authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -13,4 +16,3 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
# Calibration data for NanoVNA-Saver
|
||||
! SOL Calibration
|
||||
! 27-30Mhz 101 Points
|
||||
# Hz ShortR ShortI OpenR OpenI LoadR LoadI ThroughR ThroughI IsolationR IsolationI
|
||||
27000000 0.948987136 -0.423713696 -0.862881088 0.584374208 -0.584138048 0.409614848
|
||||
27030000 0.95050944 -0.421384544 -0.86482624 0.58150208 -0.58608 0.407054528
|
||||
27060000 0.952427776 -0.419021984 -0.866214592 0.578889728 -0.587020096 0.405044192
|
||||
27090000 0.95315168 -0.416525824 -0.86789984 0.575553728 -0.588066944 0.402468256
|
||||
27120000 0.954115392 -0.414095328 -0.86989632 0.573364288 -0.58962624 0.401025856
|
||||
27150000 0.95504704 -0.411861216 -0.872223616 0.569549888 -0.591408192 0.398595584
|
||||
27180000 0.955773696 -0.409258784 -0.874107136 0.56708832 -0.592301184 0.396703296
|
||||
27210000 0.956872256 -0.406567712 -0.875931072 0.5642784 -0.593603072 0.394556448
|
||||
27240000 0.957776 -0.403988512 -0.877644416 0.5612624 -0.594146624 0.392148736
|
||||
27270000 0.958846272 -0.400933792 -0.879104256 0.558358848 -0.59524544 0.390533024
|
||||
27300000 0.960017088 -0.39894032 -0.880146176 0.556461952 -0.59603776 0.388433696
|
||||
27330000 0.960659328 -0.396177984 -0.881991552 0.553667776 -0.596761344 0.386510336
|
||||
27360000 0.961335296 -0.393679168 -0.883669632 0.550464832 -0.597680512 0.38412048
|
||||
27390000 0.962341568 -0.391430784 -0.886132736 0.547397952 -0.599497152 0.381873504
|
||||
27420000 0.963019328 -0.38918864 -0.88806848 0.544113728 -0.60069568 0.37968576
|
||||
27450000 0.96392928 -0.386622592 -0.890202624 0.54090464 -0.602022208 0.377377504
|
||||
27480000 0.96498208 -0.384330752 -0.891681088 0.538224576 -0.603046144 0.375168032
|
||||
27510000 0.965441728 -0.382015392 -0.894158976 0.535033888 -0.604517632 0.373071744
|
||||
27540000 0.966786496 -0.3796384 -0.89598112 0.532064928 -0.605699584 0.37094736
|
||||
27570000 0.967063872 -0.377387936 -0.898582464 0.52843584 -0.60726112 0.368700224
|
||||
27600000 0.9681776 -0.374776096 -0.899971584 0.525092192 -0.608177472 0.366646976
|
||||
27630000 0.969066432 -0.37252944 -0.902685376 0.522223168 -0.61013184 0.364436032
|
||||
27660000 0.969935488 -0.370256288 -0.90459104 0.518845152 -0.611461568 0.362501888
|
||||
27690000 0.97048352 -0.368154432 -0.906611008 0.515923904 -0.61279904 0.360061984
|
||||
27720000 0.971097344 -0.365651424 -0.90905056 0.512404256 -0.613699584 0.357652512
|
||||
27750000 0.972812224 -0.362664192 -0.91001824 0.510228448 -0.614435584 0.355953344
|
||||
27780000 0.974040768 -0.359744928 -0.910935424 0.507888448 -0.614687744 0.353831008
|
||||
27810000 0.974645184 -0.3575968 -0.913249472 0.504501408 -0.616165696 0.351348512
|
||||
27840000 0.97518336 -0.355629824 -0.915046464 0.501332032 -0.617387584 0.349504256
|
||||
27870000 0.975675136 -0.35366368 -0.917392256 0.497429568 -0.619331264 0.347105536
|
||||
27900000 0.97625056 -0.35130048 -0.919599232 0.494114016 -0.620401088 0.344320096
|
||||
27930000 0.977126336 -0.348989632 -0.921426624 0.490970752 -0.621715328 0.342202432
|
||||
27960000 0.978229632 -0.346312736 -0.922814272 0.4877968 -0.62263136 0.340220736
|
||||
27990000 0.97886816 -0.34338128 -0.924974144 0.484398592 -0.623512448 0.33740736
|
||||
28020000 0.979865984 -0.341380928 -0.92634528 0.481098208 -0.624648448 0.335359104
|
||||
28050000 0.980396608 -0.339280672 -0.9280656 0.477906944 -0.625906816 0.333542272
|
||||
28080000 0.981227264 -0.336904096 -0.930516608 0.475222368 -0.627196864 0.331399616
|
||||
28110000 0.98195552 -0.3347112 -0.932093376 0.471777312 -0.628217472 0.329184992
|
||||
28140000 0.9824928 -0.332363136 -0.933943872 0.468074272 -0.62950784 0.326703616
|
||||
28170000 0.983105408 -0.330165152 -0.936182528 0.464740992 -0.63120672 0.323923424
|
||||
28200000 0.983818752 -0.328010016 -0.937621888 0.4620392 -0.632120064 0.322682816
|
||||
28230000 0.984366528 -0.325650688 -0.939489984 0.458033952 -0.633403392 0.319377792
|
||||
28260000 0.985162624 -0.323433408 -0.9409312 0.454128992 -0.634202304 0.317079232
|
||||
28290000 0.985848896 -0.32110576 -0.943584704 0.45104256 -0.635659904 0.314846848
|
||||
28320000 0.986699456 -0.31893024 -0.945056768 0.448032416 -0.637109888 0.312710752
|
||||
28350000 0.987251264 -0.31661984 -0.947041472 0.444217856 -0.6382784 0.310466432
|
||||
28380000 0.988070784 -0.314645856 -0.948345472 0.44082944 -0.639443264 0.308024352
|
||||
28410000 0.988805696 -0.312004 -0.950325248 0.4370912 -0.640787264 0.305608064
|
||||
28440000 0.989152768 -0.310032192 -0.9525232 0.4332696 -0.64214176 0.303219712
|
||||
28470000 0.990052288 -0.307630016 -0.953933824 0.429828736 -0.643087616 0.300872992
|
||||
28500000 0.990495808 -0.305488672 -0.956173696 0.426323072 -0.644532352 0.298788384
|
||||
28530000 0.99100128 -0.303345088 -0.957806592 0.422572896 -0.645822848 0.295616352
|
||||
28560000 0.991346624 -0.300756736 -0.959882496 0.419539872 -0.647109824 0.294288032
|
||||
28590000 0.991954368 -0.298686528 -0.960835392 0.416210208 -0.648238464 0.29173744
|
||||
28620000 0.992485504 -0.295947904 -0.962957312 0.412563328 -0.649165184 0.289264384
|
||||
28650000 0.993508672 -0.2939904 -0.964553216 0.40887792 -0.649955648 0.286765664
|
||||
28680000 0.994255936 -0.292131616 -0.96638176 0.405625536 -0.651601984 0.28434656
|
||||
28710000 0.994989888 -0.289638304 -0.96800704 0.401801984 -0.65269952 0.282433664
|
||||
28740000 0.995769216 -0.28719056 -0.969230784 0.398162464 -0.653692928 0.279596224
|
||||
28770000 0.996364864 -0.28510752 -0.971080512 0.394552128 -0.6546864 0.277294048
|
||||
28800000 0.996750144 -0.28292528 -0.972598592 0.3913688 -0.655550592 0.275392192
|
||||
28830000 0.997286528 -0.28035296 -0.974633024 0.387517568 -0.656656256 0.272570272
|
||||
28860000 0.99808224 -0.27805792 -0.975680256 0.384404128 -0.657997504 0.270125792
|
||||
28890000 0.99870016 -0.275851392 -0.977529664 0.380696544 -0.659110144 0.267971664
|
||||
28920000 0.999114304 -0.27358176 -0.97861952 0.377251488 -0.659504256 0.26565856
|
||||
28950000 0.999476288 -0.271538048 -0.97993376 0.373766848 -0.660833536 0.262928224
|
||||
28980000 1.000067592 -0.268709824 -0.982122624 0.369605184 -0.662082304 0.260106352
|
||||
29010000 1.000342608 -0.266516688 -0.98337856 0.366011168 -0.663216768 0.257802848
|
||||
29040000 1.000953674 -0.264141792 -0.984649792 0.362327104 -0.663888256 0.255352736
|
||||
29070000 1.001338959 -0.261663136 -0.986499712 0.358416064 -0.664952448 0.253022288
|
||||
29100000 1.0017519 -0.259500864 -0.987964928 0.355694432 -0.665872768 0.250677024
|
||||
29130000 1.002074122 -0.257144176 -0.98868416 0.350873792 -0.666659264 0.24796968
|
||||
29160000 1.002476931 -0.254702304 -0.991141056 0.34779312 -0.668592384 0.245694592
|
||||
29190000 1.003062129 -0.252434992 -0.992317824 0.343730912 -0.668956096 0.24336128
|
||||
29220000 1.003616572 -0.25030008 -0.99331072 0.341336288 -0.66970336 0.241371616
|
||||
29250000 1.003933311 -0.248015632 -0.994555264 0.33720608 -0.6710288 0.238487488
|
||||
29280000 1.004480124 -0.24580616 -0.996240448 0.332931584 -0.671889984 0.23601832
|
||||
29310000 1.004703164 -0.243375296 -0.998089984 0.328630912 -0.6725728 0.232820832
|
||||
29340000 1.005357147 -0.241261072 -0.999104576 0.325578528 -0.67354688 0.231154768
|
||||
29370000 1.005747199 -0.238677088 -1.000756383 0.322126368 -0.67503072 0.22828984
|
||||
29400000 1.006140471 -0.236480432 -1.001840234 0.318506112 -0.675381888 0.22616648
|
||||
29430000 1.006922007 -0.234071648 -1.003144026 0.314677888 -0.676456704 0.223794336
|
||||
29460000 1.007256627 -0.231721776 -1.004606605 0.311028768 -0.676953856 0.22091112
|
||||
29490000 1.007521272 -0.22926528 -1.00576675 0.307237344 -0.678220608 0.218699024
|
||||
29520000 1.008116961 -0.226956016 -1.007364869 0.303805632 -0.679164096 0.216409296
|
||||
29550000 1.008707762 -0.224925824 -1.008327723 0.299587456 -0.679750336 0.213655536
|
||||
29580000 1.009231329 -0.222584192 -1.009743571 0.296297984 -0.680929984 0.211361968
|
||||
29610000 1.00965476 -0.220301616 -1.010500193 0.29303728 -0.681532928 0.208997504
|
||||
29640000 1.010305047 -0.218069984 -1.011721492 0.289086208 -0.68224288 0.206247696
|
||||
29670000 1.010891199 -0.215450368 -1.012751698 0.28537776 -0.682848192 0.203642896
|
||||
29700000 1.01103127 -0.213219712 -1.0141747 0.281102912 -0.68405824 0.201171472
|
||||
29730000 1.011636138 -0.210853856 -1.015708208 0.277221856 -0.684534912 0.19880968
|
||||
29760000 1.012027979 -0.208552464 -1.01672411 0.273859456 -0.685095488 0.196016704
|
||||
29790000 1.01219964 -0.206031312 -1.018087744 0.270658912 -0.686424128 0.193608704
|
||||
29820000 1.012816548 -0.203961648 -1.018956304 0.266596048 -0.686890944 0.191319568
|
||||
29850000 1.013238668 -0.201269984 -1.01978004 0.262994624 -0.687488832 0.188913776
|
||||
29880000 1.013535738 -0.199082544 -1.02097702 0.258907168 -0.68843776 0.185808224
|
||||
29910000 1.013984799 -0.196870128 -1.0222435 0.255366144 -0.689094016 0.183188208
|
||||
29940000 1.014475346 -0.194648592 -1.02290833 0.251412992 -0.689804096 0.18098144
|
||||
29970000 1.014780045 -0.192069232 -1.023776532 0.24757736 -0.69045856 0.178902112
|
||||
30000000 1.015207529 -0.189862144 -1.024984718 0.243840416 -0.691583296 0.175935632
|
|
@ -1,38 +0,0 @@
|
|||
# NanoVNASaver - a python program to view and export Touchstone data from a NanoVNA
|
||||
# Copyright (C) 2019. Rune B. Broberg
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Executing this file initiates the discovery and execution of all unittests
|
||||
# in the "test" directory, with filenames starting with "test" that have a
|
||||
# TestCases(unittest.TestCase) Class, which has class functions starting with
|
||||
# "test_". This provides a simple test framework that is easily expandable by
|
||||
# simply adding new "test_xxx.py" files into the test directory.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.path.append('.')
|
||||
loader = unittest.TestLoader()
|
||||
tests = loader.discover('./test')
|
||||
testRunner = unittest.runner.TextTestRunner(
|
||||
failfast=False,
|
||||
verbosity=2)
|
||||
testRunner.run(tests)
|
Ładowanie…
Reference in New Issue