nx_fidelity_gate.nx
buildroot/runtime/nx_fidelity_gate.nx
about
nx_fidelity_gate.nx -- REFEREE for the fidelity metric (nx_segsnr).
A reference sine; four reconstructions of decreasing quality:
exact copy -> capped ~99 dB
+ small noise (200)-> high SegSNR
+ large noise(4000)-> lower SegSNR
unrelated (noise) -> near 0 dB (neg-control)
The metric must rank them MONOTONICALLY (exact > small > large > unrelated),
and the unrelated case must be low -- otherwise it can't tell good from bad.
Evidence -> stdout + knowledge/status/fidelity_gate.log. Exit 0 GREEN / 1 RED.
Sovereign x86_64 throughout. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls_x86_64.nxnx_fidelity.nxnx_polypitch.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 17 | const N: i64 = 2048 |
| 18 | const FRAME: i64 = 256 |
| 19 | const FS: i64 = 8000 |
| 20 | const TWO_PI: i64 = 411775 |
functions
| 22 | func gp(logfd: i64, s: *u8) -> i64 called by 1: main |
| 29 | func gn(logfd: i64, v: i64) -> i64 called by 1: main |
| 43 | func store16(buf: *u8, i: i64, v: i64) -> i64 |
| 52 | func load16(buf: *u8, i: i64) -> i64 called by 1: copy_plus_noise |
| 60 | func gen_sine(buf: *u8, f: i64, amp: i64) -> i64 |
| 73 | func copy_plus_noise(ref: *u8, dst: *u8, mag: i64, seed0: i64) -> i64 |
| 86 | func main() -> i64 |