Skip to content

Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)

Validate acoustic episodes on real recordings and publish measured regressions

Cinna Davis3447e33ec676
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index b67e03a..505d90c 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -36,7 +36,7 @@ jobs:
# The owner requires real recordings for further validation. The historical
# pytest suite generates synthetic inputs, so this workflow does not run it.
- name: Check acoustic episode algebra and recorded evidence
- run: python -m pytest -q tests/test_episodes.py tests/test_real_discovery_normalization.py tests/test_real_upload_verification.py tests/test_contracts.py
+ run: python -m pytest -q tests/test_episodes.py tests/test_real_discovery_normalization.py tests/test_real_upload_verification.py tests/test_contracts.py tests/test_real_coherent_discovery.py tests/test_real_episode_artifact.py
- name: Compile source without executing experiments
run: python -m compileall -q src scripts
- name: Check benchmark instrumentation detection
diff --git a/benchmarks/acoustic-episodes-349/README.md b/benchmarks/acoustic-episodes-349/README.md
new file mode 100644
index 0000000..9326c8a
--- /dev/null
+++ b/benchmarks/acoustic-episodes-349/README.md
@@ -0,0 +1,40 @@
+# Real acoustic-episode comparison
+
+See [the engineering report](../../docs/ACOUSTIC_EPISODES_REPORT.md) for the fixed
+selection, expectations, measurements, regressions, limits and reproduction.
+
+- `manifest.json`: all 32 actual input identities, public sources, rights and
+ processing. Restore media to its relative `path` entries before running.
+- `comparison.csv`: all cases, with old/new/wider proposal and child counts,
+ union observed time, old-point overlap, time, RSS, output volume and code identity.
+- `observations.jsonl.gz`: one JSON object per input, retaining complete baseline,
+ new and optional wide discovery observations; no audio. `wide=null` is expected
+ only for the hour-long reference, outside the wide arm.
+
+The baseline is 451b67f; the frozen new comparison is 05548ed. Per-case content
+hashes, settings and runtime are inside the new artifacts. Failed-check counts
+can exceed rejected candidates because a candidate may fail several checks.
+The final reporting-only patch exposes separate sustained/brief gate diagnostics;
+accepted events/episodes were checked unchanged on the real rich-family clip.
+
+AeroSonicDB is by Downward and Nordby, CC BY-NC 4.0; DEMAND is by Thiemann, Ito
+and Vincent, CC BY-SA 3.0; DLR RECORD139 is CC BY 4.0 (see source record and the
+existing extraction report). The reference source's redistribution permission
+is unestablished. Media are not included. This package contains factual derived
+frequency measurements and diagnostics; it makes no aircraft, source-motion,
+source-count or localization-accuracy claim.
+
+Inspect the saved measurements with:
+
+```python
+import gzip, json
+with gzip.open('benchmarks/acoustic-episodes-349/observations.jsonl.gz', 'rt') as f:
+ for line in f:
+ row = json.loads(line)
+ print(row['case_id'], row['new']['counts'])
+```
+
+`family-episodes.png` uses AeroSonicDB measurements (Downward and Nordby,
+CC BY-NC 4.0). `vehicle-episodes.png` uses DEMAND measurements (Thiemann, Ito
+and Vincent, CC BY-SA 3.0). Both show canonical episode plots from the fixed
+comparison, with source identity unresolved.
diff --git a/benchmarks/acoustic-episodes-349/comparison.csv b/benchmarks/acoustic-episodes-349/comparison.csv
new file mode 100644
index 0000000..cdc0864
--- /dev/null
+++ b/benchmarks/acoustic-episodes-349/comparison.csv
@@ -0,0 +1,33 @@
+case_id,context,source_sha256,baseline_observed_seconds,new_observed_seconds,baseline_points_retained,baseline_points_total,baseline_status,baseline_proposals,baseline_child_tracks,baseline_runtime_s,baseline_peak_rss_kib,baseline_output_bytes,new_status,new_proposals,new_child_tracks,new_runtime_s,new_peak_rss_kib,new_output_bytes,wide_status,wide_proposals,wide_child_tracks,wide_runtime_s,wide_peak_rss_kib,wide_output_bytes,new_brief_proposals,new_association_work,new_retained_candidates,new_implementation_sha256,new_git_commit
+case-0001,publisher_aircraft,36164d8f88d3a67da0efb2a9a8934a27f7991e3d1eddebe1757fc8eee30b823f,36.5,50.0,148,168,complete,1,3,3.774169609998353,151496,109841,complete,1,6,2.880824838997796,149504,131559,complete,2,8,4.404849853977794,180420,143817,0,720,81,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0002,publisher_aircraft,9bc5b35b05803fa64626f16622eee5b7e3086d7226e5ec3515b6b2a1cb99cd38,0.0,0.0,0,0,complete,0,0,2.89596569200512,151592,41297,complete,0,0,2.386183925002115,148400,39933,complete,0,0,3.6583751699945424,179788,40274,0,2,8,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0018,publisher_background,9f0b97cfce941111eb82e82d6ac361eeec80292d32212e3791d895d65b9dc265,0.0,0.0,0,0,complete,0,0,1.9633571750018746,148428,39727,complete,0,0,1.989059499988798,147848,38420,complete,0,0,2.327190084994072,148396,38455,0,0,2,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0027,publisher_background,c14db513e3441dd72b8df5b9e76b8d7254b7adc7760a72704173facc3544bb52,0.0,0.0,0,0,complete,0,0,1.9274362649885006,148016,39727,complete,0,0,2.317157034005504,148148,37412,complete,0,0,2.409874128003139,148396,38456,0,0,0,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0033,publisher_aircraft,e7c233776a3450f3263e94508488fa906b33b3f23102369ff379e50ccda08c8f,18.5,16.0,75,91,complete,1,3,2.5086441439925693,152472,87392,complete,1,3,2.684853736020159,148876,77269,complete,1,4,3.1619311940157786,180296,93842,0,72,25,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0039,publisher_aircraft,dcd9bfe7c589c8a0db32e4a64ad107f0b9997e2866c533dfeb8b2c7872f136f5,0.0,0.0,0,0,complete,0,0,2.098994346015388,151892,41297,complete,0,0,2.1320237810141407,148380,39977,complete,0,0,2.674152769992361,179952,39950,0,15,16,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0028,publisher_background,2e0124e16e42b912fbc5b6002e51a140665d1e0992ab69528ae7c488b90ef96d,0.0,0.0,0,0,complete,0,0,1.7652616190025583,148196,39727,complete,0,0,1.9862223280069884,147892,38390,complete,0,0,2.0020367999968585,148592,38426,0,1,14,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0041,publisher_background,bf229eaa113bbe0af946807f76833a09418631ce536e57fc7406ec21c0cd59af,0.0,0.0,0,0,complete,0,0,2.3718954999931157,148440,39727,complete,0,0,1.7904353170015384,148188,38037,complete,0,0,1.8652574750012718,147840,38398,0,0,6,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0008,publisher_aircraft,ab1ffa3f91681ff523916be177d7d298b9e162b68acd4c3dce1014a58aa2be56,0.0,0.0,0,0,complete,0,0,2.0695975499984343,151900,41297,complete,0,0,2.5145924350072164,148848,39963,complete,0,0,2.9025165129860397,179848,40252,0,31,29,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0013,publisher_aircraft,26f4909391d8a9f1e960e0412685ae0d4e721a5532314e4cf036263e9938278a,0.0,0.0,0,0,complete,0,0,2.87893384299241,151844,41297,complete,0,0,2.1631068239803426,148504,39983,complete,0,0,2.9946761640021577,179744,40284,0,114,34,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0009,publisher_background,b5fd22f3a14fd129428b69af8ee5434df2254d226df31bbf337edf6191a856ff,0.0,0.0,0,0,complete,0,0,2.1696159309940413,148588,39727,complete,0,0,1.9850663139950484,147964,38440,complete,0,0,1.8668118939967826,148160,38103,0,0,9,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+case-0038,publisher_background,c34283d6630ab07270442b330d81fd39435245198ac6bc3a629ff2bd2ba84abc,0.0,0.0,0,0,complete,0,0,4.830031696998049,148136,39727,complete,0,0,2.079471492994344,148228,37767,complete,0,0,1.8814837470126804,148152,38413,0,1,2,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+dlr-seven-second,brief_publisher_flyover,469c4257f4d230ac02adbc435ebdeae457dfefe4ceae3275a733b0543d4d7ae1,0.0,0.0,0,0,complete,0,0,2.805658463999862,148272,39796,complete,0,0,1.6792490240186453,148040,38591,complete,0,0,2.4685120719950646,148380,38599,0,0,3,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-dkitchen,real_environment_DKITCHEN,94eda18f9461348d1d070ca69d001e7fa9e51604731509026b4905d2e321561d,0.0,0.0,0,0,complete,0,0,5.157553537021158,177052,42287,complete,0,0,5.929604419972748,149712,40823,complete,0,0,39.63911557602114,232872,41152,0,68,33,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-dliving,real_environment_DLIVING,9567ff039c040359534075d575b469b587b1e3858ef48a93acd3ecba95f57210,0.0,0.0,0,0,complete,0,0,7.171103331987979,176760,42287,complete,0,0,76.19766508199973,122872,51143,complete,1,2,88.28669504201389,250860,83401,0,21119,928,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-dwashing,real_environment_DWASHING,da02faca8c6523d24ee86aae6c6889c950bb34d559f1379cc87e7e3b75690f4d,0.0,0.0,0,0,complete,0,0,4.977530056989053,176932,42287,complete,0,0,7.230106609000359,146096,41152,complete,0,0,9.254512883984717,261460,41469,0,151,60,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-nfield,real_environment_NFIELD,41f810127d37749c1d5a7183890303519f2fca7c0d71760a4c34752d71daa561,0.0,17.5,0,0,complete,0,0,4.269022684980882,152120,42287,complete,1,1,6.232342977018561,145732,60535,complete,1,1,11.912306360987714,261504,61180,0,939,180,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-npark,real_environment_NPARK,ca69cfa179502c0d16b233dde3735f49392c72e2838934aa179143d61a3e8034,0.0,0.0,0,0,complete,0,0,4.169269789999817,176880,42287,complete,0,0,5.288477399997646,147712,41161,complete,0,0,9.87450307700783,262364,41192,0,73,60,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-nriver,real_environment_NRIVER,5ebb169c264b60337b0d8366aee9ad93adab3689049f236108282a652f40bd6d,0.0,0.0,0,0,complete,0,0,4.981865921989083,152292,42287,complete,0,0,12.09086399199441,147556,44263,complete,3,3,66.41788435098715,272552,69459,0,10449,479,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-ohallway,real_environment_OHALLWAY,bf0252101b88e3e9d1d16a93d8d266d053f202be6f25eb46c5949687ee855822,0.0,0.0,0,0,complete,0,0,4.696892902022228,176828,42287,complete,0,0,4.588471066992497,146932,41149,complete,0,0,9.882524288026616,255356,42267,0,56,49,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-omeeting,real_environment_OMEETING,f10223b276fdb1efe9fe9e1795a1fe15cde54d74ddbd9b69563fa3e322dfe630,0.0,0.0,0,0,complete,0,0,4.718293005018495,176964,42287,complete,0,0,3.3767179689893965,148348,41372,complete,0,0,18.50555793600506,273976,41159,0,234,100,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-ooffice,real_environment_OOFFICE,a831879b26e15732ed511a8d3bf72e23aa1689383aac6c5ba76bcaaa528bc2f2,0.0,0.0,0,0,complete,0,0,3.747444667998934,176992,42287,complete,0,0,3.1754816110187676,147228,40842,complete,0,0,10.16197171699605,249160,40873,0,33,41,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-pcafeter,real_environment_PCAFETER,854dd0e5ef334a66abdd02d6d2b3e9d01b685df033d0acd1cd06e471c062550b,0.0,0.0,0,0,complete,0,0,4.112711396999657,176912,42287,complete,0,0,3.816951020009583,147100,40824,complete,0,0,8.440259700000752,261168,40858,0,5,12,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-presto,real_environment_PRESTO,8a5aee26d9b73656ca4814fe83ee2982b4b327c0c92ebc647076005d60e02ab5,0.0,0.0,0,0,complete,0,0,4.411682196980109,177056,42287,complete,0,0,4.139970529999118,147688,40858,complete,0,0,7.17801298800623,261584,40855,0,62,32,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-pstation,real_environment_PSTATION,965f1a6b6ff7956d5d5bd687f493c7783bd2b452a38cc019817ca475eb609ac2,0.0,0.0,0,0,complete,0,0,4.12702194598387,177088,42287,complete,0,0,3.0859889129933435,146996,40836,complete,0,0,6.781718315993203,260792,40845,0,9,15,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-scafe,real_environment_SCAFE,b48a9bb1df36911454fc8b1e08716275ada694612491ce7357aabe30c3b2ab28,0.0,0.0,0,0,complete,0,0,4.556506230001105,176900,42287,complete,0,0,4.922780730004888,147696,41172,complete,0,0,8.95451905101072,261596,41465,0,195,75,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-spsquare,real_environment_SPSQUARE,f2ff54e482c642d3964a42139e9bbe73d7f5b20751d4974c4bcb024b8d0d25b6,0.0,0.0,0,0,complete,0,0,4.920760434994008,176892,42287,complete,0,0,3.760317127016606,147356,41137,complete,0,0,28.08485941501567,261080,42310,0,886,133,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-straffic,real_environment_STRAFFIC,8fa49dcf3996af655a3ecef8d06f0d9ef217c35410e3adce3d461da797987dbb,0.0,0.0,0,0,complete,0,0,4.473805243993411,152028,42287,complete,0,0,4.28764889400918,147296,42258,complete,0,0,11.707540227012942,246096,42634,0,941,185,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-tbus,real_environment_TBUS,d3a0412801945488cab88dc23125b1cccaf31f0579ce9037aad5cdcc667810b6,0.0,35.0,0,0,complete,0,0,5.099360621999949,152152,42287,complete,2,3,5.372592488012742,147840,79054,complete,4,5,13.700680559006287,261248,87954,0,980,195,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-tcar,real_environment_TCAR,ffe4cac12ed78705a52fce5d14f17a4ee838c6f5922446fc66258841323d4a59,13.0,74.5,22,26,complete,1,1,5.713036665983964,177448,56686,complete,4,6,5.972722599981353,147208,129731,complete,5,8,10.965970543009462,261352,143885,0,1168,225,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+demand-tmetro,real_environment_TMETRO,63af2dc9ca2d83a83d2fb4e89db41948cb58b91fdafeda7137a651643df78fc4,12.5,0.0,0,25,complete,1,1,5.2124151440220885,177420,59695,complete,0,0,59.2332194079936,146200,45894,complete,0,0,27.201990097993985,262160,46732,0,2464,307,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
+whole-reference,one_hour_original_upload_decode,262d9c4eba1c80657813c604140ba2afbbaabed2b3aebc833cba7cafdc005e9f,353.0,599.5,628,805,complete,16,18,39.99299624201376,176852,329005,complete,30,38,54.10559780697804,167056,539939,,,,,,,3,14526,2541,4c6fb9c0ca5f2529916f91b6920659b968d8eba9a37ff795a2df2333bf044aee,05548ed1cb0954db8fac960523e39300dc97308d
diff --git a/benchmarks/acoustic-episodes-349/family-episodes.png b/benchmarks/acoustic-episodes-349/family-episodes.png
new file mode 100644
index 0000000..56fcab1
Binary files /dev/null and b/benchmarks/acoustic-episodes-349/family-episodes.png differ
diff --git a/benchmarks/acoustic-episodes-349/manifest.json b/benchmarks/acoustic-episodes-349/manifest.json
new file mode 100644
index 0000000..1450af2
--- /dev/null
+++ b/benchmarks/acoustic-episodes-349/manifest.json
@@ -0,0 +1,356 @@
+{
+ "selection": "First two clips per publisher class/location in existing seed20261103 sample; DLR7s; all available DEMAND sessions channel1. Fixed before execution.",
+ "cases": [
+ {
+ "id": "case-0001",
+ "path": "data/acoustic-episodes/aerosonic/case-0001.wav",
+ "context": "publisher_aircraft",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "36164d8f88d3a67da0efb2a9a8934a27f7991e3d1eddebe1757fc8eee30b823f",
+ "source_filename": "7C293D_2023-04-22_10-14-18_0_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0002",
+ "path": "data/acoustic-episodes/aerosonic/case-0002.wav",
+ "context": "publisher_aircraft",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "9bc5b35b05803fa64626f16622eee5b7e3086d7226e5ec3515b6b2a1cb99cd38",
+ "source_filename": "7C779A_2022-12-08_09-11-44_0_0.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0018",
+ "path": "data/acoustic-episodes/aerosonic/case-0018.wav",
+ "context": "publisher_background",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "9f0b97cfce941111eb82e82d6ac361eeec80292d32212e3791d895d65b9dc265",
+ "source_filename": "000000_2022-12-11_10-37-10_0_0.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0027",
+ "path": "data/acoustic-episodes/aerosonic/case-0027.wav",
+ "context": "publisher_background",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "c14db513e3441dd72b8df5b9e76b8d7254b7adc7760a72704173facc3544bb52",
+ "source_filename": "000000_2023-05-23_10-36-37_0_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0033",
+ "path": "data/acoustic-episodes/aerosonic/case-0033.wav",
+ "context": "publisher_aircraft",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "e7c233776a3450f3263e94508488fa906b33b3f23102369ff379e50ccda08c8f",
+ "source_filename": "7C3A50_2023-03-01_14-10-05_1_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0039",
+ "path": "data/acoustic-episodes/aerosonic/case-0039.wav",
+ "context": "publisher_aircraft",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "dcd9bfe7c589c8a0db32e4a64ad107f0b9997e2866c533dfeb8b2c7872f136f5",
+ "source_filename": "7C6DBA_2023-03-01_14-13-40_1_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0028",
+ "path": "data/acoustic-episodes/aerosonic/case-0028.wav",
+ "context": "publisher_background",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "2e0124e16e42b912fbc5b6002e51a140665d1e0992ab69528ae7c488b90ef96d",
+ "source_filename": "000000_2023-03-01_13-37-07_1_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0041",
+ "path": "data/acoustic-episodes/aerosonic/case-0041.wav",
+ "context": "publisher_background",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "bf229eaa113bbe0af946807f76833a09418631ce536e57fc7406ec21c0cd59af",
+ "source_filename": "000000_2023-03-01_14-20-32_1_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0008",
+ "path": "data/acoustic-episodes/aerosonic/case-0008.wav",
+ "context": "publisher_aircraft",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "ab1ffa3f91681ff523916be177d7d298b9e162b68acd4c3dce1014a58aa2be56",
+ "source_filename": "7C6B40_2023-04-24_11-53-13_2_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0013",
+ "path": "data/acoustic-episodes/aerosonic/case-0013.wav",
+ "context": "publisher_aircraft",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "26f4909391d8a9f1e960e0412685ae0d4e721a5532314e4cf036263e9938278a",
+ "source_filename": "7C495B_2023-04-24_11-40-02_2_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0009",
+ "path": "data/acoustic-episodes/aerosonic/case-0009.wav",
+ "context": "publisher_background",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "b5fd22f3a14fd129428b69af8ee5434df2254d226df31bbf337edf6191a856ff",
+ "source_filename": "000000_2023-04-24_11-55-13_1_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "case-0038",
+ "path": "data/acoustic-episodes/aerosonic/case-0038.wav",
+ "context": "publisher_background",
+ "source": "https://zenodo.org/records/10215080",
+ "rights": "CC BY-NC 4.0",
+ "expectation": "Review measured coherent trajectories; publisher labels do not establish motion or aircraft absence. No minimum output count.",
+ "sha256": "c34283d6630ab07270442b330d81fd39435245198ac6bc3a629ff2bd2ba84abc",
+ "source_filename": "000000_2023-05-09_12-32-59_1_1.wav",
+ "processing": "Unmodified source WAV, opaque local case name"
+ },
+ {
+ "id": "dlr-seven-second",
+ "path": "data/acoustic-episodes/dlr/REC139-center-mic.wav",
+ "context": "brief_publisher_flyover",
+ "source": "https://zenodo.org/records/20494053",
+ "rights": "CC BY 4.0",
+ "expectation": "Duration alone must not exclude this real 7-second flyover; acceptance requires resolved motion and strong brief evidence. A miss remains a miss.",
+ "sha256": "469c4257f4d230ac02adbc435ebdeae457dfefe4ceae3275a733b0543d4d7ae1",
+ "processing": "Real REC139.h5 channel80, constant gain 0.3188036516506252, 48192 Hz float WAV; see benchmarks/dlr-record139-scanner-check-20261103.md"
+ },
+ {
+ "id": "demand-dkitchen",
+ "path": "data/acoustic-episodes/demand/DKITCHEN_ch01.wav",
+ "context": "real_environment_DKITCHEN",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "94eda18f9461348d1d070ca69d001e7fa9e51604731509026b4905d2e321561d",
+ "source_archive": "DKITCHEN_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-dliving",
+ "path": "data/acoustic-episodes/demand/DLIVING_ch01.wav",
+ "context": "real_environment_DLIVING",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "9567ff039c040359534075d575b469b587b1e3858ef48a93acd3ecba95f57210",
+ "source_archive": "DLIVING_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-dwashing",
+ "path": "data/acoustic-episodes/demand/DWASHING_ch01.wav",
+ "context": "real_environment_DWASHING",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "da02faca8c6523d24ee86aae6c6889c950bb34d559f1379cc87e7e3b75690f4d",
+ "source_archive": "DWASHING_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-nfield",
+ "path": "data/acoustic-episodes/demand/NFIELD_ch01.wav",
+ "context": "real_environment_NFIELD",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "41f810127d37749c1d5a7183890303519f2fca7c0d71760a4c34752d71daa561",
+ "source_archive": "NFIELD_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-npark",
+ "path": "data/acoustic-episodes/demand/NPARK_ch01.wav",
+ "context": "real_environment_NPARK",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "ca69cfa179502c0d16b233dde3735f49392c72e2838934aa179143d61a3e8034",
+ "source_archive": "NPARK_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-nriver",
+ "path": "data/acoustic-episodes/demand/NRIVER_ch01.wav",
+ "context": "real_environment_NRIVER",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "5ebb169c264b60337b0d8366aee9ad93adab3689049f236108282a652f40bd6d",
+ "source_archive": "NRIVER_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-ohallway",
+ "path": "data/acoustic-episodes/demand/OHALLWAY_ch01.wav",
+ "context": "real_environment_OHALLWAY",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "bf0252101b88e3e9d1d16a93d8d266d053f202be6f25eb46c5949687ee855822",
+ "source_archive": "OHALLWAY_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-omeeting",
+ "path": "data/acoustic-episodes/demand/OMEETING_ch01.wav",
+ "context": "real_environment_OMEETING",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "f10223b276fdb1efe9fe9e1795a1fe15cde54d74ddbd9b69563fa3e322dfe630",
+ "source_archive": "OMEETING_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-ooffice",
+ "path": "data/acoustic-episodes/demand/OOFFICE_ch01.wav",
+ "context": "real_environment_OOFFICE",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "a831879b26e15732ed511a8d3bf72e23aa1689383aac6c5ba76bcaaa528bc2f2",
+ "source_archive": "OOFFICE_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-pcafeter",
+ "path": "data/acoustic-episodes/demand/PCAFETER_ch01.wav",
+ "context": "real_environment_PCAFETER",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "854dd0e5ef334a66abdd02d6d2b3e9d01b685df033d0acd1cd06e471c062550b",
+ "source_archive": "PCAFETER_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-presto",
+ "path": "data/acoustic-episodes/demand/PRESTO_ch01.wav",
+ "context": "real_environment_PRESTO",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "8a5aee26d9b73656ca4814fe83ee2982b4b327c0c92ebc647076005d60e02ab5",
+ "source_archive": "PRESTO_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-pstation",
+ "path": "data/acoustic-episodes/demand/PSTATION_ch01.wav",
+ "context": "real_environment_PSTATION",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "965f1a6b6ff7956d5d5bd687f493c7783bd2b452a38cc019817ca475eb609ac2",
+ "source_archive": "PSTATION_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-scafe",
+ "path": "data/acoustic-episodes/demand/SCAFE_ch01.wav",
+ "context": "real_environment_SCAFE",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "b48a9bb1df36911454fc8b1e08716275ada694612491ce7357aabe30c3b2ab28",
+ "source_archive": "SCAFE_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-spsquare",
+ "path": "data/acoustic-episodes/demand/SPSQUARE_ch01.wav",
+ "context": "real_environment_SPSQUARE",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "f2ff54e482c642d3964a42139e9bbe73d7f5b20751d4974c4bcb024b8d0d25b6",
+ "source_archive": "SPSQUARE_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-straffic",
+ "path": "data/acoustic-episodes/demand/STRAFFIC_ch01.wav",
+ "context": "real_environment_STRAFFIC",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "8fa49dcf3996af655a3ecef8d06f0d9ef217c35410e3adce3d461da797987dbb",
+ "source_archive": "STRAFFIC_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-tbus",
+ "path": "data/acoustic-episodes/demand/TBUS_ch01.wav",
+ "context": "real_environment_TBUS",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "d3a0412801945488cab88dc23125b1cccaf31f0579ce9037aad5cdcc667810b6",
+ "source_archive": "TBUS_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-tcar",
+ "path": "data/acoustic-episodes/demand/TCAR_ch01.wav",
+ "context": "real_environment_TCAR",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "ffe4cac12ed78705a52fce5d14f17a4ee838c6f5922446fc66258841323d4a59",
+ "source_archive": "TCAR_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "demand-tmetro",
+ "path": "data/acoustic-episodes/demand/TMETRO_ch01.wav",
+ "context": "real_environment_TMETRO",
+ "source": "https://zenodo.org/records/1227121",
+ "rights": "CC BY-SA 3.0",
+ "expectation": "Environmental context control, no certified aircraft absence. Stationary or periodically modulated tones should reject; coherent moving machinery may remain an acoustic proposal. Full channel 1, unpadded.",
+ "sha256": "63af2dc9ca2d83a83d2fb4e89db41948cb58b91fdafeda7137a651643df78fc4",
+ "source_archive": "TMETRO_16k.zip",
+ "processing": "Original 16 kHz channel-1 WAV extracted without padding or editing; locally identified by SHA256, upstream archive checksum not rechecked in this task"
+ },
+ {
+ "id": "whole-reference",
+ "path": "data/source/reference-recording.wav",
+ "sha256": "262d9c4eba1c80657813c604140ba2afbbaabed2b3aebc833cba7cafdc005e9f",
+ "context": "one_hour_original_upload_decode",
+ "source": "https://www.youtube.com/watch?v=4CxVxuMVkMc",
+ "rights": "Publisher audio; redistribution permission unestablished; no audio committed",
+ "expectation": "Retain supported coherent trajectories without counting harmonics as separate events. Review every new/missed interval; no presumed aircraft count or localization truth.",
+ "processing": "Existing public-source WAV from data-source release bundle, no media redistribution in this PR"
+ }
+ ],
+ "provenance_notes": "AeroSonicDB: Downward and Nordby, CC BY-NC 4.0. DEMAND: Thiemann, Ito and Vincent, CC BY-SA 3.0. DLR: source creators credited in record and existing benchmark report. Media not committed; these hashes identify actual input files. Publisher/environment labels are context, not aircraft absence or motion truth."
+}
diff --git a/benchmarks/acoustic-episodes-349/observations.jsonl.gz b/benchmarks/acoustic-episodes-349/observations.jsonl.gz
new file mode 100644
index 0000000..6dc03dd
Binary files /dev/null and b/benchmarks/acoustic-episodes-349/observations.jsonl.gz differ
diff --git a/benchmarks/acoustic-episodes-349/vehicle-episodes.png b/benchmarks/acoustic-episodes-349/vehicle-episodes.png
new file mode 100644
index 0000000..7431701
Binary files /dev/null and b/benchmarks/acoustic-episodes-349/vehicle-episodes.png differ
diff --git a/docs/ACOUSTIC_EPISODES_REPORT.md b/docs/ACOUSTIC_EPISODES_REPORT.md
new file mode 100644
index 0000000..24cd238
--- /dev/null
+++ b/docs/ACOUSTIC_EPISODES_REPORT.md
@@ -0,0 +1,246 @@
+# Acoustic episodes: implementation and real-recording comparison (#349)
+
+This changes the acoustic proposal model, fragment ordering, elapsed-time checks
+and frequency-coverage contract. It does **not** demonstrate better aircraft
+recall, physical-source identification or localization. Some real baseline
+signals regress, and wider coverage returns additional confusing-source proposals.
+
+Starting `origin/main`: `451b67f01dcd1dfe44d47c42407f404706a5a9b7`.
+Worktree: `/home/cinna/dopplergeist-acoustic-episodes`, branch
+`feat/acoustic-episodes`. Current-main integration is pinned in benchmark commit
+`05548ed1cb0954db8fac960523e39300dc97308d`; detector code is frozen in a separate
+validation checkout. The subsequently merged optional coherent adapter retains
+its legacy helpers and passes its own recorded Michigan-trace tests. That
+adapter was not used to supplement or improve this comparison.
+
+## Engineering choices
+
+The canonical episode catalog references all measured children. Constant-scale
+fits replace a ratio-dictionary/base-ridge grouping decision. They require
+resolved shared motion and temporal support; noninteger relationships also need
+measured envelope agreement. Multi-component groups need multiple witnesses and
+one consistent scale model over every supported pair. This intentionally leaves
+some related fragments split when their relationship cannot be resolved without
+single-link chaining. An unresolved relation is not evidence of source independence.
+
+Provisional four-observation paths survive through chunk deduplication and
+continuation association before duration rejection. Observation cells, gaps,
+prediction residuals, uncertainty and episode support determine acceptance.
+Brief events have a stronger, separately exposed path. Linking and rejection use
+actual seconds in both directions, with a one-turn allowance rather than a
+compulsory descending template. Source motion remains unconfirmed.
+
+A bounded higher-rate single-spectrum path avoids band-duplicate accounting and
+selects decoding rate before discarding frequencies. Defaults stay 40–1600 Hz;
+20 Hz lower coverage and 6000 Hz upper coverage were exercised separately.
+Coverage, work limits, failures, input/code identities and runtime are explicit.
+Normal noise diagnostics aggregate counts and measured/threshold ranges. Group
+plots render once, and the matching adapter consumes fitted scales once per
+canonical episode, retaining the legacy path for old events. See
+[the full contract and thresholds](AUDIO_DISCOVERY.md).
+
+## Inputs, expectations and inspection
+
+The [32-input manifest](../benchmarks/acoustic-episodes-349/manifest.json) includes
+SHA-256, public source, rights, processing, context and predeclared expectations.
+No new media is committed. Unique source duration is approximately 157 minutes:
+
+- First two publisher-aircraft and first two publisher-background clips in each
+ location stratum of the existing seed-20261103 AeroSonicDB sample: six 60-second
+ aircraft-context clips and six 10-second background-context clips. Downward
+ and Nordby, [AeroSonicDB v1.1.2](https://zenodo.org/records/10215080), CC BY-NC 4.0.
+- The existing seven-second center-microphone DLR RECORD139 excerpt, with the
+ documented constant gain: [source and exact extraction](../benchmarks/dlr-record139-scanner-check-20261103.md),
+ [publisher record](https://zenodo.org/records/20494053), CC BY 4.0.
+- All 18 available full, unpadded, channel-1 DEMAND recordings, about 300 seconds
+ each, including home machinery, nature, public spaces and transport. Thiemann,
+ Ito and Vincent, [DEMAND](https://zenodo.org/records/1227121), CC BY-SA 3.0.
+ Existing extracted 16 kHz media were reused and individually identified by
+ checksum; upstream ZIP integrity was not rechecked during this task.
+- The existing hour-long public-reference WAV from the source release, identified
+ separately from its MP3 representation. Redistribution permission for the
+ original source is unestablished; only derived measurements are saved here.
+
+Every fixed case is retained, including zero and unfavorable results. No filename
+exceptions, flight data, coordinates or trajectory fits enter discovery. Context
+labels do not certify source identity or aircraft absence. The selection is a
+small development set, not a sealed holdout or a calibrated false-positive sample.
+
+Before judging final replays, spectra without proposal overlays were reviewed
+for the six aircraft-context clips. The clear family in case-0001, the descending
+family in case-0033, and the clearly rising structure at about 50–59 seconds in
+case-0013 are useful acoustic checks. Cases 0002, 0039 and 0008 have broadband
+masking or weak continuity; their ambiguity remains explicit. These visual
+judgments are qualitative, not exhaustive event annotations. They did not change
+the frozen expectations to match output counts. Detailed views of the reference
+proposals and transport/nature controls were also inspected. No audio playback
+or physical-source labeling was used.
+
+## Measured behavior
+
+All 32 default cases and all 31 wider-coverage cases completed. The hour-long
+input was not run at 6 kHz in the wider arm. The complete
+[case table](../benchmarks/acoustic-episodes-349/comparison.csv) and compressed
+[measured observations](../benchmarks/acoustic-episodes-349/observations.jsonl.gz)
+retain the negatives, child tracks, canonical memberships, diagnostics and code
+identities. Counts below are acoustic proposals.
+
+| Input/context | Old groups / children | New default episodes / children | Wider 40–6000 Hz |
+| --- | ---: | ---: | ---: |
+| Six aircraft-context clips | 2 / 6 | 2 / 9 | 3 / 12 |
+| Six background-context clips | 0 / 0 | 0 / 0 | 0 / 0 |
+| DLR seven-second flyover | 0 / 0 | 0 / 0 | 0 / 0 |
+| Eighteen DEMAND contexts | 2 / 2 | 7 / 10 | 14 / 19 |
+| Hour-long reference | 16 / 18 | 30 / 38 | Not run |
+
+The wider arm still proposes in the **same two of six** aircraft-context clips;
+its third proposal is additional multiplicity in case-0001, not recovery of a
+third clip. The old 12-second gate made its background zeros inevitable on
+10-second clips. The new brief path is duration-eligible there, but six zero
+results still do not estimate a population false-alarm rate.
+
+Case-0001 has six measured children in one episode, versus three in the old
+output. The bounded family model reports orders `[4,3,2,5,6,5]`, compatible with
+an unobserved fundamental; no fundamental ridge is invented. Fourteen supported
+pair comparisons agree with the joint scale model, worst residual 0.541 of its
+limit, and minimum two resolved-motion witnesses. Observed support extends from
+36.5 to 50.0 seconds. This is useful component consolidation, not proof of one
+physical source. Missing/fragmented order-5 observations remain separate measured
+children in that episode.
+
+![One canonical family with six measured children](../benchmarks/acoustic-episodes-349/family-episodes.png)
+
+The reference has three brief-path proposals: 900–909 s, 2149–2154.5 s and
+2163–2169 s. The latter two lack ten total samples and are marked acoustic-review
+only. Gaps are preserved. DEMAND car/bus contexts contain retained rising and
+turning tonal trajectories; their engine/environment context illustrates why
+motion acceptance cannot be called aircraft detection. Near-unison reference
+trajectories remain separate when they do not satisfy the common-motion model.
+
+![Separate source-ambiguous vehicle-context trajectories](../benchmarks/acoustic-episodes-349/vehicle-episodes.png)
+
+Regressions are material:
+
+- Default proposal-positive aircraft clips remain 2/6. The visibly rising
+ case-0013 remains missed, including a separate 0.5-second-window / 0.125-second-hop,
+ 20–6000 Hz replay. DLR's seven-second excerpt is also still missed. Supporting
+ brief events does not guarantee recovery of fast, broadband or weak passages.
+- In the reference, only 628/805 old measured points (78.0%) have a coincident
+ new observation within `max(1 Hz, 0.006*f)`. This overlap measure uses actual
+ timestamps and is **not recall**. Six old groups have no such retained points:
+ 293.5–308.5, 314–333.5, 676–690, 1265.5–1282, 3101–3119 and 3454–3469.5 seconds.
+ The 1265.5–1282-second ridge is the documented faint-passage regression.
+- The old reference groups around 2100–2178.5 and 3060.5–3121 seconds each map
+ onto two new groups. Thus partial-family reconciliation remains conservative,
+ and the new representation does not solve all fragmentation. Unresolved
+ associations and source multiplicity must not be counted as certified
+ independent sources.
+- The union of reference observed time across all accepted tracks grows from 353.0 to 599.5 seconds, but additional
+ accepted tones are unverified. DEMAND gains nature, bus and car proposals and
+ loses its old metro proposal. These are confusing-source positives and a lost
+ baseline control, not aircraft successes. Wider coverage adds living-room and
+ river-context proposals too.
+
+No obviously incompatible trajectory was found within the reviewed case-0001
+family, but the data provide no certified simultaneous-source truth. An accidental
+physical-source merging rate cannot be estimated here. Mathematical controls
+exercise different simultaneous evolution, near-unison retention, failed weak
+bridges and later multi-witness reconciliation. They do not establish aircraft
+identification or empirical merge accuracy.
+
+## Coverage, boundaries and operational cost
+
+With identical 40–1600 Hz analysis, case-0001 decoded at 4 and 16 kHz retains one
+episode and six children. Across 275 coincident measurements, the 90th-percentile
+frequency difference is 4.42e-7 Hz (well below resolution). Its 40/20-second
+chunk/overlap replay retains one episode but five children; changing the lower
+limit to 20 Hz also retains one episode/five children. Chunk whitening and band
+normalization can change marginal components. IDs are stable for fixed measured
+content, not promised invariant across different configurations. The high-rate
+path has no band seam; overlapping chunk observations have raw provenance and
+one canonical catalog. Frequency requests above available decoding/source
+coverage, too narrow to form a peak, or on an unsupported sample/hop grid fail
+explicitly. Under-window real excerpts are valid zero-observation results;
+corrupt media and execution/budget failures are separate failures.
+
+| Replay | Sum wall time (s) | Peak RSS (MiB) | Total discovery output (KiB) |
+| --- | ---: | ---: | ---: |
+| 31 inputs, old 40–1600 Hz | 120.58 | 173.3 | 1400.0 |
+| 31 inputs, new 40–1600 Hz | 247.29 | 146.2 | 1503.9 |
+| 31 inputs, new 40–6000 Hz | 421.57 | 267.6 | 1618.1 |
+| Hour, old 40–1600 Hz | 39.99 | 172.7 | 321.3 |
+| Hour, new 40–1600 Hz | 54.11 | 163.1 | 527.3 |
+
+Times include intake, hashing, discovery and one summary plot, in separate case
+processes on a contended host. These are single-arm operational observations,
+not causal speedups. The default living-room case is a notable runtime regression
+because retained noise fragments require reconciliation. The reference retained
+2,541 provisional paths / 22,966 observations and used about 14.5k association
+work units, below configured budgets. Normal output has no file per rejected
+fragment. The 6 kHz arm demonstrates the additional FFT/candidate cost; it is not
+the default or a calibrated better detector.
+
+## Reproduction and checks
+
+Restore the real media to the manifest paths and verify the supplied hashes.
+The original reference WAV can be restored from the repository's source-only
+release asset as described in [artifacts](ARTIFACTS.md); no ADS-B archive is
+needed. AeroSonicDB filenames, DEMAND archive names and the DLR transformation are
+in the manifest. Then use a fresh directory for each actual run:
+
+```bash
+git worktree add --detach /tmp/dg-old 451b67f01dcd1dfe44d47c42407f404706a5a9b7
+git worktree add --detach /tmp/dg-new 05548ed1cb0954db8fac960523e39300dc97308d
+
+.venv/bin/python scripts/validate_acoustic_episodes.py \
+ --manifest benchmarks/acoustic-episodes-349/manifest.json \
+ --source-root /tmp/dg-old --output results/episodes-old
+.venv/bin/python scripts/validate_acoustic_episodes.py \
+ --manifest benchmarks/acoustic-episodes-349/manifest.json \
+ --source-root /tmp/dg-new --output results/episodes-new
+
+# Same 31 inputs for the wide arm; the full hour was predeclared outside this arm.
+python - <<'PY'
+import json
+from pathlib import Path
+m=json.loads(Path('benchmarks/acoustic-episodes-349/manifest.json').read_text())
+m['cases']=[c for c in m['cases'] if c['id']!='whole-reference']
+Path('/tmp/episodes-wide-inputs.json').write_text(json.dumps(m))
+PY
+.venv/bin/python scripts/validate_acoustic_episodes.py \
+ --manifest /tmp/episodes-wide-inputs.json --max-frequency-hz 6000 \
+ --source-root /tmp/dg-new --output results/episodes-wide
+.venv/bin/python scripts/summarize_acoustic_episodes.py \
+ --manifest benchmarks/acoustic-episodes-349/manifest.json \
+ --baseline results/episodes-old --new results/episodes-new \
+ --wide results/episodes-wide --output results/episodes-comparison
+
+PYTHONPATH=src .venv/bin/python -m pytest -q tests/test_episodes.py \
+ tests/test_real_discovery_normalization.py tests/test_real_upload_verification.py \
+ tests/test_contracts.py tests/test_job_resume.py tests/test_real_coherent_discovery.py \
+ tests/test_real_episode_artifact.py
+```
+
+After the frozen comparison, a reporting-only patch replaced the combined
+episode-rejection reason with explicit failed gates on both acceptance paths.
+The final matching adapter consumes the joint scale model without reimposing a
+single-base overlap requirement. All 63 new/default-wide observed outputs adapt
+successfully (50 matchable canonical episodes), with no trajectory fitting.
+A current-code real replay matched the frozen rich-family clip's complete
+`events` and `episodes` exactly and exposed the new rejection ranges.
+
+69 focused checks passed after integrating current main. They cover grouping
+order/determinism, witness reconciliation, unsupported bridges, gap accounting,
+symmetric motion/turns, modulation/stationary/tone-switch rejection properties,
+explicit budget/coverage/execution errors, real measured-child consumer
+compatibility, legacy coherent-adapter compatibility, and checkpoint behavior.
+No synthetic audio suite was run. Compilation, CLI help, benchmark-instrumentation
+checks and an installed wheel's episode module, coherent adapter, high-rate
+configuration and web assets passed. All signal-level runs used the genuine
+recordings above; coordinate-array tests are mathematical software checks only.
+
+The remaining limits are measured recall losses, ambiguous source multiplicity,
+fragment splits, uncertain peak/contrast models, and uncalibrated confidence and
+confusing-source rates. A future detector change needs separate real controls;
+this evidence does not establish flight identity, localization accuracy or a
+nationwide end-to-end result.
diff --git a/docs/AUDIO_DISCOVERY.md b/docs/AUDIO_DISCOVERY.md
index 078edd3..3b9c741 100644
--- a/docs/AUDIO_DISCOVERY.md
+++ b/docs/AUDIO_DISCOVERY.md
@@ -7,6 +7,9 @@ motion does not establish a single physical source, physical source motion, or
aircraft identity. Simultaneous trajectories can remain separate, and physical
source multiplicity is explicitly unresolved, including within an episode.
+The scanner summary is also schema 2: `events_found` and `canonical_proposals`
+count episodes, while `measured_child_tracks` counts child records.
+
The Python API still returns `list[DetectedEvent]`: one record per measured child
track, with the canonical episode ID in `harmonic_group_id`. Count distinct group
IDs to count proposals. `discovery.json` is now **schema_version 2** and is the
@@ -112,7 +115,7 @@ records measured RSS, time and output volume, including regressions.
| `status`, `failure` | `complete` with zero proposals is a valid in-band result; `failed` is an execution, coverage or budget failure |
| `source_sha256`, `code`, `settings`, `runtime_s`, `coverage` | Input identity, git/implementation identity, library versions, effective configuration and runtime |
| `events` | Compatible measured DetectedEvent children; ridge points are stored once here |
-| `episodes` | Canonical IDs, child IDs, raw track/chunk membership, fitted frequency scales, integer orders, observed intervals/gaps, confidence category and limitations |
+| `episodes` | Canonical IDs, child IDs, raw track/chunk membership, fitted frequency scales, joint-fit residual/witness diagnostics, integer orders, observed intervals/gaps, confidence category and limitations |
| `counts` | Separate raw per-chunk paths/observations, provisional/deduplicated/stitched candidates, accepted children and canonical proposals |
| `ridge_count` | Accepted measured child count, retained for older count consumers |
| `rejections` | Counts and measured/threshold ranges per rejection reason; optional bounded candidate traces |
@@ -166,7 +169,8 @@ PYTHONPATH=src .venv/bin/python -m pytest -q tests/test_episodes.py \
Summary plots use canonical episodes. Optional detail plots render one bounded
spectrogram per episode, with all its child tracks, once. They do not render the
-same group repeatedly for each harmonic. Normal operation records aggregated
+same group repeatedly for each harmonic. A candidate may fail multiple checks, including both acceptance paths; failed-check
+counts are not rejected-candidate counts. Normal operation records aggregated
noise rejection rather than writing a file per rejected fragment. Input/decoder
failures exit unsuccessfully; discovery failures additionally write a failed
artifact. No command above acquires flight data or estimates a location.
diff --git a/scripts/discover_audio.py b/scripts/discover_audio.py
index c3eab4b..1656648 100644
--- a/scripts/discover_audio.py
+++ b/scripts/discover_audio.py
@@ -45,9 +45,9 @@ def main():
for path in sources:
code_hash.update(path.name.encode())
code_hash.update(path.read_bytes())
- result = {"recording": recording.metadata, "time_status": recording.time_status,
+ result = {"schema_version": 2, "recording": recording.metadata, "time_status": recording.time_status,
"settings": asdict(settings), "events_found": len({e["harmonic_group_id"] for e in events}),
- "measured_child_tracks": len(events),
+ "canonical_proposals": len({e["harmonic_group_id"] for e in events}), "measured_child_tracks": len(events),
"events": [{k: event[k] for k in ("event_id", "start_s", "end_s", "band_hz", "quality")} for event in events],
"runtime_s": time.monotonic() - began, "peak_rss_kib": process_peak_rss_kib(),
"code_sha256": code_hash.hexdigest(),
diff --git a/scripts/summarize_acoustic_episodes.py b/scripts/summarize_acoustic_episodes.py
new file mode 100644
index 0000000..a075708
--- /dev/null
+++ b/scripts/summarize_acoustic_episodes.py
@@ -0,0 +1,81 @@
+"""Summarize saved real-media replays; never run a detector or read flight truth."""
+import argparse
+from collections import defaultdict
+import csv
+import gzip
+import json
+from pathlib import Path
+
+
+def observed_seconds(data):
+ hop=data.get('settings',{}).get('hop_s',.5)
+ cells=sorted((p['time_s']-hop/2,p['time_s']+hop/2) for e in data['events'] for p in e['ridge'])
+ total=0.; end=0.
+ for a,b in cells:
+ a=max(0.,a)
+ total+=max(0.,b-max(end,a)); end=max(end,b)
+ return total
+
+
+def retained_points(old,new):
+ by_time=defaultdict(list)
+ for event in new['events']:
+ for point in event['ridge']:
+ by_time[round(point['time_s'],6)].append(point['frequency_hz'])
+ retained=total=0
+ for event in old['events']:
+ for point in event['ridge']:
+ total+=1
+ f=point['frequency_hz']
+ retained+=any(abs(g-f)<=max(1.,.006*f) for g in by_time.get(round(point['time_s'],6),[]))
+ return retained,total
+
+
+def load(root,case):
+ path=root/case/'discovery/discovery.json'
+ return json.loads(path.read_text()) if path.exists() else None
+
+
+def outcomes(root):
+ return {r['case_id']:r for r in (json.loads(line) for line in (root/'results.jsonl').read_text().splitlines())}
+
+
+def main():
+ p=argparse.ArgumentParser(description=__doc__)
+ p.add_argument('--manifest',type=Path,required=True)
+ p.add_argument('--baseline',type=Path,required=True)
+ p.add_argument('--new',type=Path,required=True)
+ p.add_argument('--wide',type=Path,required=True)
+ p.add_argument('--output',type=Path,required=True)
+ a=p.parse_args()
+ a.output.mkdir(parents=True,exist_ok=False)
+ cases=json.loads(a.manifest.read_text())['cases']
+ runs={name:outcomes(root) for name,root in [('baseline',a.baseline),('new',a.new),('wide',a.wide)]}
+ rows=[]
+ with gzip.open(a.output/'observations.jsonl.gz','wt',encoding='utf8') as stream:
+ for case in cases:
+ cid=case['id']
+ data={name:load(root,cid) for name,root in [('baseline',a.baseline),('new',a.new),('wide',a.wide)]}
+ old,new=data['baseline'],data['new']
+ kept,total=retained_points(old,new)
+ row=dict(case_id=cid,context=case['context'],source_sha256=case['sha256'],
+ baseline_observed_seconds=round(observed_seconds(old),3),new_observed_seconds=round(observed_seconds(new),3),
+ baseline_points_retained=kept,baseline_points_total=total)
+ for name in runs:
+ result=runs[name].get(cid,{})
+ for key in ['status','proposals','child_tracks','runtime_s','peak_rss_kib','output_bytes']:
+ row[name+'_'+key]=result.get(key)
+ row['new_brief_proposals']=sum(e['acceptance_path']=='brief_strong_evidence' for e in new.get('episodes',[]))
+ row['new_association_work']=new.get('association_pairs')
+ row['new_retained_candidates']=new.get('counts',{}).get('provisional_paths')
+ row['new_implementation_sha256']=new.get('code',{}).get('implementation_sha256')
+ row['new_git_commit']=new.get('code',{}).get('git_commit')
+ rows.append(row)
+ stream.write(json.dumps(dict(case_id=cid,**data),separators=(',',':'),allow_nan=False)+'\n')
+ with (a.output/'comparison.csv').open('w',newline='') as stream:
+ writer=csv.DictWriter(stream,fieldnames=list(rows[0]));writer.writeheader();writer.writerows(rows)
+ print(json.dumps(dict(cases=len(rows),output=str(a.output))))
+
+
+if __name__=='__main__':
+ main()
diff --git a/src/dopplergeist/discovery.py b/src/dopplergeist/discovery.py
index 5c94431..ed04901 100644
--- a/src/dopplergeist/discovery.py
+++ b/src/dopplergeist/discovery.py
@@ -18,7 +18,7 @@ from scipy import optimize, signal
from .audio import Spectrum
from .contracts import validate_event
-from .episodes import (Associations, DiscoveryError, Ridge, aligned, deduplicate,
+from .episodes import (Associations, DiscoveryError, Ridge, deduplicate,
identifier, intervals, motion, reconcile, stitch)
_HARMONIC_RATIOS = sorted({a / b for a in range(2, 9) for b in range(1, a) if a / b >= 1.2})
@@ -379,10 +379,22 @@ def _discover(recording, settings, report, detailed):
m["frequency_excursion_hz"] >= 6 * m["frequency_uncertainty_hz"] and
m["moving_fraction"] >= .6 and m["prediction_error_q95"] <= .75 for m in metrics))
if not long and not brief:
- reject([dict(reason="episode_support_or_brief_evidence", measured=observed,
- threshold=settings.min_duration_s, comparison=">= long observed seconds; or strict brief gate")],
- dict(observed_duration_s=observed, support_fraction=support, brief_min_observed_s=settings.brief_min_observed_s,
- brief_min_support=.85, brief_min_contrast=settings.brief_min_contrast, child_metrics=metrics),
+ # Report each failed gate on both alternative paths. A single
+ # duration number would obscure support/contrast failures.
+ best = max(metrics, key=lambda m: min(m["median_contrast"] / settings.brief_min_contrast,
+ m["frequency_excursion_hz"] / (6 * m["frequency_uncertainty_hz"]),
+ m["moving_fraction"] / .6, .75 / max(m["prediction_error_q95"], 1e-9)))
+ gates = [("sustained_observed_duration_s", observed, settings.min_duration_s, ">="),
+ ("sustained_support_fraction", support, settings.min_support, ">="),
+ ("brief_observed_duration_s", observed, settings.brief_min_observed_s, ">="),
+ ("brief_support_fraction", support, .85, ">="),
+ ("brief_contrast", best["median_contrast"], settings.brief_min_contrast, ">="),
+ ("brief_excursion_sigma", best["frequency_excursion_hz"] / best["frequency_uncertainty_hz"], 6., ">="),
+ ("brief_moving_fraction", best["moving_fraction"], .6, ">="),
+ ("brief_prediction_error_q95", best["prediction_error_q95"], .75, "<=")]
+ reject([dict(reason=name, measured=float(value), threshold=float(limit), comparison=op)
+ for name,value,limit,op in gates if (value < limit if op == ">=" else value > limit)],
+ dict(observed_duration_s=observed, support_fraction=support, child_metrics=metrics),
tuple(x for r in members for x in r.origins))
continue
matching_eligible = sum(len(r.points) for r in members) >= 10
diff --git a/src/dopplergeist/matching.py b/src/dopplergeist/matching.py
index df8eea5..d64eeff 100644
--- a/src/dopplergeist/matching.py
+++ b/src/dopplergeist/matching.py
@@ -488,15 +488,9 @@ def prepare_events(detected_events, c=343.0, max_distance_m=20000.0):
if not np.isfinite(modern_scale) or not np.isfinite(reference_scale) or min(modern_scale, reference_scale) <= 0:
raise ValueError("Episode frequency scales must be finite and positive")
harmonic = modern_scale / reference_scale
- if member is not reference:
- base = np.column_stack((reference_time, reference_frequency, np.ones(len(reference_time))))
- other = np.column_stack((t, f, w))
- # Recheck supported scale without requiring the legacy ratio
- # dictionary or unavailable spectral envelope in this adapter.
- shared = _overlap(base, other)
- sigma = _frequency_scale(member) + harmonic * _frequency_scale(reference)
- if shared is not None and np.quantile(np.abs(shared[2] - harmonic * shared[1]), .9) > 2 * sigma:
- raise ValueError("Episode members disagree with their measured frequency scales")
+ # Discovery established the joint scale model. Requiring every
+ # child to re-match one base would discard partial support that
+ # was reconciled through other measured members.
elif member is not reference:
base = np.column_stack((reference_time, reference_frequency))
shared = _overlap(base, np.column_stack((t, f)))
diff --git a/tests/test_episodes.py b/tests/test_episodes.py
index aed15f5..31507b2 100644
--- a/tests/test_episodes.py
+++ b/tests/test_episodes.py
@@ -39,7 +39,7 @@ def test_cells_count_observations_without_spanning_missing_time():
assert sum(b-a for a,b in cells)==2.25
-def test_deterministic_complete_link_grouping_and_noninteger_scales():
+def test_deterministic_joint_grouping_and_noninteger_scales():
paths=[track(coordinates(scale=scale),str(i)) for i,scale in enumerate([1,2,3.14159])]
s=DiscoverySettings()
identities=[]
diff --git a/tests/test_real_episode_artifact.py b/tests/test_real_episode_artifact.py
new file mode 100644
index 0000000..8963788
--- /dev/null
+++ b/tests/test_real_episode_artifact.py
@@ -0,0 +1,83 @@
+"""Contract checks on complete observed real-media runs, without audio generation."""
+import gzip
+import json
+from pathlib import Path
+
+import pytest
+
+from dopplergeist.contracts import validate_event
+
+ROOT=Path(__file__).parents[1]/'benchmarks/acoustic-episodes-349'
+
+
[email protected](scope='module')
+def observations():
+ manifest=json.loads((ROOT/'manifest.json').read_text())
+ with gzip.open(ROOT/'observations.jsonl.gz','rt') as stream:
+ rows=[json.loads(line) for line in stream]
+ assert {r['case_id'] for r in rows}=={c['id'] for c in manifest['cases']}
+ return manifest,rows
+
+
+def test_complete_real_case_selection_and_input_identity(observations):
+ manifest,rows=observations
+ assert len(rows)==32
+ lookup={c['id']:c for c in manifest['cases']}
+ for row in rows:
+ for name in ['baseline','new','wide']:
+ data=row[name]
+ if data is None:
+ assert name=='wide' and row['case_id']=='whole-reference'
+ continue
+ assert data['source_sha256']==lookup[row['case_id']]['sha256']
+ assert data.get('status','complete')=='complete'
+ assert len({r['new']['code']['implementation_sha256'] for r in rows})==1
+
+
+def test_canonical_membership_preserves_all_measured_children(observations):
+ for row in observations[1]:
+ for data in [row['new'],row['wide']]:
+ if data is None:
+ continue
+ events={e['event_id']:validate_event(e) for e in data['events']}
+ assert len(events)==data['counts']['measured_child_tracks']==data['ridge_count']
+ assert len(data['episodes'])==data['counts']['canonical_proposals']
+ members=[]
+ for episode in data['episodes']:
+ assert episode['physical_motion_confirmed'] is False
+ assert episode['physical_source_multiplicity']=='unresolved'
+ assert {c['ridge_id'] for c in episode['children']}==set(episode['child_ridge_ids'])
+ for child in episode['children']:
+ event=events[child['ridge_id']]
+ assert event['harmonic_group_id']==episode['proposal_id']
+ assert child['frequency_scale']>0 and child['raw_track_ids']
+ assert len(child['amplitude_db'])==len(event['ridge'])
+ members.append(child['ridge_id'])
+ if sum(len(events[c]['ridge']) for c in episode['child_ridge_ids'])<10:
+ assert not episode['matching_eligible']
+ assert len(members)==len(set(members))==len(events)
+ assert set(members)==set(events)
+
+
+def test_observed_gaps_and_resource_limits_are_explicit(observations):
+ for row in observations[1]:
+ for data in [row['new'],row['wide']]:
+ if data is None:
+ continue
+ settings=data['settings'];counts=data['counts']
+ assert counts['provisional_paths']<=settings['max_candidates']
+ assert counts['provisional_observations']<=settings['max_measurements']
+ assert data['association_pairs']<=settings['max_associations']
+ assert len(data['reconciliation_decisions'])<=settings['max_diagnostic_traces']
+ assert data['rejections']['traces']==[]
+ events={e['event_id']:e for e in data['events']}
+ for episode in data['episodes']:
+ cells=episode['observed_intervals_s']
+ assert sum(b-a for a,b in cells)==pytest.approx(episode['observed_duration_s'])
+ assert episode['gaps_s']==[[a[1],b[0]] for a,b in zip(cells,cells[1:])]
+ assert len(episode['children'])<=settings['max_episode_components']
+ for child in episode['children']:
+ for point in events[child['ridge_id']]['ridge']:
+ assert not any(a<point['time_s']<b for a,b in episode['gaps_s'])
+ assert data['coverage']['analyzed_hz'][1]<=data['coverage']['usable_upper_hz']
+ assert not data['coverage']['exhaustive_outside_analyzed_range']