From 9c3f93d58dedb96e95e06275306cb726c0a49522 Mon Sep 17 00:00:00 2001 From: Frank14f <1515444314@qq.com> Date: Wed, 1 Jul 2026 12:45:10 +0800 Subject: [PATCH] fix(ccd): update run_zone_ccd.py zone definitions to unified geometry Old zones (350-500, 500-700, 580-650) were based on pre-unification illusion-only coordinates. Updated to match diagnose_corrections.py: near_body 580-720, body_wake 720-850, sensor_zone 780-850. Co-authored-by: Cursor --- .../correction_analysis/run_zone_ccd.py | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/CCD_analysis/correction_analysis/run_zone_ccd.py b/src/CCD_analysis/correction_analysis/run_zone_ccd.py index 003953e..90a4ad9 100644 --- a/src/CCD_analysis/correction_analysis/run_zone_ccd.py +++ b/src/CCD_analysis/correction_analysis/run_zone_ccd.py @@ -1,9 +1,10 @@ """Zone-wise CCD: force-CCD and signature-CCD per spatial zone. -Processes each of three spatial zones separately for illusion 0.75L and 1.0L: - - near_body: x[350:500] (envelope around pinball) - - body_wake: x[500:700] (body-connected near wake) - - sensor_zone: x[580:650] (around sensor plane at x=30*L0=600) +Processes each of three spatial zones separately for illusion 0.75L and 1.0L +(unified geometry: pinball center ~613px, sensors at 800px): + - near_body: x[580:720] (envelope around pinball) + - body_wake: x[720:850] (body-connected near wake) + - sensor_zone: x[780:850] (around sensor plane at x=40*L0=800) For each zone: mask the snapshot matrix to keep only grid points in the zone, build a target-only POD basis, project correction fields, and compute @@ -46,22 +47,27 @@ R = 6 # --------------------------------------------------------------------------- def _define_zones() -> dict: - """Define three-zone masks for illusion layout (sensors at x=30*L0=600).""" + """Define three-zone masks for unified geometry (pinball center ~613px, sensors at 800px). + + Updated 2026-06-28 to match unified geometry after all scenes were re-collected + with pinball at front x=30*L0=600, rear x=31.3*L0=626 (center ~613px), sensors at 40*L0=800. + Same zones as diagnose_corrections.py:define_zones(). + """ zones = {} - # near_body: envelope around pinball (pinball front x=380, rear x=406) + # near_body: envelope around pinball (center ~613px) mask = np.zeros((NY, NX), dtype=bool) - mask[:, 350:500] = True + mask[:, 580:720] = True zones["near_body"] = mask - # body_wake: body-connected near wake, immediate downstream + # body_wake: near wake downstream of pinball mask = np.zeros((NY, NX), dtype=bool) - mask[:, 500:700] = True + mask[:, 720:850] = True zones["body_wake"] = mask - # sensor_zone: around sensors at x=600 + # sensor_zone: around sensors at x=800 (40*L0) mask = np.zeros((NY, NX), dtype=bool) - mask[:, 580:650] = True + mask[:, 780:850] = True zones["sensor_zone"] = mask return zones