Skip to content

Stage 3.9: ICA redesign - dqdv/dvdq on one pure core, IcaOptions, specced output frame #566

Description

@jepegit

Goal

Execute the ICA redesign: one pure dqdv() core plus a new dvdq(), an IcaOptions
dataclass replacing the ~20 tunneled kwargs, and a specced long-format output frame.

Why

utils/ica.py (1 124 lines) has four entry points that accept the same twenty options
in three different ways, and returns four different shapes (numpy tuples, long frames,
wide MultiIndex pairs). More importantly the output frame schema is a data contract:
users consume the returned columns directly. Changing it in 2.1 would be a break in a
minor release, so it has to happen at 2.0.

Plan: architecture-plan/cellpy2-ica-redesign-plan.md.

Scope

  • One pure core over cellpycore.curves; scipy stays app-side.
  • IcaOptions dataclass — the only way to pass converter parameters.
  • dqdv() and new dvdq() with symmetric signatures.
  • Specced long-format output frame with native column names (a CurveCols-style
    spec, documented in the data-format specifications).
  • Old entry points (dqdv_cycle, dqdv_cycles, dqdv_np, split=True) kept as
    warn_once shims registered in DEPRECATIONS.md, removal at 2.1.

Acceptance

  • The 19 existing tests/test_ica.py characterization tests pass through the shims.
  • New tests assert the output frame against its spec.
  • dvdq() on a golden cell matches an independently computed reference.
  • No hidden converter state between calls (determinism test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    code improvementsv2cellpy v2 work - PRs should target the master branch

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions