pycsamt.iot.plot#
Visualisation helpers for IoT-enabled field acquisition.
The plotting layer turns telemetry, station metadata, edge QC, power, and clock information into compact operational figures. These figures are not geophysical inversions; they are acquisition dashboards that help explain what happened before EDI/impedance processing.
Functions
|
Plot edge quality-control decisions and channel metrics. |
|
Plot a compact IoT acquisition dashboard. |
|
Plot IoT energy budget, runtime, and power-state summaries. |
|
Plot clock offset, drift, jitter, GPS lock, and quality grades. |
- pycsamt.iot.plot.plot_field_dashboard(session, *, now=None, figsize=(13.0, 8.0), station_axis='auto', title=None, output_path=None, close=False)[source]#
Plot a compact IoT acquisition dashboard.
- Parameters:
session (FieldSession or mapping) – Field session, or a mapping produced by
pycsamt.iot.FieldSession.to_dict().now (float, optional) – Reference timestamp used for live latency/status calculations.
figsize (tuple) – Matplotlib figure size in inches.
station_axis ({"auto", "profile", "map"}) – Station layout.
"profile"uses profile chainage/index;"map"uses longitude/latitude when all stations have coordinates;"auto"chooses map only when coordinates exist.title (str, optional) – Figure title. Defaults to the survey id.
output_path (str, optional) – If given, save the figure to this path.
close (bool) – Close the figure before returning it. Useful for batch report generation after saving.
- Returns:
The dashboard figure. The computed data are also attached as
fig.pycsamt_iot_dashboardfor reproducible report workflows.- Return type:
- pycsamt.iot.plot.plot_edge_qc_summary(edge, *, figsize=(12.0, 7.5), title='Edge QC summary', output_path=None, close=False)[source]#
Plot edge quality-control decisions and channel metrics.
- Parameters:
edge (EdgeProcessingResult, TelemetryPacket, FieldSession, mapping, or iterable) – Edge-processing result(s), QC telemetry packet(s), a field session, or serialised mappings. Session inputs are filtered to QC packets.
figsize (tuple) – Matplotlib figure size in inches.
title (str) – Figure title.
output_path (str, optional) – If given, save the figure to this path.
close (bool) – Close the figure before returning it.
- Returns:
The QC summary figure. The normalised rows are attached as
fig.pycsamt_iot_edge_qc.- Return type:
- pycsamt.iot.plot.plot_power_budget(power, *, figsize=(12.0, 7.5), title='IoT power budget', output_path=None, close=False)[source]#
Plot IoT energy budget, runtime, and power-state summaries.
- Parameters:
power (EnergyConfig, EnergyEstimate, TelemetryPacket, FieldSession, mapping, or iterable) – Power budget input(s).
EnergyConfigobjects are estimated before plotting. Session inputs are filtered toPacketKind.POWERpackets.figsize (tuple) – Matplotlib figure size in inches.
title (str) – Figure title.
output_path (str, optional) – If given, save the figure to this path.
close (bool) – Close the figure before returning it.
- Returns:
The power-budget figure. Normalised rows are attached as
fig.pycsamt_iot_power_budget.- Return type:
- pycsamt.iot.plot.plot_sync_quality(sync, *, figsize=(12.0, 7.5), title='Clock synchronisation quality', tolerance_ms=1.0, max_drift_ppm=None, max_jitter_ms=None, output_path=None, close=False)[source]#
Plot clock offset, drift, jitter, GPS lock, and quality grades.
- Parameters:
sync (SyncStatus, TelemetryPacket, FieldSession, mapping, or iterable) – Synchronisation status input(s). Session inputs are filtered to
PacketKind.SYNCpackets.figsize (tuple) – Matplotlib figure size in inches.
title (str) – Figure title.
tolerance_ms (float, optional) – Optional visual threshold lines.
max_drift_ppm (float, optional) – Optional visual threshold lines.
max_jitter_ms (float, optional) – Optional visual threshold lines.
output_path (str, optional) – If given, save the figure to this path.
close (bool) – Close the figure before returning it.
- Returns:
The synchronisation figure. Normalised rows are attached as
fig.pycsamt_iot_sync_quality.- Return type: