From 44dfd22a8a5401810ea25a1e3d09394d0df749bc Mon Sep 17 00:00:00 2001 From: gael Date: Tue, 23 Sep 2025 15:15:02 -0400 Subject: [PATCH] pyproject.toml and package --- README.md | 53 ++++++++++++++++++++ static/plot.png => gain-viz/__init__.py | 0 app.py => gain-viz/app.py | 0 gain-viz/static/plot.png | 0 {templates => gain-viz/templates}/index.html | 0 pyproject.toml | 50 ++++++++++++++++++ 6 files changed, 103 insertions(+) create mode 100644 README.md rename static/plot.png => gain-viz/__init__.py (100%) rename app.py => gain-viz/app.py (100%) create mode 100644 gain-viz/static/plot.png rename {templates => gain-viz/templates}/index.html (100%) create mode 100644 pyproject.toml diff --git a/README.md b/README.md new file mode 100644 index 0000000..3823cab --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# Gain-Viz + +![Python](https://img.shields.io/badge/python-3.8%2B-blue) +![Flask](https://img.shields.io/badge/flask-2.x-orange) +![License](https://img.shields.io/badge/license-MIT-green) + +**Gain-Viz** is an interactive SDR (Software Defined Radio) web application that lets you **adjust transmitter/receiver gains** and **visualize the effects in real time**. + +--- + +## Features + +- Adjust **USRP Tx/Rx** and **SCM Tx/Rx** gains dynamically. +- Real-time **time-domain IQ visualization**. +- Real-time **spectrum analysis** with fast refresh. +- Automatically maintains last signal if no new data arrives. +- Web-based interface using **Flask**. +- Responsive design for desktop and tablet use. + +--- + + + +## Installation + +Make sure you have **Python 3.8+** installed. + +1. Clone the repository: + +```bash +git clone https://github.com/yourusername/gain-viz.git +cd gain-viz ``` + +2. Build and install +```bash +pip install --upgrade build +python -m build +pip install dist/gain_viz-0.1.0-py3-none-any.whl +``` + +## Usage + +Run the application +```bash +gain-viz +``` + +Open your browser at http://localhost:5000 + + +- Toggle the gain switches to enable input fields. +- Enter new gain values and press Update Gains. +- Observe the effect on the time-domain IQ plot and spectrum. diff --git a/static/plot.png b/gain-viz/__init__.py similarity index 100% rename from static/plot.png rename to gain-viz/__init__.py diff --git a/app.py b/gain-viz/app.py similarity index 100% rename from app.py rename to gain-viz/app.py diff --git a/gain-viz/static/plot.png b/gain-viz/static/plot.png new file mode 100644 index 0000000..e69de29 diff --git a/templates/index.html b/gain-viz/templates/index.html similarity index 100% rename from templates/index.html rename to gain-viz/templates/index.html diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..44bf4df --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,50 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "gain-viz" +version = "0.1.0" +description = "Interactive srsRAN_Project gnb gain control and spectrum visualization tool" +authors = [ + { name = "Qoherent Inc.", email = "info@qoherent.ai" } +] +maintainers = [ + { name = "Gael Kamga", email = "gael@qoherent.ai" }, + { name = "Ashkan Beigi", email = "ash@qoherent.ai" }, +] + +keywords = [ + "radio", + "rf", + "sdr", + "software-defined radio", + "5G", + "gnb", + "gNodeB", + "srsRAN_Project", + "SCM", + "SignalCraft Conditioning Mpdule", + "USRP" + +] + +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "flask", + "matplotlib", + "numpy", + "pyzmq", + "pyserial" +] + +[project.scripts] +gain-viz = "gain-viz.app:main" + +[tool.setuptools.packages.find] +where = ["."] +include = ["gain-viz*"] + +[tool.setuptools.package-data] +"gain-viz" = ["templates/*", "static/*"]