fullplot 0.0.1__py3-none-any.whl
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.
- fullplot/__init__.py +61 -0
- fullplot/cli.py +63 -0
- fullplot/fullplot.py +1647 -0
- fullplot/hdf5.py +48 -0
- fullplot/maps.py +708 -0
- fullplot/themes.py +176 -0
- fullplot-0.0.1.dist-info/METADATA +119 -0
- fullplot-0.0.1.dist-info/RECORD +10 -0
- fullplot-0.0.1.dist-info/WHEEL +4 -0
- fullplot-0.0.1.dist-info/entry_points.txt +3 -0
fullplot/__init__.py
ADDED
|
@@ -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
|
+
]
|
fullplot/cli.py
ADDED
|
@@ -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())
|