Vyges Loom

vyges-meas

Analog measurement you can defend — SNR, SINAD, THD, SFDR from a captured tone; gain, bandwidth, unity-gain frequency and phase margin from a sweep. Every number states the method that produced it, and refuses the inputs it cannot measure that way.

View source on GitHub →

What it does

Used by: anyone signing off an ADC, DAC, PLL or amplifier from simulation or bench data — where the number goes in a datasheet and has to survive review.

“SNR” on its own is not a measurement. The same capture, measured by two honest tools, can differ by several dB purely on convention: whether the fundamental bin is excluded from noise, how many harmonics are counted, whether DC is in the band, what happens to a harmonic that aliases onto another. vyges-meas does not implement “SNR” — it implements one closed method, states every choice it makes, and refuses a capture it cannot measure that way rather than returning a number that quietly means something else.

captured tone / AC sweep  ──►  vyges-meas  ──►  SNR · SINAD · THD · SFDR · gain · BW · phase margin

A refusal is worth more than a wrong number

A non-coherent capture, a clipped record, a harmonic that folds onto the fundamental — each one makes the standard arithmetic quietly wrong rather than obviously wrong. Most tools return a value anyway. This one names the problem and stops, because a spectral number you cannot trace back to its method is a number you will have to re-measure the week before tape-out.

Nothing is extrapolated, either. If a sweep never crosses 0 dB inside its measured range, the unity-gain frequency is reported as not found — not invented from the trend. A sweep that stopped too early should read as a sweep that stopped too early.

Nor will it infer what it was not told. A standard's scope depends on what the record came from — an ADC, a DAC, a recorder — and no list of numbers reveals that. So you declare it with --application, and until you do, the result does not reach for a standard's name. Guessing would manufacture a conformance claim out of nothing.

Every result states how much it claims — a machine-readable alignment level. These are Vyges definitions, published and readable; they are deliberately not asserted as IEEE 1241 / 1658 / 1057 conformance, and the tool says so itself rather than leaving you to assume.

Try it

The series is one sample per line in capture order, a power-of-two record, coherently sampled — --fundamental-bin says which bin the tone lands on. A sweep is hz gain_db phase_deg per line.

$ vyges install loom   # one-time: fetch the Loom suite into ~/.vyges/bin
$ vyges loom meas demo   # instant — built-in coherent capture → the full metric set
$ vyges loom meas spectral tone.series --fundamental-bin 16 --metric thd   # harmonic distortion
$ vyges loom meas spectral tone.series --fundamental-bin 16 --metric snr --target 60   # PASS/FAIL vs a spec
$ vyges loom meas transfer ac.sweep --metric phase-margin   # loop stability from a sweep

Add --json for the machine payload, --target to turn a measurement into a pass/fail gate, or --describe to read the method itself.

Open core · Apache-2.0

A clean-room Rust kernel — a direct DFT, no third-party numerics in the trust path, so the definition can be read off the code. See all the engines & the data spine →