shepherd-data 2025.6.3__py3-none-any.whl → 2025.6.4__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.
- shepherd_data/__init__.py +1 -1
- shepherd_data/cli.py +9 -10
- shepherd_data/ivonne.py +9 -10
- shepherd_data/reader.py +17 -19
- {shepherd_data-2025.6.3.dist-info → shepherd_data-2025.6.4.dist-info}/METADATA +3 -4
- shepherd_data-2025.6.4.dist-info/RECORD +11 -0
- shepherd_data-2025.6.3.dist-info/RECORD +0 -11
- {shepherd_data-2025.6.3.dist-info → shepherd_data-2025.6.4.dist-info}/WHEEL +0 -0
- {shepherd_data-2025.6.3.dist-info → shepherd_data-2025.6.4.dist-info}/entry_points.txt +0 -0
- {shepherd_data-2025.6.3.dist-info → shepherd_data-2025.6.4.dist-info}/top_level.txt +0 -0
- {shepherd_data-2025.6.3.dist-info → shepherd_data-2025.6.4.dist-info}/zip-safe +0 -0
shepherd_data/__init__.py
CHANGED
shepherd_data/cli.py
CHANGED
|
@@ -5,7 +5,6 @@ import sys
|
|
|
5
5
|
from contextlib import suppress
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Optional
|
|
9
8
|
|
|
10
9
|
import click
|
|
11
10
|
import pydantic
|
|
@@ -135,8 +134,8 @@ def validate(in_data: Path, *, recurse: bool = False) -> None:
|
|
|
135
134
|
)
|
|
136
135
|
def extract(
|
|
137
136
|
in_data: Path,
|
|
138
|
-
start:
|
|
139
|
-
end:
|
|
137
|
+
start: float | None,
|
|
138
|
+
end: float | None,
|
|
140
139
|
ds_factor: float,
|
|
141
140
|
separator: str,
|
|
142
141
|
*,
|
|
@@ -211,7 +210,7 @@ def extract_meta(
|
|
|
211
210
|
if not debug:
|
|
212
211
|
continue
|
|
213
212
|
csv_depr = ["sysutil", "timesync"]
|
|
214
|
-
csv_meta = ["ptp", "phc2sys", "sys_util", "pru_util"]
|
|
213
|
+
csv_meta = ["ptp", "phc2sys", "sys_util", "pru_util", "power"]
|
|
215
214
|
for element in csv_meta + csv_depr:
|
|
216
215
|
if element in shpr.h5file:
|
|
217
216
|
shpr.save_csv(shpr[element], separator)
|
|
@@ -353,10 +352,10 @@ def extract_gpio(in_data: Path, separator: str, *, recurse: bool = False) -> Non
|
|
|
353
352
|
)
|
|
354
353
|
def downsample(
|
|
355
354
|
in_data: Path,
|
|
356
|
-
ds_factor:
|
|
357
|
-
sample_rate:
|
|
358
|
-
start:
|
|
359
|
-
end:
|
|
355
|
+
ds_factor: float | None,
|
|
356
|
+
sample_rate: int | None,
|
|
357
|
+
start: float | None,
|
|
358
|
+
end: float | None,
|
|
360
359
|
*,
|
|
361
360
|
recurse: bool = False,
|
|
362
361
|
) -> None:
|
|
@@ -431,8 +430,8 @@ def downsample(
|
|
|
431
430
|
)
|
|
432
431
|
def plot(
|
|
433
432
|
in_data: Path,
|
|
434
|
-
start:
|
|
435
|
-
end:
|
|
433
|
+
start: float | None,
|
|
434
|
+
end: float | None,
|
|
436
435
|
width: int,
|
|
437
436
|
height: int,
|
|
438
437
|
*,
|
shepherd_data/ivonne.py
CHANGED
|
@@ -16,7 +16,6 @@ import os
|
|
|
16
16
|
import pickle
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
from types import TracebackType
|
|
19
|
-
from typing import Optional
|
|
20
19
|
|
|
21
20
|
import numpy as np
|
|
22
21
|
import pandas as pd
|
|
@@ -48,7 +47,7 @@ class Reader:
|
|
|
48
47
|
def __init__(
|
|
49
48
|
self,
|
|
50
49
|
file_path: Path,
|
|
51
|
-
samplerate_sps:
|
|
50
|
+
samplerate_sps: int | None = None,
|
|
52
51
|
*,
|
|
53
52
|
verbose: bool = True,
|
|
54
53
|
) -> None:
|
|
@@ -66,7 +65,7 @@ class Reader:
|
|
|
66
65
|
self.file_size: int = 0
|
|
67
66
|
self.data_rate: float = 0
|
|
68
67
|
|
|
69
|
-
self._df:
|
|
68
|
+
self._df: pd.DataFrame | None = None
|
|
70
69
|
|
|
71
70
|
def __enter__(self) -> Self:
|
|
72
71
|
if not self.file_path.exists():
|
|
@@ -88,9 +87,9 @@ class Reader:
|
|
|
88
87
|
|
|
89
88
|
def __exit__(
|
|
90
89
|
self,
|
|
91
|
-
typ:
|
|
92
|
-
exc:
|
|
93
|
-
tb:
|
|
90
|
+
typ: type[BaseException] | None = None,
|
|
91
|
+
exc: BaseException | None = None,
|
|
92
|
+
tb: TracebackType | None = None,
|
|
94
93
|
extra_arg: int = 0,
|
|
95
94
|
) -> None:
|
|
96
95
|
pass
|
|
@@ -107,7 +106,7 @@ class Reader:
|
|
|
107
106
|
shp_output: Path,
|
|
108
107
|
v_max: float = 5.0,
|
|
109
108
|
pts_per_curve: int = 1000,
|
|
110
|
-
duration_s:
|
|
109
|
+
duration_s: float | None = None,
|
|
111
110
|
) -> None:
|
|
112
111
|
"""Transform recorded parameters to shepherd hdf database with IV curves.
|
|
113
112
|
|
|
@@ -170,8 +169,8 @@ class Reader:
|
|
|
170
169
|
self,
|
|
171
170
|
shp_output: Path,
|
|
172
171
|
v_max: float = 5.0,
|
|
173
|
-
duration_s:
|
|
174
|
-
tracker:
|
|
172
|
+
duration_s: float | None = None,
|
|
173
|
+
tracker: MPPTracker | None = None,
|
|
175
174
|
) -> None:
|
|
176
175
|
"""Transform shepherd IV surface / curves to shepherd IV trace / samples .
|
|
177
176
|
|
|
@@ -240,7 +239,7 @@ class Reader:
|
|
|
240
239
|
self,
|
|
241
240
|
shp_output: Path,
|
|
242
241
|
v_max: float = 5.0,
|
|
243
|
-
duration_s:
|
|
242
|
+
duration_s: float | None = None,
|
|
244
243
|
) -> None:
|
|
245
244
|
"""Transform ivonne-parameters to up-sampled versions for shepherd.
|
|
246
245
|
|
shepherd_data/reader.py
CHANGED
|
@@ -5,8 +5,6 @@ from collections.abc import Mapping
|
|
|
5
5
|
from collections.abc import Sequence
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Optional
|
|
9
|
-
from typing import Union
|
|
10
8
|
|
|
11
9
|
import h5py
|
|
12
10
|
import numpy as np
|
|
@@ -166,14 +164,14 @@ class Reader(CoreReader):
|
|
|
166
164
|
|
|
167
165
|
def downsample(
|
|
168
166
|
self,
|
|
169
|
-
data_src:
|
|
170
|
-
data_dst:
|
|
167
|
+
data_src: h5py.Dataset | np.ndarray,
|
|
168
|
+
data_dst: None | h5py.Dataset | np.ndarray,
|
|
171
169
|
start_n: int = 0,
|
|
172
|
-
end_n:
|
|
170
|
+
end_n: int | None = None,
|
|
173
171
|
ds_factor: float = 5,
|
|
174
172
|
*,
|
|
175
173
|
is_time: bool = False,
|
|
176
|
-
) ->
|
|
174
|
+
) -> None | h5py.Dataset | np.ndarray:
|
|
177
175
|
"""Sample down iv-data.
|
|
178
176
|
|
|
179
177
|
Warning: only valid for IV-Stream, not IV-Curves,
|
|
@@ -258,8 +256,8 @@ class Reader(CoreReader):
|
|
|
258
256
|
|
|
259
257
|
def cut_and_downsample_to_file(
|
|
260
258
|
self,
|
|
261
|
-
start_s:
|
|
262
|
-
end_s:
|
|
259
|
+
start_s: float | None,
|
|
260
|
+
end_s: float | None,
|
|
263
261
|
ds_factor: float,
|
|
264
262
|
) -> Path:
|
|
265
263
|
"""Cut source to given limits, downsample by factor and store result in separate file.
|
|
@@ -360,14 +358,14 @@ class Reader(CoreReader):
|
|
|
360
358
|
|
|
361
359
|
def resample(
|
|
362
360
|
self,
|
|
363
|
-
data_src:
|
|
364
|
-
data_dst:
|
|
361
|
+
data_src: h5py.Dataset | np.ndarray,
|
|
362
|
+
data_dst: None | h5py.Dataset | np.ndarray,
|
|
365
363
|
start_n: int = 0,
|
|
366
|
-
end_n:
|
|
364
|
+
end_n: int | None = None,
|
|
367
365
|
samplerate_dst: float = 1000,
|
|
368
366
|
*,
|
|
369
367
|
is_time: bool = False,
|
|
370
|
-
) ->
|
|
368
|
+
) -> None | h5py.Dataset | np.ndarray:
|
|
371
369
|
"""Up- or down-sample the original trace-data.
|
|
372
370
|
|
|
373
371
|
:param data_src: original iv-data
|
|
@@ -463,11 +461,11 @@ class Reader(CoreReader):
|
|
|
463
461
|
|
|
464
462
|
def generate_plot_data(
|
|
465
463
|
self,
|
|
466
|
-
start_s:
|
|
467
|
-
end_s:
|
|
464
|
+
start_s: float | None = None,
|
|
465
|
+
end_s: float | None = None,
|
|
468
466
|
*,
|
|
469
467
|
relative_timestamp: bool = True,
|
|
470
|
-
) ->
|
|
468
|
+
) -> dict | None:
|
|
471
469
|
"""Provide down-sampled iv-data that can be fed into plot_to_file().
|
|
472
470
|
|
|
473
471
|
:param start_s: time in seconds, relative to start of recording
|
|
@@ -517,7 +515,7 @@ class Reader(CoreReader):
|
|
|
517
515
|
|
|
518
516
|
@staticmethod
|
|
519
517
|
def assemble_plot(
|
|
520
|
-
data:
|
|
518
|
+
data: Mapping | Sequence, width: int = 20, height: int = 10, *, only_pwr: bool = False
|
|
521
519
|
) -> plt.Figure:
|
|
522
520
|
"""Create the actual figure.
|
|
523
521
|
|
|
@@ -575,8 +573,8 @@ class Reader(CoreReader):
|
|
|
575
573
|
|
|
576
574
|
def plot_to_file(
|
|
577
575
|
self,
|
|
578
|
-
start_s:
|
|
579
|
-
end_s:
|
|
576
|
+
start_s: float | None = None,
|
|
577
|
+
end_s: float | None = None,
|
|
580
578
|
width: int = 20,
|
|
581
579
|
height: int = 10,
|
|
582
580
|
*,
|
|
@@ -619,7 +617,7 @@ class Reader(CoreReader):
|
|
|
619
617
|
height: int = 10,
|
|
620
618
|
*,
|
|
621
619
|
only_pwr: bool = False,
|
|
622
|
-
) ->
|
|
620
|
+
) -> Path | None:
|
|
623
621
|
"""Create (down-sampled) IV-Multi-Plots (of more than one trace).
|
|
624
622
|
|
|
625
623
|
:param data: plottable / down-sampled iv-data with some meta-data
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shepherd_data
|
|
3
|
-
Version: 2025.6.
|
|
3
|
+
Version: 2025.6.4
|
|
4
4
|
Summary: Programming- and CLI-Interface for the h5-dataformat of the Shepherd-Testbed
|
|
5
5
|
Author-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
|
|
6
6
|
Maintainer-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
|
|
@@ -18,7 +18,6 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
18
18
|
Classifier: Intended Audience :: Developers
|
|
19
19
|
Classifier: Intended Audience :: Information Technology
|
|
20
20
|
Classifier: Intended Audience :: Science/Research
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -26,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
26
25
|
Classifier: License :: OSI Approved :: MIT License
|
|
27
26
|
Classifier: Operating System :: OS Independent
|
|
28
27
|
Classifier: Natural Language :: English
|
|
29
|
-
Requires-Python: >=3.
|
|
28
|
+
Requires-Python: >=3.10
|
|
30
29
|
Description-Content-Type: text/markdown
|
|
31
30
|
Requires-Dist: click
|
|
32
31
|
Requires-Dist: h5py
|
|
@@ -35,7 +34,7 @@ Requires-Dist: numpy
|
|
|
35
34
|
Requires-Dist: pandas>=2.0.0
|
|
36
35
|
Requires-Dist: pyYAML
|
|
37
36
|
Requires-Dist: scipy
|
|
38
|
-
Requires-Dist: shepherd-core[inventory]>=2025.06.
|
|
37
|
+
Requires-Dist: shepherd-core[inventory]>=2025.06.4
|
|
39
38
|
Requires-Dist: tqdm
|
|
40
39
|
Provides-Extra: elf
|
|
41
40
|
Requires-Dist: shepherd-core[elf]; extra == "elf"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
shepherd_data/__init__.py,sha256=0HoU3_Q8b3XcNieFrTsUETlr214rYk6k_t2HIqbwaIk,353
|
|
2
|
+
shepherd_data/cli.py,sha256=GjPkETMwZXHAxJETgDu6REsRAQPFe_gJVU-W-YPEWKI,15859
|
|
3
|
+
shepherd_data/ivonne.py,sha256=vh0XyMoSjbanzy4sqpNfVo6DEnbWNJPRUgNKPfHP2Yc,11875
|
|
4
|
+
shepherd_data/mppt.py,sha256=y9gVIhMs-ZG3ScL9UQTc5n8T146B13Q5dA5sfqqfjg0,3999
|
|
5
|
+
shepherd_data/reader.py,sha256=5uemJBos3QI1BE48Q4xSG_sPD-V0Pc4Y5SpaWmObLfU,25620
|
|
6
|
+
shepherd_data-2025.6.4.dist-info/METADATA,sha256=HHmW87by721iBs5czK6m3teisTXH5suTgJzFwOGRoDw,3355
|
|
7
|
+
shepherd_data-2025.6.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
shepherd_data-2025.6.4.dist-info/entry_points.txt,sha256=6PBfY36A1xNOdzLiz-Qoukya_UzFZAwOapwmRNnPeZ8,56
|
|
9
|
+
shepherd_data-2025.6.4.dist-info/top_level.txt,sha256=7-SCTY-TG1mLY72OVKCaqte1hy-X8woxknIUAD3OIxs,14
|
|
10
|
+
shepherd_data-2025.6.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
11
|
+
shepherd_data-2025.6.4.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
shepherd_data/__init__.py,sha256=59AsLF1na1g6jQ1ZoFUCgaO_dMVJnrWpOKwW-jPAcwM,353
|
|
2
|
-
shepherd_data/cli.py,sha256=8CShRsqJ5w6_nirNKInFEwYGv0gG5caXVLzExSeRGL4,15902
|
|
3
|
-
shepherd_data/ivonne.py,sha256=sH7c2aj9i5ygkpw6xQbjRwrbl9wtU_Toj_ZFyJVywG8,11930
|
|
4
|
-
shepherd_data/mppt.py,sha256=y9gVIhMs-ZG3ScL9UQTc5n8T146B13Q5dA5sfqqfjg0,3999
|
|
5
|
-
shepherd_data/reader.py,sha256=NEIwXC5f5fkSiBEsyY85gIcgjhYHFS1tavNnA6ViE3k,25741
|
|
6
|
-
shepherd_data-2025.6.3.dist-info/METADATA,sha256=YY0XjoqFMNNRHgg0a225ycvG7HYQH_-66Gxdo0UHnoI,3404
|
|
7
|
-
shepherd_data-2025.6.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
shepherd_data-2025.6.3.dist-info/entry_points.txt,sha256=6PBfY36A1xNOdzLiz-Qoukya_UzFZAwOapwmRNnPeZ8,56
|
|
9
|
-
shepherd_data-2025.6.3.dist-info/top_level.txt,sha256=7-SCTY-TG1mLY72OVKCaqte1hy-X8woxknIUAD3OIxs,14
|
|
10
|
-
shepherd_data-2025.6.3.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
11
|
-
shepherd_data-2025.6.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|