Skip to main content

Module ac_accuracy

Module ac_accuracy 

Source

Structs§

AcResult
Full AC-accuracy result for one circuit.
AcThresholds
Thresholds for grading the AC dimensions. Informative (localizes which dimension carries the error), not a hard CI gate.
FreqPoint
One frequency-sweep point: WDF-vs-golden AC gain at that frequency.
HarmonicError
One harmonic’s level, WDF vs golden, expressed in dBc (relative to the fundamental) so it is level-independent by construction.

Enums§

AcVerdict
The AC-fidelity verdict for one circuit — which dimension carries the error.

Constants§

HARMONIC_FLOOR_DBC
A golden harmonic weaker than this (relative to the fundamental) is treated as absent (below the simulator noise grass): its per-harmonic error is not scored for the verdict, so ngspice noise bins don’t masquerade as shape error. −80 dBc sits above ngspice’s typical noise grass yet below a real diode/BJT harmonic.
HARMONIC_ORDERS
Harmonic orders scored per-tone (2nd through 5th).

Functions§

evaluate
Decompose the WDF-vs-golden AC error into level / shape / harmonics / response and reach a verdict.
response_tilt_db
Response tilt: max−min over the finite per-frequency gains.