# CelerisLab/OID_analysis/utils/cfd_interface.py
"""
Re-exports proven CFD interface from CCD_analysis.
Adds OID-specific helpers.

Must be run inside: conda run -n pycuda_3_10

Usage::
    from OID_analysis.utils.cfd_interface import (
        load_legacy_configs, get_velocity_field, vorticity_from_ddf,
        save_vorticity_png, load_ppo_model, scale_action,
        build_observation, compute_similarity, calc_lag, calc_dtw_sim,
        ACTION_SMOOTH_WEIGHT,
    )
"""
from __future__ import annotations

import sys
import os

# Add repo root for imports
_REPO = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
if _REPO not in sys.path:
    sys.path.insert(0, _REPO)
_SRC = os.path.join(_REPO, "src")
if _SRC not in sys.path:
    sys.path.insert(0, _SRC)

# Re-export everything from CCD's proven cfd_interface
from CCD_analysis.utils.cfd_interface import (  # noqa: E402, F401, F403
    load_legacy_configs,
    get_velocity_field,
    vorticity_from_ddf,
    save_vorticity_png,
    load_ppo_model,
    scale_action,
    build_observation,
    calc_lag,
    calc_dtw_sim,
    compute_similarity,
    ACTION_SMOOTH_WEIGHT,
    build_karman_cloak_env,
    add_pinball,
)

# Also re-export from SR_analysis in case of extra helpers
from SR_analysis.scripts.infer_illusion import analyze_harmonics, gen_target_states_at  # noqa: E402, F401
