code wiki / (root) / nx_arousal_fit.nx

nx_arousal_fit.nx

buildroot/runtime/nx_arousal_fit.nx

9672 B202 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic arousal
docsdependenciesstructsconstsfunctions

about

nx_arousal_fit.nx -- fits the perfusion time-constant tau to OBSERVED data by coarse-to-fine sweep over the shared nx_arousal_lib objective. This is the rung that lets the twin EXCEED the published literature instead of inheriting its ceiling: the orgasm/perfusion parameters rest on tiny old samples (Bohlen n=11, 1982), so the honest move is to make them FITTABLE, not fixed. Reports seed_residual alongside the fitted one so a run that did NOT improve is visible rather than silently reported as a fit. A fitter that always claims success measures nothing. usage: nx_arousal_fit tau <drive> <t1> <o1> <t2> <o2> [lo_ms] [hi_ms] nx_arousal_fit selftest license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_arousal_lib.nx nx_arousal_fit.nx

imports: nx_arousal_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main a_puts sys_write sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close a_atoi a_series_residual sys_mmap ↻ a_skipnd a_pint a_lag a_abs sys_munmap a_series_count sys_mmap ↻ a_skipnd ↻ a_pint ↻ sys_munmap ↻ a_putn sys_write ↻ sys_mmap ↻ sys_munmap ↻ a_residual a_perf a_lag ↻ a_abs ↻ f_scan a_residual ↻

structs

none

consts

13const F_MAGIC_4000000: i64 = 4000000
15const F_ROUNDS: i64 = 8
16const F_SAMPLES: i64 = 16
20const F_CI_SLACK: i64 = 1
21const F_LO_DEFAULT: i64 = 1000
22const F_HI_DEFAULT: i64 = 1000000

functions

25func f_scan(lo: i64, hi: i64, step: i64, drive: i64, t1: i64, o1: i64, t2: i64, o2: i64, best: *i64) -> i64
called by 1: main calls 1: a_residual
38func main(argc: i64, argv: *i64) -> i64