A library intended to provide data visualization tools for PyDataCore.
Project description
DataPoolViewer
DataPoolViewer is a Python visualization tool that integrates with PyDataCore to visualize temporal, frequency, and FFT data from a central data pool. It offers a GUI for exploring, grouping, and plotting data, allowing users to inspect multiple data sources, add limits, and manage subscribers.
Table of Contents
Features
- Data Management: Display, organize, and manage data sources, data types, and subscribers.
- Plotting: Visualize temporal, frequency, and FFT data with customizable plots.
- Dynamic Limit Visualization: Add and display both temporal and frequency limits.
- Interactivity: Group and ungroup plots, synchronize axes, and change plot colors.
- Live FFT Animation: Display animated frequency-domain data in real-time.
Installation
-
Clone the repository:
git clone https://github.com/yourusername/DataPoolViewer.git cd DataPoolViewer
-
Install dependencies:
pip install -r requirements.txt
Usage
To use DataPoolViewer in your application, follow the example below. It sets up a basic QMainWindow with a DatapoolVisualizer that displays and manages data from the DataPool.
Example Code
import sys
from PySide6.QtWidgets import QApplication, QMainWindow
from PyDataCore import DataPool, Data_Type
from scipy import signal
import numpy as np
from src.DatapoolVisualizer.datapool_visualizer import DatapoolVisualizer
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.datapool = DataPool()
t = np.linspace(0, 1, 500)
tstep = t[1] - t[0]
square_signal = signal.square(2 * np.pi * 5 * t)
temporal_data_id = self.datapool.register_data(Data_Type.TEMPORAL_SIGNAL, "Square Signal 5Hz", "source1", False,
False, time_step=tstep, unit="V")
self.datapool.store_data(temporal_data_id, square_signal, "source1")
self.visualizer = DatapoolVisualizer(self.datapool, parent=self)
self.setCentralWidget(self.visualizer)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec())
Class Descriptions
DatapoolVisualizer
Main widget for visualizing data from the DataPool. Integrates DataPoolViewerWidget and PlotController.
Methods:
__init__(self, data_pool, parent=None): Initializes the visualizer with the specified data pool.handle_data_selection(self, index): Handles data selection events and updates plots accordingly.
DataPoolViewerWidget
Displays the DataPool structure in a tree view format.
Methods:
__init__(self, data_registry, source_to_data, subscriber_to_data, parent=None): Initializes the viewer widget.populate_tree_view(self, data_registry, source_to_data, subscriber_to_data): Populates the tree view.
PlotController
Manages multiple SignalPlotWidget instances and provides controls for grouping, ungrouping, and managing plots.
Methods:
add_plot(self): Adds a new plot.remove_selected_plots(self): Removes selected plots.add_data_to_selected_plot(self, data_id): Adds data to the selected plot.
SignalPlotWidget
Handles the display of individual plots.
Methods:
add_data(self, data_id, color='b'): Adds data to the plot.display_signal(self, data_id, curve=None): Displays the data with simplified visualization.handle_zoom(self, _, range): Adjusts the display based on zoom.
DataPoolNotifier
A utility class that triggers signals on DataPool updates.
Methods:
attach_to_pool(self, pool): Attaches to aDataPoolinstance.
Testing
Test scripts are located in the tests folder and include checks for core functionality.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datapoolviewer-1.0.0.tar.gz.
File metadata
- Download URL: datapoolviewer-1.0.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe2985f839a9979c629f3bb80a3cd6321ca02dd4973110e064af57f216923ae5
|
|
| MD5 |
28c41c2676560b455e6301b974cb8049
|
|
| BLAKE2b-256 |
bf371cd2fb21d990e660a35499086bada7a1dd8d36d5e295694d0ecd87a4749d
|
Provenance
The following attestation bundles were made for datapoolviewer-1.0.0.tar.gz:
Publisher:
publish.yml on GuillaumeTrain/DataPoolViewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datapoolviewer-1.0.0.tar.gz -
Subject digest:
fe2985f839a9979c629f3bb80a3cd6321ca02dd4973110e064af57f216923ae5 - Sigstore transparency entry: 146812585
- Sigstore integration time:
-
Permalink:
GuillaumeTrain/DataPoolViewer@a0d1f2ae668499124b80544abe50a8058cab57d8 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/GuillaumeTrain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a0d1f2ae668499124b80544abe50a8058cab57d8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file DataPoolViewer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: DataPoolViewer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0884ab320914fc124550cb4ca8341c9f92ec44a6b99e071741ffb0756e9fc351
|
|
| MD5 |
337c212497b07bc5eecfd5f8ec474fc4
|
|
| BLAKE2b-256 |
62461c8e9eea6f104cd4699cebe27d3fec4985b49c792550ea56df568fb10c15
|
Provenance
The following attestation bundles were made for DataPoolViewer-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on GuillaumeTrain/DataPoolViewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datapoolviewer-1.0.0-py3-none-any.whl -
Subject digest:
0884ab320914fc124550cb4ca8341c9f92ec44a6b99e071741ffb0756e9fc351 - Sigstore transparency entry: 146812587
- Sigstore integration time:
-
Permalink:
GuillaumeTrain/DataPoolViewer@a0d1f2ae668499124b80544abe50a8058cab57d8 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/GuillaumeTrain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a0d1f2ae668499124b80544abe50a8058cab57d8 -
Trigger Event:
release
-
Statement type: