fullplot 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: fullplot
3
+ Version: 0.0.1
4
+ Summary: A lightweight HDF5 trace plotting, filtering, and map-generation helper for engineering data.
5
+ Keywords: hdf5,plotting,engineering,simulation,test-data,map-generation,scientific-computing
6
+ Author: Saaketh Ramoju
7
+ Author-email: Saaketh Ramoju <skramoju@gmail.com>
8
+ License-Expression: GPL-3.0-only
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Intended Audience :: Education
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Classifier: Topic :: Scientific/Engineering :: Visualization
19
+ Requires-Dist: numpy>=1.26.0
20
+ Requires-Dist: scipy>=1.11.0
21
+ Requires-Dist: h5py>=3.10.0
22
+ Requires-Dist: matplotlib>=3.8.0
23
+ Requires-Python: >=3.11
24
+ Project-URL: Homepage, https://github.com/saakethramoju/FullPlot
25
+ Project-URL: Repository, https://github.com/saakethramoju/FullPlot
26
+ Project-URL: Issues, https://github.com/saakethramoju/FullPlot/issues
27
+ Project-URL: PyPI, https://pypi.org/project/fullplot/
28
+ Description-Content-Type: text/markdown
29
+
30
+ # FullPlot
31
+
32
+ FullPlot is a lightweight HDF5 plotting, trace filtering, and map-generation package for engineering simulation and test data.
33
+
34
+ FullPlot is intentionally independent from FullFlow. FullPlot does not import FullFlow, and FullFlow does not import FullPlot. HDF5 files are the interface between the two packages.
35
+
36
+ ## Installation
37
+
38
+ ```bash
39
+ pip install fullplot
40
+ ```
41
+
42
+ For local development with `uv`:
43
+
44
+ ```bash
45
+ uv sync --dev
46
+ uv run pytest
47
+ ```
48
+
49
+ ## Quick plotting
50
+
51
+ ```python
52
+ import fullplot as fplt
53
+
54
+ run = fplt.open("engine_sim.h5")
55
+ run.tree()
56
+ run.list()
57
+
58
+ run.plot(
59
+ x="time",
60
+ y="node_pressure",
61
+ xlabel="Time [s]",
62
+ ylabel="Pressure [Pa]",
63
+ )
64
+ ```
65
+
66
+ ## Traces
67
+
68
+ A `Trace` is a generic one-dimensional line of data. It can represent simulation data, test data, a filtered trace, a redline, a blueline, a command trace, or a derived trace.
69
+
70
+ ```python
71
+ import fullplot as fplt
72
+
73
+ run = fplt.open("hotfire.h5")
74
+
75
+ chpt = run.trace("CHPT", x="time")
76
+ chpt_filtered = chpt.filter("moving_average", window=0.05)
77
+ redline = fplt.Trace.constant("CHPT Redline", x=chpt.x, y=400.0, role="redline")
78
+
79
+ fplt.plot([chpt, chpt_filtered, redline])
80
+ ```
81
+
82
+ ## Generated traces
83
+
84
+ ```python
85
+ import numpy as np
86
+ import fullplot as fplt
87
+
88
+ time = np.linspace(0.0, 10.0, 1001)
89
+
90
+ command = fplt.Trace.from_points(
91
+ "Main Ox Valve Command",
92
+ points=[(0.0, 0.0), (1.0, 0.0), (1.1, 1.0), (8.0, 1.0), (8.1, 0.0)],
93
+ x=time,
94
+ mode="previous",
95
+ role="command",
96
+ )
97
+
98
+ fplt.plot(command)
99
+ ```
100
+
101
+ ## Map generation
102
+
103
+ FullPlot can generate rectangular HDF5 maps that another package, including FullFlow, can consume later.
104
+
105
+ ```python
106
+ import fullplot as fplt
107
+
108
+ fplt.generate_map(
109
+ "demo_map.h5",
110
+ group="properties",
111
+ axes=[
112
+ fplt.Axis.linear("pressure", 1.0e5, 5.0e5, 5),
113
+ fplt.Axis.linear("temperature", 250.0, 500.0, 6),
114
+ ],
115
+ evaluate=lambda pressure, temperature: {
116
+ "density": pressure / (287.0 * temperature),
117
+ },
118
+ )
119
+ ```
@@ -0,0 +1,90 @@
1
+ # FullPlot
2
+
3
+ FullPlot is a lightweight HDF5 plotting, trace filtering, and map-generation package for engineering simulation and test data.
4
+
5
+ FullPlot is intentionally independent from FullFlow. FullPlot does not import FullFlow, and FullFlow does not import FullPlot. HDF5 files are the interface between the two packages.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install fullplot
11
+ ```
12
+
13
+ For local development with `uv`:
14
+
15
+ ```bash
16
+ uv sync --dev
17
+ uv run pytest
18
+ ```
19
+
20
+ ## Quick plotting
21
+
22
+ ```python
23
+ import fullplot as fplt
24
+
25
+ run = fplt.open("engine_sim.h5")
26
+ run.tree()
27
+ run.list()
28
+
29
+ run.plot(
30
+ x="time",
31
+ y="node_pressure",
32
+ xlabel="Time [s]",
33
+ ylabel="Pressure [Pa]",
34
+ )
35
+ ```
36
+
37
+ ## Traces
38
+
39
+ A `Trace` is a generic one-dimensional line of data. It can represent simulation data, test data, a filtered trace, a redline, a blueline, a command trace, or a derived trace.
40
+
41
+ ```python
42
+ import fullplot as fplt
43
+
44
+ run = fplt.open("hotfire.h5")
45
+
46
+ chpt = run.trace("CHPT", x="time")
47
+ chpt_filtered = chpt.filter("moving_average", window=0.05)
48
+ redline = fplt.Trace.constant("CHPT Redline", x=chpt.x, y=400.0, role="redline")
49
+
50
+ fplt.plot([chpt, chpt_filtered, redline])
51
+ ```
52
+
53
+ ## Generated traces
54
+
55
+ ```python
56
+ import numpy as np
57
+ import fullplot as fplt
58
+
59
+ time = np.linspace(0.0, 10.0, 1001)
60
+
61
+ command = fplt.Trace.from_points(
62
+ "Main Ox Valve Command",
63
+ points=[(0.0, 0.0), (1.0, 0.0), (1.1, 1.0), (8.0, 1.0), (8.1, 0.0)],
64
+ x=time,
65
+ mode="previous",
66
+ role="command",
67
+ )
68
+
69
+ fplt.plot(command)
70
+ ```
71
+
72
+ ## Map generation
73
+
74
+ FullPlot can generate rectangular HDF5 maps that another package, including FullFlow, can consume later.
75
+
76
+ ```python
77
+ import fullplot as fplt
78
+
79
+ fplt.generate_map(
80
+ "demo_map.h5",
81
+ group="properties",
82
+ axes=[
83
+ fplt.Axis.linear("pressure", 1.0e5, 5.0e5, 5),
84
+ fplt.Axis.linear("temperature", 250.0, 500.0, 6),
85
+ ],
86
+ evaluate=lambda pressure, temperature: {
87
+ "density": pressure / (287.0 * temperature),
88
+ },
89
+ )
90
+ ```
@@ -0,0 +1,67 @@
1
+ [project]
2
+ name = "fullplot"
3
+ version = "0.0.1"
4
+ description = "A lightweight HDF5 trace plotting, filtering, and map-generation helper for engineering data."
5
+ readme = "README.md"
6
+ license = "GPL-3.0-only"
7
+ authors = [
8
+ { name = "Saaketh Ramoju", email = "skramoju@gmail.com" }
9
+ ]
10
+ requires-python = ">=3.11"
11
+ keywords = [
12
+ "hdf5",
13
+ "plotting",
14
+ "engineering",
15
+ "simulation",
16
+ "test-data",
17
+ "map-generation",
18
+ "scientific-computing",
19
+ ]
20
+ classifiers = [
21
+ "Development Status :: 3 - Alpha",
22
+ "Intended Audience :: Science/Research",
23
+ "Intended Audience :: Education",
24
+ "Operating System :: OS Independent",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: 3.13",
29
+ "Topic :: Scientific/Engineering",
30
+ "Topic :: Scientific/Engineering :: Visualization",
31
+ ]
32
+ dependencies = [
33
+ "numpy>=1.26.0",
34
+ "scipy>=1.11.0",
35
+ "h5py>=3.10.0",
36
+ "matplotlib>=3.8.0",
37
+ ]
38
+
39
+ [project.urls]
40
+ Homepage = "https://github.com/saakethramoju/FullPlot"
41
+ Repository = "https://github.com/saakethramoju/FullPlot"
42
+ Issues = "https://github.com/saakethramoju/FullPlot/issues"
43
+ PyPI = "https://pypi.org/project/fullplot/"
44
+
45
+ [project.scripts]
46
+ fullplot = "fullplot.cli:main"
47
+
48
+ [build-system]
49
+ requires = ["uv_build>=0.11.18,<0.12.0"]
50
+ build-backend = "uv_build"
51
+
52
+ [dependency-groups]
53
+ dev = [
54
+ "pytest>=8.0.0",
55
+ "ruff>=0.15.20",
56
+ ]
57
+
58
+ [tool.ruff]
59
+ line-length = 100
60
+
61
+ [tool.ruff.lint]
62
+ select = ["E4", "E7", "E9", "F"]
63
+ ignore = []
64
+
65
+ [tool.pytest.ini_options]
66
+ testpaths = ["tests"]
67
+ pythonpath = ["src"]
@@ -0,0 +1,61 @@
1
+ """FullPlot: lightweight HDF5 trace plotting, filtering, and map generation."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ from fullplot.cli import main
6
+ from fullplot.fullplot import (
7
+ AmbiguousDatasetError,
8
+ DatasetNotFoundError,
9
+ FullPlotError,
10
+ H5File,
11
+ PlotDataError,
12
+ Trace,
13
+ list,
14
+ map,
15
+ open,
16
+ plot,
17
+ read,
18
+ show,
19
+ trace,
20
+ tree,
21
+ values,
22
+ write_traces,
23
+ )
24
+ from fullplot.maps import (
25
+ Axis,
26
+ FullPlotMapError,
27
+ MapGenerationError,
28
+ MapOutputError,
29
+ generate_map,
30
+ )
31
+
32
+ try:
33
+ __version__ = version("fullplot")
34
+ except PackageNotFoundError:
35
+ __version__ = "0.0.0"
36
+
37
+ __all__ = [
38
+ "__version__",
39
+ "FullPlotError",
40
+ "DatasetNotFoundError",
41
+ "AmbiguousDatasetError",
42
+ "PlotDataError",
43
+ "Trace",
44
+ "H5File",
45
+ "open",
46
+ "tree",
47
+ "list",
48
+ "read",
49
+ "values",
50
+ "trace",
51
+ "plot",
52
+ "map",
53
+ "write_traces",
54
+ "show",
55
+ "Axis",
56
+ "FullPlotMapError",
57
+ "MapGenerationError",
58
+ "MapOutputError",
59
+ "generate_map",
60
+ "main",
61
+ ]
@@ -0,0 +1,63 @@
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ from pathlib import Path
5
+
6
+ from fullplot.fullplot import open as open_hdf5
7
+
8
+
9
+ def build_parser() -> argparse.ArgumentParser:
10
+ parser = argparse.ArgumentParser(
11
+ prog="fullplot",
12
+ description="Inspect HDF5 files with FullPlot.",
13
+ )
14
+ parser.add_argument(
15
+ "filename",
16
+ nargs="?",
17
+ type=Path,
18
+ help="HDF5 file to inspect.",
19
+ )
20
+ parser.add_argument(
21
+ "--root",
22
+ default="/",
23
+ help="HDF5 root/group to inspect. Default: /",
24
+ )
25
+ parser.add_argument(
26
+ "--tree",
27
+ action="store_true",
28
+ help="Print the HDF5 tree. This is the default action.",
29
+ )
30
+ parser.add_argument(
31
+ "--list",
32
+ action="store_true",
33
+ help="List numeric datasets under the selected root.",
34
+ )
35
+ parser.add_argument(
36
+ "--max-depth",
37
+ type=int,
38
+ default=None,
39
+ help="Maximum tree depth to print when using --tree.",
40
+ )
41
+ return parser
42
+
43
+
44
+ def main(argv: list[str] | None = None) -> int:
45
+ parser = build_parser()
46
+ args = parser.parse_args(argv)
47
+
48
+ if args.filename is None:
49
+ parser.print_help()
50
+ return 0
51
+
52
+ data = open_hdf5(args.filename, root=args.root)
53
+
54
+ if args.list:
55
+ data.list(print_output=True)
56
+ else:
57
+ data.tree(max_depth=args.max_depth, print_output=True)
58
+
59
+ return 0
60
+
61
+
62
+ if __name__ == "__main__":
63
+ raise SystemExit(main())