psPlotKit¶
A Python plotting and analysis toolkit for parameter sweep and loop tool simulation data.
psPlotKit imports hierarchical simulation results from HDF5 and JSON files (produced by WaterTAP/IDAES process simulations), manages unit conversions, computes levelized costs, and produces publication-quality matplotlib figures.
Architecture¶
psPlotKit follows a two-layer pipeline:
data_manager/ → data_plotter/
PsDataImport FigureGenerator (low-level matplotlib wrapper)
PsData linePlotter, boxPlotter, BreakDownPlotter, MapPlotter
PsDataManager (dict) (each plotter consumes a PsDataManager)
PsCosting
- Data Layer — Import
.h5/.jsonfiles, wrap arrays with physical units, manage composite keys, and compute derived quantities. - Plot Layer — High-level plotting classes that accept a
PsDataManagerand delegate rendering toFigureGenerator.
Key Features¶
- Automatic data discovery from HDF5 parameter sweep outputs
- Physical unit handling via the
quantitieslibrary with custom units (USD, PPM) - Arithmetic expressions on imported data using an operator-overloaded expression tree
- Costing breakdowns (CAPEX/OPEX) with levelized cost computation
- Publication-quality plots — line, bar, box, area, map/contour, scatter, histogram, CDF
- CSV data export alongside every saved figure