2.32.4.13. pycsamt.iot.edge#
Functions
|
Return one row per channel from edge-processing results. |
Classes
|
Quality-control summary for one edge data channel. |
|
Acceptance state assigned by edge-side quality control. |
|
Configuration for lightweight field-side processing. |
|
Summary returned by |
|
Small edge-processing block for telemetry payload reduction. |
- class pycsamt.iot.edge.EdgeDecision(*values)[source]
-
Acceptance state assigned by edge-side quality control.
ACCEPTandREJECTare the hard decisions.WARNINGmarks a window that is usable but marginal,REPEATrequests re-occupation, andUNKNOWNis used when QC could not be evaluated.- ACCEPT = 'accept'
- REJECT = 'reject'
- WARNING = 'warning'
- REPEAT = 'repeat'
- UNKNOWN = 'unknown'
- class pycsamt.iot.edge.EdgeChannelSummary(channel, n_sample, finite_coverage, rms, mean, std, min, max, spike_fraction, accepted, reasons=<factory>)[source]
Bases:
PyCSAMTObjectQuality-control summary for one edge data channel.
- Parameters:
- channel: str
- n_sample: int
- finite_coverage: float
- rms: float
- mean: float
- std: float
- min: float
- max: float
- spike_fraction: float
- accepted: bool
- validate()[source]
Validate and normalise the channel summary.
- Return type:
None
- class pycsamt.iot.edge.EdgeProcessingConfig(decimation=1, finite_threshold=0.9, sample_axis=0, channel_names=None, compute_rms=True, compute_coverage=True, compute_spikes=True, spike_threshold=6.0, max_spike_fraction=0.05, warn_finite_threshold=None, warn_spike_fraction=None, retain_payload_samples=False, metadata=<factory>)[source]
Bases:
PyCSAMTObjectConfiguration for lightweight field-side processing.
- Parameters:
- decimation: int = 1
- finite_threshold: float = 0.9
- sample_axis: int = 0
- compute_rms: bool = True
- compute_coverage: bool = True
- compute_spikes: bool = True
- max_spike_fraction: float = 0.05
- retain_payload_samples: bool = False
- validate()[source]
Validate and normalise edge-processing options.
- Return type:
None
- class pycsamt.iot.edge.EdgeProcessingResult(data, metrics, accepted, reasons=<factory>, channels=<factory>, decision_override=None)[source]
Bases:
PyCSAMTObjectSummary returned by
EdgeProcessor.- Parameters:
- data: ndarray
- accepted: bool
- channels: list[EdgeChannelSummary]
- decision_override: EdgeDecision | str | None = None
- validate()[source]
Validate and normalise the processing result.
- Return type:
None
- property decision: EdgeDecision[source]
Return the compact QC decision.
Falls back to a plain accept/reject derived from
acceptedunless an explicitdecision_override(e.g.WARNING) was assigned by the processor.
- payload(*, include_data=None)[source]
Return a serialisable QC payload for telemetry.
- to_packet(device, *, timestamp, survey_id=None, qos=0, retained=False, include_data=None)[source]
Encode this edge result as a QC telemetry packet.
- Parameters:
- Return type:
- class pycsamt.iot.edge.EdgeProcessor(config=None)[source]
Bases:
PyCSAMTObjectSmall edge-processing block for telemetry payload reduction.
- Parameters:
config (EdgeProcessingConfig | None)
- process(data, *, channel_names=None)[source]
Decimate numeric data and compute simple quality metrics.
- Parameters:
- Return type:
- pycsamt.iot.edge.edge_summary_table(result, *, api=None)[source]
Return one row per channel from edge-processing results.
- Parameters:
result (EdgeProcessingResult | Iterable[EdgeProcessingResult])
api (bool | None)
- Return type: