"""Public compatibility module.

Conceptually, this module preserves the historical math-helper import surface
used by notebooks and analysis code.

It exists as a separate unit so legacy imports remain stable while the actual
implementation stays split into clearer signal, statistics, and subspace
modules.

It connects the stable math-helper API to `signal_utils`, `stats_utils`, and
`subspace`.
"""

from __future__ import annotations

from .signal_utils import concat_rows, moving_sum_windows, nearest_bin, psth_simple_counts_single_event
from .stats_utils import (
    angle_btw_nd_vectors,
    auc_from_scores_labels,
    corrcoef_with_pvalues,
    downsample_balance,
    holdout_split,
    selectivity_index_calculation_np,
    zscore_cols,
    zscore_matlab_cols,
)
from .subspace import (
    _top_eigvals_sym,
    ensure_trials_by_cells,
    gram_schmidt_columns,
    normalize_vec,
    orthogonal_subspaces_pg,
    pg_decompose_python,
    project_trials,
    qr_orth,
)

__all__ = [
    "angle_btw_nd_vectors",
    "auc_from_scores_labels",
    "concat_rows",
    "corrcoef_with_pvalues",
    "downsample_balance",
    "ensure_trials_by_cells",
    "gram_schmidt_columns",
    "holdout_split",
    "moving_sum_windows",
    "nearest_bin",
    "normalize_vec",
    "orthogonal_subspaces_pg",
    "pg_decompose_python",
    "project_trials",
    "psth_simple_counts_single_event",
    "qr_orth",
    "selectivity_index_calculation_np",
    "zscore_cols",
    "zscore_matlab_cols",
]
