shepherd-data 2024.7.4__py3-none-any.whl → 2024.8.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.
shepherd_data/__init__.py CHANGED
@@ -11,7 +11,7 @@ from shepherd_core import Writer
11
11
 
12
12
  from .reader import Reader
13
13
 
14
- __version__ = "2024.7.4"
14
+ __version__ = "2024.8.1"
15
15
 
16
16
  __all__ = [
17
17
  "Reader",
shepherd_data/reader.py CHANGED
@@ -399,34 +399,32 @@ class Reader(CoreReader):
399
399
  if isinstance(data, dict):
400
400
  data = [data]
401
401
  if only_pwr:
402
- fig = plt.figure(figsize=(width, height))
402
+ fig, ax = plt.subplots(1, 1, figsize=(width, height), layout="tight")
403
+ axs = [ax]
403
404
  fig.suptitle("Power-Trace")
404
- plt.xlabel("time [s]")
405
- plt.ylabel("power [mW]")
406
- for date in data:
407
- plt.plot(
408
- date["time"], date["voltage"] * date["current"] * 10**3, label=date["name"]
409
- )
410
- if len(data) > 1:
411
- plt.legend(loc="lower center", ncol=len(data))
412
405
  else:
413
- fig, axes = plt.subplots(3, 1, sharex="all")
406
+ fig, axs = plt.subplots(3, 1, sharex="all", figsize=(width, height), layout="tight")
414
407
  fig.suptitle("Voltage, current & power")
415
- for date in data:
416
- axes[0].plot(date["time"], date["voltage"], label=date["name"])
417
- axes[1].plot(date["time"], date["current"] * 10**3, label=date["name"])
418
- axes[2].plot(
419
- date["time"], date["voltage"] * date["current"] * 10**3, label=date["name"]
420
- )
421
- axes[0].set_ylabel("voltage [V]")
422
- axes[1].set_ylabel("current [mA]")
423
- axes[2].set_ylabel("power [mW]")
424
- if len(data) > 1:
425
- axes[0].legend(loc="lower center", ncol=len(data))
426
- axes[2].set_xlabel("time [s]")
427
- fig.set_figwidth(width)
428
- fig.set_figheight(height)
429
- fig.tight_layout()
408
+ axs[0].set_ylabel("voltage [V]")
409
+ axs[1].set_ylabel("current [mA]")
410
+ # last axis is set below
411
+
412
+ for date in data:
413
+ if not only_pwr:
414
+ axs[0].plot(date["time"], date["voltage"], label=date["name"])
415
+ axs[1].plot(date["time"], date["current"] * 10**3, label=date["name"])
416
+ axs[-1].plot(
417
+ date["time"], date["voltage"] * date["current"] * 10**3, label=date["name"]
418
+ )
419
+
420
+ if len(data) > 1:
421
+ axs[0].legend(loc="lower center", ncol=len(data))
422
+ axs[-1].set_xlabel("time [s]")
423
+ axs[-1].set_ylabel("power [mW]")
424
+ for ax in axs:
425
+ # deactivates offset-creation for ax-ticks
426
+ ax.get_yaxis().get_major_formatter().set_useOffset(False)
427
+ ax.get_xaxis().get_major_formatter().set_useOffset(False)
430
428
  return fig
431
429
 
432
430
  def plot_to_file(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shepherd_data
3
- Version: 2024.7.4
3
+ Version: 2024.8.1
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>
@@ -35,7 +35,7 @@ Requires-Dist: numpy
35
35
  Requires-Dist: pandas >=2.0.0
36
36
  Requires-Dist: pyYAML
37
37
  Requires-Dist: scipy
38
- Requires-Dist: shepherd-core[inventory] >=2024.7.4
38
+ Requires-Dist: shepherd-core[inventory] >=2024.8.1
39
39
  Requires-Dist: tqdm
40
40
  Provides-Extra: dev
41
41
  Requires-Dist: shepherd-core[dev] ; extra == 'dev'
@@ -0,0 +1,11 @@
1
+ shepherd_data/__init__.py,sha256=qttbVWA4DlblFKrzTYFW6PGw2M7ItaFD-O5N7-uoZr0,352
2
+ shepherd_data/cli.py,sha256=pv17ILFQCdPSyWgmw0rQIhdsYucqeiWFwJn8hft4ga0,15760
3
+ shepherd_data/ivonne.py,sha256=5EryExMQ8E8PTgX5xkZUyLqhvhCcLT17rdC0POv4NLI,11831
4
+ shepherd_data/mppt.py,sha256=588KSrLuJfNRKKnnL6ewePLi3zrwaO_PAZypikACrks,3925
5
+ shepherd_data/reader.py,sha256=eShdgACQLwoOtOYIyB3CjvUgJlUEbRDcUso_3m02C9U,20098
6
+ shepherd_data-2024.8.1.dist-info/METADATA,sha256=BDlB4cWs774PnsmgxpER1-3hmGwA_p34k3nOCa9zGmM,3387
7
+ shepherd_data-2024.8.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
8
+ shepherd_data-2024.8.1.dist-info/entry_points.txt,sha256=6PBfY36A1xNOdzLiz-Qoukya_UzFZAwOapwmRNnPeZ8,56
9
+ shepherd_data-2024.8.1.dist-info/top_level.txt,sha256=7-SCTY-TG1mLY72OVKCaqte1hy-X8woxknIUAD3OIxs,14
10
+ shepherd_data-2024.8.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
11
+ shepherd_data-2024.8.1.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- shepherd_data/__init__.py,sha256=6-KKBydEEYJAB_sME8Lu0_GfyUchSr5W6p4TcLaM6so,352
2
- shepherd_data/cli.py,sha256=pv17ILFQCdPSyWgmw0rQIhdsYucqeiWFwJn8hft4ga0,15760
3
- shepherd_data/ivonne.py,sha256=5EryExMQ8E8PTgX5xkZUyLqhvhCcLT17rdC0POv4NLI,11831
4
- shepherd_data/mppt.py,sha256=588KSrLuJfNRKKnnL6ewePLi3zrwaO_PAZypikACrks,3925
5
- shepherd_data/reader.py,sha256=l9Kcx1YHqkd_ef_QRTNpWE5ZEmxPeiVkOPw680Klzkk,20186
6
- shepherd_data-2024.7.4.dist-info/METADATA,sha256=ZkPJrT_VxcNqVo7baBOx1cSlk9KzswnzSIFg-4tc4Rk,3387
7
- shepherd_data-2024.7.4.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
8
- shepherd_data-2024.7.4.dist-info/entry_points.txt,sha256=6PBfY36A1xNOdzLiz-Qoukya_UzFZAwOapwmRNnPeZ8,56
9
- shepherd_data-2024.7.4.dist-info/top_level.txt,sha256=7-SCTY-TG1mLY72OVKCaqte1hy-X8woxknIUAD3OIxs,14
10
- shepherd_data-2024.7.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
11
- shepherd_data-2024.7.4.dist-info/RECORD,,