fix: preserve analysis bands across input workflows

This commit is contained in:
2026-08-29 08:05:15 +09:00
parent 122b6cf7be
commit 62971e07ec
10 changed files with 282 additions and 24 deletions
+2 -1
View File
@@ -34,7 +34,8 @@ Unit과 integration module은 같은 browser runner에서 순서대로 실행됩
1/2/5 grid와 keyboard nudge
- `evaluation.test.js`: local peak와 검출 감도, truth matching, energy/sidelobe/main-lobe 및 비확률적
beam-spread covariance ellipse
- `camera.test.js`: canonical input hash, workload 추정, 이동 timeline 계획·재생 보간, Result schema 검증
- `camera.test.js`: canonical input hash, workload 추정, Scene 정렬의 분석 band 보존,
이동 timeline 계획·재생 보간, Result schema 검증
- `webgpu.test.js`: WGSL buffer packing, DAS-PHAT phase normalization, bin/point batching,
장치 한계와 typed CPU fallback 정책
- `split-pane.test.js`: 조절식 설정 패널의 포인터 좌표, 최소·최대 폭과 양쪽 배치
+10
View File
@@ -382,7 +382,12 @@ test("Camera distance shift keeps the scene and scan on one z plane", () => {
test("Camera aligns an experiment to an imported scene without changing grid resolution", () => {
const experiment = {
scan: { z: 2, xMin: -1, xMax: 1, yMin: -1, yMax: 1, columns: 32, rows: 24 },
frequencyBands: [
{ id: "low", minHz: 600, maxHz: 900, color: "#65f2bf" },
{ id: "high", minHz: 1100, maxHz: 1500, color: "#58c7ff" },
],
};
const originalBands = structuredClone(experiment.frequencyBands);
const imageScene = {
sources: [{ id: "one", position: [0.2, -0.1, 4.5] }],
image: { plane: { z: 4.5, xMin: -2, xMax: 3, yMin: -1.5, yMax: 2.5 } },
@@ -433,6 +438,11 @@ test("Camera aligns an experiment to an imported scene without changing grid res
};
assertEqual(alignExperimentToScene(experiment, movingScene), "source-bounds", "trajectory fallback");
assertEqual(experiment.scan.z, 5, "trajectory depths contribute to median scan depth");
assertEqual(
JSON.stringify(experiment.frequencyBands),
JSON.stringify(originalBands),
"scene alignment preserves every analysis band",
);
assertNear(experiment.scan.xMin, -2.9, 1e-12, "trajectory x minimum with padding");
assertNear(experiment.scan.xMax, 4.9, 1e-12, "trajectory x maximum with padding");
assertNear(experiment.scan.yMin, -4.2, 1e-12, "trajectory y minimum with padding");