P3: normalization fit (1.2.0 and 1.1.2), apply, polar, simurg normalize

- signal/normalization/numerics.py: vendor percentile, trimmean, MAD sigma
  (old/new), bisquare robust fits, float32/float64 typing and sequential
  sums reproduced exactly (ported from gtc2vcf, MIT)
- signal/normalization/fit.py: outlier removal, offset, rotation, shear,
  scale, nn12/rr12, single-channel model for small Infinium I bins,
  exact and binned nearest-neighbour sweeps; vendor quirks marked QUIRK
- signal/normalization/apply.py: affine transform and theta/R
- pipeline/normalize.py + CLI `simurg normalize`
- oracle GTCs rebuilt with -ffp-contract=off (aarch64 gcc fuses a*b+c by
  default, shifting the last bits); the old FMA oracle differed by <=4 ULP

Result: transforms bit-identical to the oracle for all 36 GSA samples x
48 bins, for both normalization versions (3456/3456 bins, 0 ULP).
This commit is contained in:
kemal committed 2026-09-27 22:51:06 +01:00
1 parent c8cd2f741c
commit c0d556d4af
12 files changed
+1097 -14

No files matched your search

+1 -1
View File
@@ -6,12 +6,12 @@ from __future__ import annotations
import numpy as np
import pytest
from tests.conftest import GSA_BPM, GSA_IDATS, ORACLE_GTCS, need
from simurg.formats.bpm import read_bpm
from simurg.formats.gtc import read_gtc
from simurg.formats.idat import read_idat
from simurg.signal.raw_xy import LocusMapCache, assemble_raw_xy, check_coverage
from tests.conftest import GSA_BPM, GSA_IDATS, ORACLE_GTCS, need
pytestmark = pytest.mark.data