Loading MANIFEST.in 0 → 100644 +7 −0 Original line number Diff line number Diff line include README.md include LICENSE include requirements.txt recursive-include config/ * include azure.tcl recursive-include src/ *.py recursive-include theme/ * README.md +10 −6 Original line number Diff line number Diff line # Calibrate-multifeed-receiver ## Download and install ## Download This project is written in Python3 (3.8), so make sure you have it installed in your machine. After that you can download this repository, open terminal and type: After that you can download the repository, open terminal and type: ```bash git clone https://github.com/LorenzoMonti/calibrate-multifeed-receiver.git Loading @@ -16,16 +16,20 @@ git clone https://github.com/LorenzoMonti/calibrate-multifeed-receiver.git sudo apt-get install python3-tk cd calibrate-multifeed-receiver/ python3 -m pip install -r requirements.txt python3 setup.py install ``` ## Launch the script ## Install ```bash python3 setup.py install ``` ## Usage Now you can run the project: ```bash cd src/ python3 gui.py calibrate_multifeed_receiver ``` ## License Loading setup.py 0 → 100644 +38 −0 Original line number Diff line number Diff line from setuptools import setup, find_packages import pathlib # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() setup( name='calibrate-receiver', version='0.8.0', description='A graphic tool used to calibrate a multifeed receiver', long_description=README, long_description_content_type="text/markdown", url="https://github.com/LorenzoMonti/calibrate-multifeed-receiver", author='Lorenzo Monti', author_email='lorenzo.monti@inaf.it', packages=['src', 'config', 'src/tabs'], scripts=['src/calibrate_multifeed_receiver'], license='MIT', platforms='all', install_requires=[ 'pyvisa', 'pyvisa-py', 'pyserial', 'pyusb', 'gpib-ctypes', 'tk', 'numpy', 'pandas', 'seaborn', 'beepy', ], classifiers=[ 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ] ) src/Utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ def calcFrequency(): Function used to calculate the x-axis of the trace (frequencies) """ config_file = read_config_file("../config/config_MS2830A.json") config_file = read_config_file("./config/config_MS2830A.json") tmp_freq = ((config_file["stop_freq"] - config_file["start_freq"]) / (config_file["sweep_trace_points"] - 1)) frequency = [(config_file["start_freq"] + (tmp_freq * i)) for i in range(0, config_file["sweep_trace_points"]) ] Loading src/gui.py→src/calibrate_multifeed_receiver +7 −7 Original line number Diff line number Diff line Loading @@ -13,9 +13,9 @@ from matplotlib.pyplot import text import ctypes from numpy.lib.function_base import insert, select import Anritsu_MS2830A as SPA import Utils from tabs import measure_tab, configuration_tab, connect_tab from src import Anritsu_MS2830A as SPA from src import Utils from src.tabs import measure_tab, configuration_tab, connect_tab try: import Tkinter as tk Loading @@ -29,14 +29,14 @@ except ImportError: import tkinter.ttk as ttk py3 = True import gui_support from src import gui_support def vp_start_gui(): '''Starting point when module is the main routine.''' global val, w, root root = tk.Tk() # Simply set the theme root.tk.call("source", "azure.tcl") root.tk.call("source", "src/azure.tcl") root.tk.call("set_theme", "light") top = UserInterface (root) Loading Loading @@ -76,8 +76,8 @@ class UserInterface: ############################# # ANRITSU CONFIGURATION ############################# config_interface = Utils.read_config_file("../config/config_interface.json") config_file = Utils.read_config_file("../config/config_MS2830A.json") config_interface = Utils.read_config_file("./config/config_interface.json") config_file = Utils.read_config_file("./config/config_MS2830A.json") ############################## ############################# Loading Loading
MANIFEST.in 0 → 100644 +7 −0 Original line number Diff line number Diff line include README.md include LICENSE include requirements.txt recursive-include config/ * include azure.tcl recursive-include src/ *.py recursive-include theme/ *
README.md +10 −6 Original line number Diff line number Diff line # Calibrate-multifeed-receiver ## Download and install ## Download This project is written in Python3 (3.8), so make sure you have it installed in your machine. After that you can download this repository, open terminal and type: After that you can download the repository, open terminal and type: ```bash git clone https://github.com/LorenzoMonti/calibrate-multifeed-receiver.git Loading @@ -16,16 +16,20 @@ git clone https://github.com/LorenzoMonti/calibrate-multifeed-receiver.git sudo apt-get install python3-tk cd calibrate-multifeed-receiver/ python3 -m pip install -r requirements.txt python3 setup.py install ``` ## Launch the script ## Install ```bash python3 setup.py install ``` ## Usage Now you can run the project: ```bash cd src/ python3 gui.py calibrate_multifeed_receiver ``` ## License Loading
setup.py 0 → 100644 +38 −0 Original line number Diff line number Diff line from setuptools import setup, find_packages import pathlib # The directory containing this file HERE = pathlib.Path(__file__).parent # The text of the README file README = (HERE / "README.md").read_text() setup( name='calibrate-receiver', version='0.8.0', description='A graphic tool used to calibrate a multifeed receiver', long_description=README, long_description_content_type="text/markdown", url="https://github.com/LorenzoMonti/calibrate-multifeed-receiver", author='Lorenzo Monti', author_email='lorenzo.monti@inaf.it', packages=['src', 'config', 'src/tabs'], scripts=['src/calibrate_multifeed_receiver'], license='MIT', platforms='all', install_requires=[ 'pyvisa', 'pyvisa-py', 'pyserial', 'pyusb', 'gpib-ctypes', 'tk', 'numpy', 'pandas', 'seaborn', 'beepy', ], classifiers=[ 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ] )
src/Utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ def calcFrequency(): Function used to calculate the x-axis of the trace (frequencies) """ config_file = read_config_file("../config/config_MS2830A.json") config_file = read_config_file("./config/config_MS2830A.json") tmp_freq = ((config_file["stop_freq"] - config_file["start_freq"]) / (config_file["sweep_trace_points"] - 1)) frequency = [(config_file["start_freq"] + (tmp_freq * i)) for i in range(0, config_file["sweep_trace_points"]) ] Loading
src/gui.py→src/calibrate_multifeed_receiver +7 −7 Original line number Diff line number Diff line Loading @@ -13,9 +13,9 @@ from matplotlib.pyplot import text import ctypes from numpy.lib.function_base import insert, select import Anritsu_MS2830A as SPA import Utils from tabs import measure_tab, configuration_tab, connect_tab from src import Anritsu_MS2830A as SPA from src import Utils from src.tabs import measure_tab, configuration_tab, connect_tab try: import Tkinter as tk Loading @@ -29,14 +29,14 @@ except ImportError: import tkinter.ttk as ttk py3 = True import gui_support from src import gui_support def vp_start_gui(): '''Starting point when module is the main routine.''' global val, w, root root = tk.Tk() # Simply set the theme root.tk.call("source", "azure.tcl") root.tk.call("source", "src/azure.tcl") root.tk.call("set_theme", "light") top = UserInterface (root) Loading Loading @@ -76,8 +76,8 @@ class UserInterface: ############################# # ANRITSU CONFIGURATION ############################# config_interface = Utils.read_config_file("../config/config_interface.json") config_file = Utils.read_config_file("../config/config_MS2830A.json") config_interface = Utils.read_config_file("./config/config_interface.json") config_file = Utils.read_config_file("./config/config_MS2830A.json") ############################## ############################# Loading