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.
Release files for DataPoolViewer 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datapoolviewer-1.0.0.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| DataPoolViewer-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.0 kB
Release files / datapoolviewer-1.0.0.tar.gz
| Download URL | datapoolviewer-1.0.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe2985f839a9979c629f3bb80a3cd6321ca02dd4973110e064af57f216923ae5
|
|
BLAKE2b-256 checksum How to use checksums |
bf371cd2fb21d990e660a35499086bada7a1dd8d36d5e295694d0ecd87a4749d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2024.
Transparency logRelease files / DataPoolViewer-1.0.0-py3-none-any.whl
| Download URL | DataPoolViewer-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0884ab320914fc124550cb4ca8341c9f92ec44a6b99e071741ffb0756e9fc351
|
|
BLAKE2b-256 checksum How to use checksums |
62461c8e9eea6f104cd4699cebe27d3fec4985b49c792550ea56df568fb10c15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2024.
Transparency log