Comparison & Batch Reports¶
Multi-run comparison (before/after deltas) and batch (cross-DUT yield) analysis and report building
Multi-run input model for comparison and batch reports.
A Run is a set of capture files plus per-run metadata; a RunSet is the ordered collection the ComparisonAnalyzer consumes. Comparison mode measures deltas against a baseline run; batch mode aggregates across runs (DUTs).
RunMetadata
dataclass
¶
RunMetadata(dut_id: Optional[str] = None, condition: Optional[str] = None, operator: Optional[str] = None, timestamp: Optional[datetime] = None, notes: Optional[str] = None)
Descriptive, optional context for one run.
Run
dataclass
¶
Run(label: str, files: List[Path], metadata: RunMetadata = RunMetadata(), waveforms: List[WaveformData] = list(), measurements: List[MeasurementResult] = list(), passed: Optional[bool] = None, incomplete: bool = False, load_errors: List[str] = list())
One test run: capture files in, analyzed waveforms/measurements out.
RunSet
dataclass
¶
RunSet(runs: List[Run], mode: str = MODE_COMPARISON, baseline_index: int = 0, criteria_set: Optional[CriteriaSet] = None)
The full input to a comparison or batch analysis.
validate
¶
Raise ValueError on structural problems (before any file I/O).
Source code in scpi_control/report_generator/models/comparison.py
DeltaEntry
dataclass
¶
One non-baseline run's value for one statistic, relative to baseline.
AggregateStats
dataclass
¶
Cross-run aggregate of one statistic (batch mode).
ComparisonResult
dataclass
¶
ComparisonResult(runset: RunSet, matched_channels: List[str], deltas: Dict[str, Dict[str, List[DeltaEntry]]] = dict(), aggregates: Dict[str, Dict[str, AggregateStats]] = dict(), yield_passed: Optional[int] = None, yield_total: Optional[int] = None, yield_incomplete: Optional[int] = None, warnings: List[str] = list())
Everything the report builder needs, fully computed.
Loads and analyzes a RunSet into a ComparisonResult.
Strict by default: a bad file fails the whole analysis with the run and file named. skip_bad_runs=True demotes that to a warning and drops the run, except when fewer than two runs survive or the comparison baseline itself is lost.
Builds TestReports from analyzed RunSets, plus the manifest/sign-off helpers shared with the single-run report path.
build_manifest
¶
One entry per source file per run. Timestamp: provenance acquired_at, else waveform capture_timestamp, else file mtime (ISO, UTC).
Source code in scpi_control/report_generator/comparison_report_builder.py
build_comparison_report
¶
build_comparison_report(result: ComparisonResult, metadata: ReportMetadata, template: Optional[ReportTemplate] = None, *, include_appendix: Optional[bool] = None, include_signoff: Optional[bool] = None) -> TestReport
Assemble a standard TestReport from an analyzed RunSet.
Explicit kwargs win; otherwise template settings; with neither, both the appendix and sign-off are included (comparison reports exist for traceability).
Source code in scpi_control/report_generator/comparison_report_builder.py
append_signoff_and_appendix
¶
Single-run path: honor the template's appendix/sign-off flags on an already-built report. Manifest is derived from section waveforms.
Source code in scpi_control/report_generator/comparison_report_builder.py
See Also¶
- Waveform - Waveform acquisition and data handling
- Analysis - Signal analysis (FFT, THD, SNR)
- Signal Synthesis - Parameterized synthetic waveforms for hardware-free examples
- Report Generator: API Reference - Single-run report building blocks (ReportMetadata, TestReport, generators)