Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)
Python acoustic-geolocationads-baircraft-trackingairplaneaudio-forensicsdoppler-effectdoppler-shiftgeolocationosintsignal-processing
Preserve real configured rankings across unsupported trajectories and merge current fit caching
Cinna Davis9b4a0a11961a
diff --cc docs/HANDOFF.mdindex b9c0d09,b9c0d09..1d3773f--- a/docs/HANDOFF.md+++ b/docs/HANDOFF.md@@@ -41,7 -41,7 +41,6 @@@ Install as in the README and restore reThe real regional replay requires source, ADS-B-derived and terrain bundles:```bash--.venv/bin/python -m pytest -q.venv/bin/dopplergeist run data/source/reproduce-local.json --output results/replay-reference.venv/bin/dopplergeist run data/source/reproduce-faint-alltypes-local.json --output results/replay-faint.venv/bin/python scripts/benchmark_real_features.py@@@ -72,9 -72,9 +71,10 @@@ files are sufficient. The original sour- `search.cpa_table_dense` is a retained test oracle. The production sparse CPApath must retain multiple local approaches and match the reference on small cases.- Event clocks remain locked together. Independent shifts can manufacture a match.--- The configured research pipeline raises on an empty candidate set. This legacy-- behavior does not establish the outcome of the separate automatic job workflow;-- inspect that workflow's actual result and decision artifacts.++- The configured research pipeline preserves supported rankings across typed++ acoustic-support failures and reports excluded work. An empty candidate set++ produces a report without a best hypothesis. This research report does not++ establish an accepted automatic location; inspect its explicit coverage limits.- The 40-passage dataset supplies helpful frequency annotations but lacks theexplicit recorder-coordinate/audio-clock evidence needed here for location tests.diff --cc docs/MODEL_SUPPORT_COVERAGE.mdindex a038cdf,473a5ed..01800e9--- a/docs/MODEL_SUPPORT_COVERAGE.md+++ b/docs/MODEL_SUPPORT_COVERAGE.md@@@ -69,3 -51,3 +69,28 @@@ The mixed-source regression preserves tretains the original malformed source, and reports partial model coverage. Thisverified connection does not repair source observations or establish real-dataacceptance; W3 documents the numerical support assumptions in MOTION_SUPPORT.md.++++## Configured research runs++++The configured `dopplergeist run` path also isolates `AcousticSupportError` at the++track and candidate boundaries. A failed CPA track leaves its whole source time++span and receiver stage unassessed. Other tracks retain their original CPA rows.++A typed scoring failure leaves that candidate's full proposed clock domain++unassessed. Generic programming and configuration errors still propagate.++++`support/` retains the excluded track IDs, reported physical intervals, receiver++envelopes, candidate associations, clock domains, and available trial assessments.++`model-support.json` summarizes those stages. Counts include repeated evaluations++of the same track or candidate at different resolutions. Missing trial records++remain unreported work. They do not become zero unknown trials.++++Legacy brightness and ridge scoring do not supply complete clock-trial records.++Their finite scores remain ranked hypotheses with `core_assessment_complete: false`.++Unsupported or unclassified work makes `model_support_complete` and++`model_assessment_complete` false. Original input provenance remains in the report.++The isolation does not repair velocities, observations, or physical model support.++++The configured report declares `result_scope: configured_research_ranking` and++`accepted_location: false`. Empty ranking results retain `best: null` and the++support diagnostics. This path does not certify source coverage, eliminate missing++competitors, or make an automatic localization decision.diff --cc docs/PRODUCT.mdindex 83f41da,dcdb09f..c687560--- a/docs/PRODUCT.md+++ b/docs/PRODUCT.md@@@ -125,30 -118,16 +125,33 @@@ the operator configuration hash is retanot an upload-request field. A chunk-size comparison must rerun detection and thepipeline; it cannot reuse final candidates as if discovery had run again.-Search reports with `model_support_complete` also supply explicit `model_support`-work counters. Unsupported CPA trajectories, unclassified score candidates or-unknown clock trials keep product search coverage incomplete. Unreported trial-envelopes are counted explicitly; zero reported unknown trials cannot establish-completion when some trial accounting is absent. Missing/malformed-counters cannot become zero work. Source spatial/time availability remains a-separate `data_status`; an available archive can still have unassessed trajectory-models. Coverage limitations expose the work counts, and per-stage support-artifacts retain affected IDs/reasons and conservative lost-coverage envelopes.-These counts describe work evaluations, not distinct aircraft.+Search reports distinguish raw model support from finite assessment. If any+trajectory or scoring envelope lacks support, `model_support_complete` stays false.+`model_support` retains the raw work counts, unknown trials, and reasons. Missing+or malformed counters cannot become zero work. These counts describe work+evaluations, not distinct aircraft.++Unreported trial envelopes are explicit: zero reported unknown trials cannot++establish completion when any trial accounting is absent, including the legacy++fully supported path.++If every unknown finite scoring envelope has a validated ceiling or rejection,+`model_assessment_complete` can be true. An unavailable event fit contributes at+most one unit to the normalized support score. A fully validated event that+exceeds its residual limit rejects that association at that clock. The producer+retains the greatest ceiling across all scheduled clock trials in the retention+ledger. This accounting does not create a measured fit or restore missing support.++The product requires agreement between raw counters, persisted bounds, completion+flags, and finite discard accounting. The confidence decision compares the combined+discard bound with the leading score under the existing margin. Unsupported CPA+trajectories, unreported trials, and unbounded alternatives keep assessment+incomplete. Missing tiles, data gaps, event caps, and incomplete sensitivity+evidence still prevent a supported location.++Source availability remains a separate `data_status`. An available archive can+still have unassessed trajectory models. Per-stage artifacts retain affected IDs,+reasons, and conservative coverage envelopes. See+[model-support coverage](MODEL_SUPPORT_COVERAGE.md) for the complete contract.The automatic path always uses one shared clock inside the supplied start windowand robust ridge loss. Its default association path considers every proposeddiff --cc docs/verification/WORKER_E2E_2026-11-03.mdindex e43ff20,0000000..073c01fmode 100644,000000..100644--- a/docs/verification/WORKER_E2E_2026-11-03.md+++ b/docs/verification/WORKER_E2E_2026-11-03.md@@@ -1,208 -1,0 +1,285 @@@+# Worker verification results — 2026-11-03 UTC++**Experimental software. The complete real-recording localization goal remains open.**++The real HTTP run verified upload, intake, automatic discovery, persistence and shutdown.+It returned `needs_input / recording_time_required`, with no location result.- The NASA real-recording localization experiment remains in progress.++The configured real regional pipeline now completes and reproduces its historical ranking.++The first two independently timed NASA recordings produced no qualifying events.++Two further recordings were selected from the flight log before acoustic inspection.+This record does not close [#13](https://github.com/1337isnot1337/DOPPLERGEIST/issues/13)+or [#53](https://github.com/1337isnot1337/DOPPLERGEIST/issues/53).++The [owner directive](https://github.com/1337isnot1337/DOPPLERGEIST/issues/1#issuecomment-6595095639)+stopped new synthetic experiments.+All completed synthetic runs in this record preceded that directive.- This documentation change ran no experiment or test.++The real experiments below preserve each outcome and its limits.++## Repository checkout++The primary imported the complete Git history from+[run 41577235564](https://github.com/1337isnot1337/DOPPLERGEIST/actions/runs/41577235564),+artifact `13204415457`.+The downloaded archive SHA-256 was `cd0267f186d384fa52a8484101f82917f3d6b9723032bd0805c2ba4b6d73e067`.+The primary imported all branch references under `live/*`.+The primary created `/workspace/scratch/e8a2a58f21d0/DOPPLERGEIST-current`+at `6670d74b1f6c41c3a655e219f91908ed7fbe7182`.+The primary reported `git fsck --full --no-reflogs` exit code 0, with only dangling historical objects and no corruption.+The application results in this record retain their own earlier source revisions.++## Real recording through HTTP++The input was the complete reference recording from+[the original video](https://www.youtube.com/watch?v=4CxVxuMVkMc).+The worker converted its retained WAV to MP3 without a time selection or frequency selection.+The conversion removed metadata and supplied no sample-zero UTC or recorder location.+The [source record](../../evidence/e2e-worker-20261103/real-source-provenance.json)+preserves the original WAV identity, artifact ID, conversion command and MP3 identity.++| Input | SHA-256 |+| --- | --- |+| Original complete WAV | `262d9c4eba1c80657813c604140ba2afbbaabed2b3aebc833cba7cafdc005e9f` |+| Uploaded complete MP3 | `e1c13dafd8d1634bbf84df843c31771318e15a31ebb86dd165af7ee312ab80a0` |++The MP3 contained 42,085,293 bytes.+The request selected `coverage: conus`, with an empty operator configuration and no recording clock.+The HTTP run started at `2026-11-03T04:14:50.484869Z`.++| Observation | Result |+| --- | --- |+| Job | `dcf5816d3d0f4a1a9a551b7269f27ec8` |+| Decoded recording | 3,600.1845 seconds, mono, 4,000 Hz |+| Automatic discovery | 60 overlapping chunks, 18 ridges, 16 acoustic proposals |+| Terminal status | `needs_input` |+| Reason | `recording_time_required` |+| Required input | A defensible UTC window for the first decoded sample |+| Candidate output | Zero candidates |+| Total verifier time | 20.433066061001227 seconds |+| Service shutdown | SIGINT, return code 0, no forced kill |++The [result summary](../../evidence/e2e-worker-20261103/real-result-summary.json)+contains the complete recording metadata and discovery settings.+The proposals are acoustic candidates. Their aircraft identities remain unconfirmed.++The [HTTP receipt](../../evidence/e2e-worker-20261103/real-http-verification.json)+records successful preservation checks for the input, request, operator configuration and result.+Downloads matched the original upload and stored result.+The terminal result remained unchanged after shutdown.+The [stage receipt](../../evidence/e2e-worker-20261103/real-pipeline-evidence.json)+verified `automatic_provenance`, `intake` and `discovery`.++These three checks establish stage consistency for this actual run.+They do not independently reproduce the decoder or establish a scientific decision.+The receipts explicitly record `full_pipeline_observed: false`, `supported_decision: false`,+`location_accuracy_evaluated: false` and `browser_verified: false`.+No geographic search or location-error claim follows from this result.++### Source revision and retained artifacts++The invocation started from integration commit `6497540f15a05af142e88dd34c67ee76d4ea583b`.+The recorded implementation hashes identify the code independently of later documentation commits.+The HTTP receipt preserves all 21 backend file hashes and the verifier hash.+Those implementation hashes match the frozen backend at `317b0d3fc93ec9cd50ca88c336bb771b26bf5b1e`.+The receipt also records that the implementation remained unchanged during verification.++Full local artifacts remain under:++```text+/workspace/scratch/e8a2a58f21d0/real-inputs/data/source/reference-recording.wav+/workspace/scratch/e8a2a58f21d0/DOPPLERGEIST-integration/results/real-reference-upload-20261103/+```++The compact evidence directory contains the existing source and HTTP receipts without media or numerical arrays.+It also contains a summary extracted from the original result and discovery files.+The recorded `aircraft_geoloc` package and command names are historical names.+The separate installed-package replay below verifies the renamed `dopplergeist` package.+Related implementation sources are [product integration #19](https://github.com/1337isnot1337/DOPPLERGEIST/pull/19),+[finite retention #71](https://github.com/1337isnot1337/DOPPLERGEIST/pull/71)+and [trajectory support #91](https://github.com/1337isnot1337/DOPPLERGEIST/pull/91).++## Current installed package and real upload++The current main branch incorporated product, support and finite-search work and+renamed the package to `dopplergeist`. The worker ported only the additional+bounded-score accounting and verification changes onto main `6670d74`.+The resulting runtime was frozen at `db9db65aad7a6fe6fa9fc5fd31a9c45c72f4f68d`.+Geometry, acoustic discovery, confidence thresholds and browser assets were unchanged.++An offline build produced `dopplergeist-0.1.0-py3-none-any.whl`. A separate virtual+environment installed the wheel and its dependencies without using the editable+checkout or system packages. All 25 packaged source/browser files matched the+checkout byte for byte. Dependency consistency, installed imports, all five CLI+commands in help, and readable browser assets passed.+See [installed-package receipt](../../evidence/e2e-worker-20261103/installed-package.json).++The standalone HTTP verifier then ran with that environment's isolated Python+against the same complete real MP3. It again found 16 proposals over+3,600.1845 seconds and returned `needs_input / recording_time_required`.+The verifier completed in 20.41445216200009 seconds; input/result persistence,+artifact downloads, source fingerprints and graceful service shutdown passed.+It verified the same three stages and made no location claim.+See the [installed HTTP receipt](../../evidence/e2e-worker-20261103/installed-real-http-verification.json)+and [installed stage receipt](../../evidence/e2e-worker-20261103/installed-real-pipeline-evidence.json).++This is a real installed-package run of the current namespace. It does not turn+the missing-clock response into a successful scientific localization.+++## Configured real pipeline: reproduced crash and repair++++The unchanged `reproduce-local.json`, complete WAV, measured regional tracks and++terrain first failed at source `db9db65`: one historical trajectory raised++`AcousticSupportError: non_subsonic_motion` after both flyovers were measured.++The configured pipeline did not isolate this typed failure as the tiled path did.++++Source `69c507c` catches only typed acoustic-support failures. It retains supported++work and records the whole excluded track and receiver envelope at each stage.++It also marks legacy scoring envelopes without exhaustive clock accounting as++unknown. It changes no physical check, source trajectory, grid, threshold or input++configuration. The resulting research report always states `accepted_location: false`.++Concurrent upstream fit caching and unreported-work guards from main `6b8cbe0`++are preserved.++++The worker built and installed a new wheel in a separate environment, then ran:++++```bash++dopplergeist run /path/to/real-inputs/data/source/reproduce-local.json \++ --output /path/to/new-real-pipeline-output++```++++The installed pipeline completed in **51.008 seconds**. It imported 583,176++observations as 3,587 trajectory segments, measured both events, searched the++2,525-point coarse grid, refined candidates and produced 283 ranked rows.++Its best coordinate was `(40.87693175890468, -73.52498229500986)`, with flights++`a1dfeb:1` and `ace391:3`. This exactly reproduced the baseline coordinate, clock++and flight IDs; the score difference was floating-point roundoff (`8.9e-16`).++++Post-run comparison placed that coordinate **43.8585 m** from the published++reference `(40.8766, -73.5247)`, within 100, 500 and 1,000 m. That reference is not++a surveyed microphone position. Event windows, bands, regional bounds and timing++remain source-informed; this is an operational reproduction of the configured++method, not independent automatic accuracy.++++Coverage remains partial: 228 tracks were unsupported in each of three CPA++stages (684 work evaluations), and all 290 scored candidate envelopes lacked++exhaustive legacy clock-trial reporting. The best row remained a research++hypothesis; `model_support_complete`, `model_assessment_complete` and++`accepted_location` were all false. Full reports and per-stage support records++remain under `integration-audit/current-package-real-pipeline/pipeline/` in the++worker workspace. An outer post-run receipt writer initially lacked `pyproj`;++evaluation was completed in the scientific environment after the search, without++rerunning the pipeline or changing its outputs.+++## Historical bound verification on six failed tiles++This work preceded the owner directive.+It replayed six archived tiles from the earlier synthetic four-event HTTP run at source `134f617`.+The production bound source was `7a96fdb33fb787a9376432b2086f3673a4f4dc37`.+The replay used the archived discovery, flight index, tracks and terrain.+It did not load location truth or change scores.++For an association with `k` matched groups, the declared score is:++\[+S=\sum_{i=1}^{k}\left(1-\frac{\ell_i}{L_i}\right),\qquad L_i>0,\quad \ell_i\geq0.+\]++A validated event loss greater than its limit rejects the entire association.+For each unknown event loss, its score contribution cannot exceed one.+Validated supported losses can therefore tighten the general bound `S ≤ k`.+The candidate bound covers every scheduled clock trial.+The implementation rounds contributions and sums upward to protect the floating-point bound.++The code requires the declared score kind and validates the event diagnostics before it uses a loss.+It also validates disjoint trial counts and their sum against the scheduled count.+Unsupported motion errors remain unbounded.+Missing support remains unknown despite a finite score bound.+The bound applies to the enumerated grid and scheduled clocks, without a continuous-space claim.++| Tile | Unknown candidates | Rejected by a supported event | Largest remaining upper bound |+| --- | ---: | ---: | ---: |+| `-5_29` | 2 | 1 | 1 |+| `-20_36` | 96 | 7 | 2 |+| `-21_36` | 756 | 389 | 3 |+| `-6_29` | 177 | 64 | 2 |+| `8_20` | 304 | 201 | 2 |+| `8_21` | 177 | 53 | 2 |+| **Total** | **1,512** | **715** | **3** |++All 1,512 unknown candidates acquired valid bounds. None became an evaluated fit.+The other 797 candidates had upper bounds of at most three.+Forty-four unknown candidates matched four groups, so group count alone did not settle every case.+All six replays reproduced the archived counts.+Their ledger evidence remained identical after each database reopened.+The [six-tile summary](../../evidence/e2e-worker-20261103/historical-six-tile-bounds.json)+preserves the counts and persistence results.++The full diagnostics remain at+`/workspace/scratch/e8a2a58f21d0/integration-audit/production-bound-replays-7a96fdb/`.+The archived input is `integration-audit/http-four-event-134f617.zip` in the same workspace.+This result verifies a finite-search correction. It does not establish real-recording localization accuracy.++## Historical tests and interrupted positive run++Before the directive, the primary ran this command at integration commit+`317b0d3fc93ec9cd50ca88c336bb771b26bf5b1e`:++```bash+PYTHONPATH=src OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 \+ ../.venv/bin/python -m pytest -q+```++Observed terminal result: **620 passed, 1 skipped, 17 subtests in 77.82 seconds**.+The observation came from terminal session `45606`. No separate raw log accompanies this record.+This historical command is not a current instruction to run synthetic tests.++Earlier actual CLI and HTTP negative controls used source `91f2684f70eac7fecfe7810f09eecdb38cc839a7`.+Undated audio returned `needs_input`, corrupt input returned `failed`, and silence returned `inconclusive`.+Input preservation, stored results, restart persistence and graceful shutdown passed.+The [negative-control summary](../../evidence/e2e-worker-20261103/historical-negative-paths.json)+identifies these controls as synthetic and makes no accuracy claim.++When the owner directive arrived, the primary stopped the later positive synthetic run at `317b0d3`.+Terminal session `84810` ended with exit code 130.+Its retained job `2575b2f261db4c128a39e71c643d0704` still records `running / search`, with `search_complete: false`.+It produced no terminal HTTP verification receipt or accepted location result.+The partial artifacts remain in `results/e2e-bounded-four-20261103/` in the integration worktree.+**This interrupted run is not a successful end-to-end verification.**+- ## Pending: NASA real-recording localization-- **Status: in progress. No final localization result is recorded here.**-- The final record must identify the actual recording, measured trajectory, clock evidence, independent recorder location and source revision.- It must report the terminal decision and measured errors at 100, 500 and 1,000 meters.- An incomplete search or missing timing evidence remains explicit.- The results in this document do not establish completion of that experiment or the overall goal.++## NASA measured recordings: negative automatic-discovery baseline++++Original files came from NASA's [Small UAS flyover acoustics release](https://data.nasa.gov/dataset/small-uas-flyover-acoustics-data).++The first lexical Cub and Edge recordings were selected before acoustic inspection:++`cub_flyover_107.mat` and `edge_flyover_038.mat`. Downloaded original lengths,++ZIP CRCs and SHA-256 checks passed. The publisher supplies measured GPS trajectories,++microphone positions and acoustic sample times synchronized to the trajectory's++UTC seconds-of-day. The calendar day is not securely bound, so this experiment++uses the common session time axis and invents no absolute recording date.++++The experimental adapter retained every GPS row and original pressure sample,++used the preselected second microphone channel, and ran the unchanged automatic++detector without event windows or bands. Its planned search grid came from the++aircraft's measured footprint plus a 1 km margin, with microphone truth in a++separate evaluation file opened only after the search was frozen. This is a++limited measured-trajectory experiment, not national flight acquisition.++++| Recording | Measured audio duration | Automatic proposals | Localization result |++| --- | ---: | ---: | --- |++| Cub107 | 98.2016 s | 0 | No fit or location |++| Edge038 | 59.4094 s | 0 | No fit or location |++++Both baseline runs completed. No distance metric or successful acceptance can be++assigned to these misses. Subsequent diagnosis found that nearly all tracked++fragments failed the detector's 12-second duration rule; the three paths surviving++the other shape gates failed the jump rule. Those rules were not relaxed.++Cub107 contains more than one close approach; the adapter's original one-flyover++label was an assumption, not a measured encounter count, and is corrected to++unknown in the versioned extension.++++The next extension predeclared **both** publisher `Edge / high speed` rows,++Edge065 and Edge066, before downloading their audio. The selection retains065++despite its background-aircraft note. Discovery and search settings stay unchanged.++The first two negative outcomes remain part of the result set. Raw inputs and++outputs are retained under `real-inputs/nasa-release/` and++`integration-audit/nasa-real-experiment/` in the worker workspace.++++The independent real automatic localization goal remains open.diff --cc src/dopplergeist/automatic.pyindex 81e0c4d,4629a1a..03810f7--- a/src/dopplergeist/automatic.py+++ b/src/dopplergeist/automatic.py@@@ -202,25 -155,19 +202,25 @@@ def _coverage(request, search, config)search_complete = (search.get("tiles_total", 0) > 0 and search.get("tiles_completed") == search.get("tiles_total")and not search.get("tile_failures") and not search.get("refinement_failure")and search.get("all_event_groups_considered") is not False)- if "model_support_complete" in search or "model_support" in search:+ if any(name in search for name in ("model_support_complete", "model_support", "model_assessment_complete")):support = search.get("model_support")count_names = ("unsupported_cpa_track_evaluations", "unclassified_score_candidates",- "evaluated_trials", "rejected_trials", "unknown_trials")+ "evaluated_trials", "rejected_trials", "unknown_trials", "unreported_trial_envelopes")valid_counts = (isinstance(support, dict) andall(type(support.get(name)) is int and support[name] >= 0 for name in count_names))model_complete = (search.get("model_support_complete") is True and valid_counts and- all(support[name] == 0 for name in (count_names[0], count_names[1], "unknown_trials")))+ all(support[name] == 0 for name in (count_names[0], count_names[1], "unknown_trials", "unreported_trial_envelopes")))- if not model_complete:+ if "model_assessment_complete" in search and search["model_assessment_complete"] is not True:+ model_complete = False+ bounded_assessment = valid_counts and _bounded_model_assessment(search, support)+ if not model_complete and not bounded_assessment:search_complete = Falselimitations.append("Trajectory model assessment is incomplete; unsupported competitors remain unassessed. See the search support diagnostics.")+ elif bounded_assessment:+ limitations.append("Some finite acoustic trials lack full trajectory support. Their certified score bounds or rejections are accounted for; the decision still checks whether any bound could compete with the leading location.")+ if not model_complete:if valid_counts:- limitations.append(f"Unsupported CPA track evaluations: {support[count_names[0]]}; unclassified score candidates: {support[count_names[1]]}; unknown clock trials: {support['unknown_trials']}. Counts describe work evaluations, not distinct aircraft.")+ limitations.append(f"Unsupported CPA track evaluations: {support[count_names[0]]}; unclassified score candidates: {support[count_names[1]]}; unknown clock trials: {support['unknown_trials']}; unreported trial envelopes: {support['unreported_trial_envelopes']}. Counts describe work evaluations, not distinct aircraft.")else:limitations.append("Trajectory model support counts are unavailable or malformed; missing work is not treated as zero.")if not search_complete:diff --cc src/dopplergeist/pipeline.pyindex 019f5e1,019f5e1..b10347a--- a/src/dopplergeist/pipeline.py+++ b/src/dopplergeist/pipeline.py@@@ -7,9 -7,9 +7,10 @@@ import numpy as nimport pandas as pdfrom .audio import measure--from .geometry import ecef++from .finite_search import classified_assessment++from .geometry import AcousticSupportError,eceffrom .provenance import RunProvenance,implementation_provenance--from .search import cpa_table,pair_candidates,rank_candidates++from .search import cpa_table,pair_candidates,score_candidatefrom .terrain import Terrain,CopernicusTerrain,corridor_grid,refine_gridfrom .tracks import load_tracks,unix_time@@@ -18,6 -18,6 +19,12 @@@ def dump(path,value)Path(path).write_text(json.dumps(value,indent=2,allow_nan=False)+"\n")++def support_failure(error):++ return {"track_id":error.track_id,"reason":error.reason,++ "emission_intervals_s":error.emission_intervals_s,++ "receive_intervals_s":error.receive_intervals_s}++++def run(config_path,output_dir):began=time.monotonic()code_root=Path(__file__).resolve().parents[1]@@@ -86,24 -86,24 +93,66 @@@radius=max(event["slant_range_m"][1] for event in events)c=config.get("sound_speed_mps",343.0)filters=config.get("filters",{})-- def select(points):-- table=cpa_table(tracks,points,radius,c,config.get("cpa_step_s",2))++ support_stages=[]++ support_dir=output/"support"++ support_dir.mkdir(exist_ok=True)++ def support_summary():++ return {"scope":"configured_research_ranking",++ "model_support_complete":all(stage["complete"] for stage in support_stages),++ "model_assessment_complete":all(stage["complete"] for stage in support_stages),++ "unsupported_cpa_track_evaluations":sum(s.get("excluded_track_count",0) for s in support_stages),++ "unknown_candidate_envelopes":sum(s.get("unknown_candidate_count",0) for s in support_stages),++ "unreported_trial_envelopes":sum(s.get("unreported_trial_envelopes",0) for s in support_stages),++ "reported_unknown_trials":sum(s.get("reported_trials",{}).get("unknown_trials",0) for s in support_stages),++ "count_semantics":"work evaluations, including repeated tracks and receivers across stages",++ "stages":support_stages}++ def record_support(stage,detail):++ dump(support_dir/f"{stage}.json",detail)++ support_stages.append({key:value for key,value in detail.items()++ if key not in ("excluded_tracks","unknown_candidates")}++ | {"artifact":f"support/{stage}.json"})++ dump(output/"model-support.json",support_summary())++ def select(points,stage):++ tables,excluded=[],[]++ bounds=([float(points.lon.min()),float(points.lat.min()),++ float(points.lon.max()),float(points.lat.max())] if len(points) else None)++ for track in tracks:++ try:++ table=cpa_table([track],points,radius,c,config.get("cpa_step_s",2))++ except AcousticSupportError as error:++ # Exclude this track's whole stage, not just the reported bad++ # intervals. Missing competing passes remain unassessed.++ excluded.append({"track_id":track.id,"failure":support_failure(error),++ "emission_time_range_s":[float(track.time[0]),float(track.time[-1])],++ "receiver_bounds_wsen":bounds,"receiver_point_count":len(points),++ "coverage_envelope":"whole_track_whole_stage_conservative"})++ continue++ if len(table):++ tables.append(table)++ table=(pd.concat(tables,ignore_index=True) if tables else pd.DataFrame(columns=++ ["point_id","flight_id","emission_time","receive_time","distance_m","speed_mps"]))++ if len(table):++ table=table.sort_values(["point_id","flight_id","emission_time"]).reset_index(drop=True)++ record_support(stage,{"stage":stage,"kind":"cpa","complete":not excluded,++ "receiver_bounds_wsen":bounds,"receiver_point_count":len(points),++ "track_evaluations":len(tracks),"cpa_rows":len(table),++ "excluded_track_count":len(excluded),"excluded_tracks":excluded})candidates,counts=pair_candidates(table,events,offset_tolerance_s=filters.get("offset_tolerance_s",5),time_origin=origin,time_tolerance_s=filters.get("known_time_tolerance_s",5),silence=filters.get("silence"))++ if excluded:++ print(f"{stage}: {len(excluded)} unsupported track evaluations; model coverage is partial",flush=True)return candidates,counts-- candidates,counts=select(points)++ candidates,counts=select(points,"coarse-cpa")dump(output/"filter-counts.json",counts)print("Coarse filters:",counts,flush=True)-- if not candidates:-- raise ValueError("No candidates survived; see filter-counts.json")points.to_csv(output/"coarse-grid.csv",index=False)dump(output/"measured-events.json",events)fine=grid.get("scoring_spacing_m",100)-- if fine<coarse:++ if candidates and fine<coarse:ids={candidate["point_id"] for candidate in candidates}points=refine_grid(points[points.point_id.isin(ids)],coarse,fine,terrain,crs)-- candidates,fine_counts=select(points)++ candidates,fine_counts=select(points,"scoring-cpa")else:fine_counts=countsprint("Scoring filters:",fine_counts,flush=True)@@@ -111,9 -111,9 +160,64 @@@scoring=config.get("scoring",{})parameters=dict(mode=scoring.get("mode","brightness"),time_origin=origin,time_sweep_s=scoring.get("time_sweep_s",5),time_step_s=scoring.get("time_step_s",0.5),c=c)-- ranked=rank_candidates(candidates,points,tracks,events,measurements,**parameters)-- if not ranked:-- raise ValueError("No candidate had complete model support in all event windows")++ def rank(candidates,points,stage):++ lookup={row.point_id:row for row in points.itertuples()}++ track_lookup={track.id:track for track in tracks}++ ranked,unknown=[],[]++ reported=dict(evaluated_trials=0,rejected_trials=0,unknown_trials=0)++ unreported=0++ for i,candidate in enumerate(candidates):++ point=lookup[candidate["point_id"]]++ failure=None++ try:++ row=score_candidate(candidate,point,track_lookup,events,measurements,**parameters)++ except AcousticSupportError as error:++ # A legacy scorer can stop before reporting its clock trials.++ # Do not label that interrupted candidate a known rejection.++ failure=support_failure(error)++ row={"score":-np.inf}++ assessment=row.get("scoring_assessment")++ counted=(isinstance(assessment,dict) and all(type(assessment.get(key)) is int++ and assessment[key]>=0 for key in reported))++ if counted:++ for key in reported:++ reported[key]+=assessment[key]++ else:++ unreported+=1++ known=parameters["mode"]=="robust_ridge" and classified_assessment(row)++ finite=bool(np.isfinite(row["score"]))++ pass_times=[float(p["emission_time"]) for p in candidate["passes"]]++ if not known:++ anchor=(origin if origin is not None else++ candidate["passes"][0]["receive_time"]-events[0]["cpa_receive_s"])++ lo,hi=anchor-parameters["time_sweep_s"],anchor+parameters["time_sweep_s"]++ if parameters["mode"]=="robust_ridge" and "recording_start_bounds_s" in candidate:++ lower,upper=candidate["recording_start_bounds_s"]++ lo,hi=lower-parameters["time_sweep_s"],upper+parameters["time_sweep_s"]++ if origin is not None:++ lo,hi=max(lo,origin-parameters["time_sweep_s"]),min(hi,origin+parameters["time_sweep_s"])++ unknown.append({"point_id":int(point.point_id),++ "receiver":{key:float(getattr(point,key)) for key in ("x","y","lat","lon","elev_m")},++ "flight_ids":[p["flight_id"] for p in candidate["passes"]],++ "event_indices":list(candidate.get("event_indices",range(len(events)))),++ "pass_emission_times_s":pass_times,"recording_start_domain_s":[float(lo),float(hi)],++ "clock_domain_kind":"scorer_proposal_not_independent_recording_time",++ "clock_settings":parameters,"scoring_assessment":assessment,"failure":failure,++ "finite_best":finite,"finite_score":float(row["score"]) if finite else None,++ "reason":(failure["reason"] if failure else "unclassified_clock_envelope"),++ "coverage_envelope":"whole_candidate_clock_domain_conservative"})++ if finite:++ row["pass_emission_times_s"]=pass_times++ row["core_assessment_complete"]=bool(known)++ ranked.append(row)++ if i and i%100==0:++ print(f"Scored {i}/{len(candidates)} candidates",flush=True)++ record_support(stage,{"stage":stage,"kind":"scoring","complete":not unknown,++ "candidate_envelopes":len(candidates),"finite_candidates":len(ranked),++ "unknown_candidate_count":len(unknown),"unreported_trial_envelopes":unreported,++ "reported_trials":reported,"unknown_candidates":unknown})++ return sorted(ranked,key=lambda row:row["score"],reverse=True)++ ranked=rank(candidates,points,"grid-scoring")dump(output/"ranked-grid.json",ranked)# Refine the best location from each flight combination rather than spending# every refinement slot on neighbouring points of the winning combination.@@@ -122,11 -122,11 +226,11 @@@best_pairs.setdefault(tuple(row["flight_ids"]),row)chosen=list(best_pairs.values())[:grid.get("refine_pairs",10)]final_spacing=grid.get("refine_spacing_m",25)-- if final_spacing<fine:++ if chosen and final_spacing<fine:seeds=pd.DataFrame(chosen)points2=refine_grid(seeds,fine,final_spacing,terrain,crs)-- candidates2,refined_counts=select(points2)-- ranked2=rank_candidates(candidates2,points2,tracks,events,measurements,**parameters)++ candidates2,refined_counts=select(points2,"refinement-cpa")++ ranked2=rank(candidates2,points2,"refinement-scoring")ranked=sorted(ranked+ranked2,key=lambda r:r["score"],reverse=True)dump(output/"refinement-filter-counts.json",refined_counts)best_pairs={}@@@ -139,12 -139,12 +243,23 @@@"implementation_sha256":implementation["sha256"],"implementation_sources":implementation["sources"],"provenance":provenance.declaration(),"coarse_filter_counts":counts,"scoring_filter_counts":fine_counts,-- "ranked_points":len(ranked),"flight_combinations":len(best_pairs),"best":ranked[0],++ "ranked_points":len(ranked),"flight_combinations":len(best_pairs),"best":ranked[0] if ranked else None,++ "result_scope":"configured_research_ranking","accepted_location":False,++ "model_support_complete":support_summary()["model_support_complete"],++ "model_assessment_complete":support_summary()["model_assessment_complete"],++ "model_support":support_summary(),++ "limitations":["Configured event windows and receiver bounds do not establish independent automatic localization.",++ "Source flight coverage and competing locations are not certified by this research ranking.",++ "Excluded trajectories and unknown clock envelopes remain unassessed, not ruled out.",++ "Legacy brightness/ridge scores do not report exhaustive clock-trial assessment."],"elapsed_s":time.monotonic()-began,"scoring_time_is_locked":True}dump(output/"report.json",report)-- plot_results(output,ranked,tracks,measurements,c)-- print("Best:",json.dumps(ranked[0]),flush=True)++ if ranked:++ plot_results(output,ranked,tracks,measurements,c)++ print("Best:",json.dumps(ranked[0]),flush=True)++ else:++ print("No supported hypothesis; inspect model-support.json and filter counts",flush=True)return reportdiff --cc src/dopplergeist/tiled_search.pyindex 5d15919,48bfc76..607bff9--- a/src/dopplergeist/tiled_search.py+++ b/src/dopplergeist/tiled_search.py@@@ -18,8 -18,9 +18,9 @@@ import pandas as pfrom pyproj import Transformerfrom .data_access import CONUS, DataUnavailable, content_hash, sha256, write_json-from .finite_search import RetentionLedger, classified_assessment, identify_mode, mode_seed+from .finite_search import RetentionLedger, bounded_assessment, classified_assessment, identify_mode, mode_seedfrom .geometry import AcousticSupportError+ from .matching import _cache_ridge_fitsfrom .search import cpa_table, filter_event, pair_candidates, score_candidate