# CCD_analysis: Correction-Field CCD Pipeline

Analyzes DRL-controlled fluidic pinball using **correction-field decomposition** + **Canonical Correlation Decomposition (CCD/Lyu23)**. Core question: does `dq_ctl` (what the controller adds) match `dq_tar` (what the target requires)?

## Start Here

**→ [`PIPELINE.md`](PIPELINE.md)** — pipeline overview, results index, conventions, new training integration guide.

**→ [`DUAL_CLOCK_SAMPLING.md`](DUAL_CLOCK_SAMPLING.md)** — 在固定 DRL 控制周期内按独立时钟读取/保存 DDF；CCD 与 OID 共用。

## Quick Commands

```bash
cd src/CCD_analysis

# Panorama comparison (main output)
conda run -n pycuda_3_10 python3 correction_analysis/compare_dqctl_scenes.py

# CCD quantitative analysis
conda run -n pycuda_3_10 python3 correction_analysis/decompose_corrections.py

# Zone diagnostics
conda run -n pycuda_3_10 python3 correction_analysis/diagnose_corrections.py
```

## Directory

```
CCD_analysis/
  README.md                       # This file
  PIPELINE.md                     # Primary entry — overview, results, conventions
  ccd_knowledge.md                # Full knowledge base (theory, methods, bug history)
  Lyu23.md                        # CCD method paper
  configs.py                      # Scene registry (single source of truth)
  results/                        # Canonical outputs
    figures/                      # Symlinks to all core figures (numbered)
    ccd/                          # Final CCD JSON results
  correction_analysis/            # All analysis scripts
  scripts/                        # GPU data collection + phase alignment
  utils/                          # Core algorithms (POD, CCD, field loading)
  data/                           # Raw data + generated figures
  ccd/                            # Round 5 frozen baseline (do not modify)
```

## Key Documentation

| File | Content |
|------|---------|
| `PIPELINE.md` | **Primary entry** — pipeline, convention, results index |
| `ccd_knowledge.md` | Complete knowledge base (509 lines) |
| `results/figures/` | All core figures with numerical prefix ordering |

## Environment

```
conda run -n pycuda_3_10
```
