Skip to content

feat(collect): add collect_dva for multi-cell DVA collection - #865

Merged
jepegit merged 2 commits into
masterfrom
863-collect-dva
Aug 9, 2026
Merged

feat(collect): add collect_dva for multi-cell DVA collection#865
jepegit merged 2 commits into
masterfrom
863-collect-dva

Conversation

@jepegit

@jepegit jepegit commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds cellpy.collect.collect_dva(batch, options=IcaOptions(...)), mirroring collect_ica, so DVA gets the same Collection (multi-cell, grouping, save/export) treatment as summaries/cycles/ICA.
  • IcaOptions gains capacity_resolution (dV/dQ differentiates along capacity via the V(q) interpolation, unlike dQ/dV's voltage_resolution); each collector forwards only its own knob.
  • New dva_collector convenience wrapper, exported alongside collect_dva from cellpy.collect.
  • Wires Collection._FAMILY / render_collected for kind="dva" (new dva_plotter, mirrors ica_plotter with x=capacity, y=dvdq) so Collection.plot() works out of the box instead of silently falling back to the wrong cycles columns.

Closes #863.

Test plan

  • uv run pytest tests/test_collect_dva.py — 5 passed
  • uv run pytest tests/test_collectors.py tests/test_collect.py tests/test_collected_ica_direction.py tests/test_ica_plot_prepare.py — 70 passed
  • MPLBACKEND=Agg uv run pytest -m essential — 703 passed, 1 skipped, 2 xfailed, 1 xpassed (no regressions)
  • black --diff / flake8 on touched files — only pre-existing, unrelated findings (line-length config mismatch; fixture-shadowing F811 identical to test_collectors.py; pre-existing unused import in options.py)

Made with Cursor

jepegit and others added 2 commits August 9, 2026 19:06
DVA was the one analysis family without a Collection-based multi-cell
collector, unlike summaries/cycles/ICA -- apps had to fall back to a
one-cell-at-a-time special case around dva_plot. Mirror collect_ica:

- collect_dva(batch, options=IcaOptions(...)) -> Collection (new
  cellpy/collect/dva.py), same per-cell cycle isolation as collect_ica.
- IcaOptions gains capacity_resolution (dvdq differentiates along
  capacity via the V(q) interpolation, unlike dqdv's voltage_resolution).
- dva_collector convenience wrapper; both exported from cellpy.collect.
- Collection._FAMILY / render_collected wired for kind="dva" so
  Collection.plot() renders through the new dva_plotter (mirrors
  ica_plotter: x=capacity, y=dvdq) instead of silently falling back to
  the wrong "cycles" columns.

Tests: tests/test_collect_dva.py.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@jepegit
jepegit merged commit 6318360 into master Aug 9, 2026
8 checks passed
@jepegit
jepegit deleted the 863-collect-dva branch August 9, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No collect_dva: DVA is single-cell only, unlike summaries/cycles/ICA

1 participant