Data storage

HDF5 data management: subscription, scheduled/manual saving and history read-back, with integrated plotting panels.

Overview

quatm/GUI/h5storage/ provides the HDF5 data storage GUI (a package split out of the former single file, with its public symbols re-exported at package level): three kinds of data manager — aggregate, single-stream and image — subscribe to data and save it automatically at a scheduled time, periodically, or on a Looper command; the current snapshot can also be written to an .h5 file in the background, and historical measurements read back from a file.

Components

ComponentModuleDescription
H5StorageGuimain_window.pyMain window: data tabs, save/scheduled-save controls and plot management
H5StorageDataMgrdata_manager.pyHost for the three data managers: subscription management, save/read-back, clearing
H5SaveWorkerworkers.pyWorker thread that writes the .h5 file, keeping disk I/O off the Qt event loop
H5DataPlotter / EventPlotterplotters.pyPlotting tabs for measurement data / event data
XAxisWidget / YAxisWidgetaxes.pyData selection and filter-chain configuration for the x axis and each y axis
BinningWidget / FilterWidget / FittingWidgetwidgets.py / fitting.pybinning, filtering and ODR fitting processing chain

Saving modes (H5StorageDataMgr)

MethodDescription
toggle_scheduled_saveToggles saving at a scheduled time (saves automatically and notifies when the time arrives)
toggle_regular_saveToggles periodic automatic saving every N hours
scheduled_save_by_looperResponds to save commands from the Looper (final / intermittent)
savetoFileWrites the current data snapshot to an .h5 file in the background
loadFromFileLoads historical measurements from an existing .h5 file and refreshes the interface
selectDatadirChooses the target h5 file manually (to avoid falling back to the daily default name)
clearClears the entire cache of the three data managers

Usage

from quatm.GUI.h5storage import H5StorageGui   # package-level re-export

win = H5StorageGui(parent=parent)
win.show()

Data saving is performed by the background H5SaveWorker: the GUI thread copies the data snapshot first and then hands it to the worker, so writing to HDF5 on disk never blocks the interface.