Data management and analysis module
Data aggregation and storage management: DataSummary collects per-run data and writes HDF5, with a companion h5 management interface.
Overview
The data management and analysis module aggregates the data streams produced by an experiment into a complete record for each run and persists them. DataSummary in quatm/servers/datamgr.py is the aggregation core: it subscribes to a number of data channels plus experiment start/end events, organizes the data of each run into a complete dictionary that can be written to HDF5, read back and cleared. quatm/GUI/h5storage/ provides the data-management interface built on it (subscription, periodic saving and plotting).
Core components
| Component | Module | Description |
|---|---|---|
DataSummary | servers/datamgr.py | Aggregates multi-channel data streams into a complete dictionary for each run |
H5StorageDataMgr | GUI/h5storage/data_manager.py | Host for the aggregate/single-stream/image data managers |
H5StorageGui | GUI/h5storage/main_window.py | Data management main window (data/plot/event tabs) |
H5DataPlotter / EventPlotter | GUI/h5storage/plotters.py | Measurement data / event data plotting |
Key methods (DataSummary)
| Method | Description |
|---|---|
initDataq | (Re)subscribes to the channels configured in properties and to the experiment start/end events |
recvData / processIncomingData | Receives data and merges it into the most recent run record |
savetoFile | Writes the collected run dictionaries to a structured HDF5 dataset |
loadFromFile | Reads a set of stored run dictionaries back from HDF5 |
clear | Clears all collected data |
run_forever | Blocking loop that keeps receiving data |
Usage
from quatm.servers.datamgr import DataSummary
summ = DataSummary(name="sum")
summ.initDataq() # subscribe to the channels configured in the properties
summ.run_forever() # blocking acquisition; savetoFile then writes the run dict to the .h5
Input channels and the save path are configured in the property tree; for the GUI side see Data storage.