Skip to content

Add ndr.format.omezarr.probe and .reduce helpers for lightsheet pyramid ingest - #28

Merged
stevevanhooser merged 4 commits into
mainfrom
claude/lightsheet-zarr-ndi-viewer-djp5vk
Sep 9, 2026
Merged

stevevanhooser merged 4 commits into
mainfrom
claude/lightsheet-zarr-ndi-viewer-djp5vk

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Summary

Python mirrors of +ndr/+format/+omezarr/probe.m and .reduce.m from the NDR-matlab PR on the same branch name. Used by the ingest / GUI confirmation of a lightsheet OME-Zarr on the NDI side (landing under VH-Lab/NDI-matlab#<link> / VH-Lab/NDI-python#<link>).

  • src/ndr/format/omezarr/probe.py — returns an OMEZarrProbe dataclass with pyramid count, names, types, axes order/units, level-0 shape/chunks/scale/dtype and per-pyramid level counts. Wraps isOMEZarr + listPyramids.
  • src/ndr/format/omezarr/reduce.py — mean/max block reducer. Trailing partial blocks kept, matching bioformats2raw / lab writers.

Scope note

Additive. Not yet exported from ndr/format/omezarr/__init__.py — held to keep the import surface unchanged until callers are ready.

Test plan

  • probe on the OME-Zarr fixture used by the existing format/omezarr tests returns ok=True with the right pyramid count.
  • probe on a non-OME-Zarr directory returns ok=False with default fields.
  • Symmetry test: probe output matches the MATLAB probe output on the same fixture (dispatch under tests/symmetry/).
  • reduce with factor 2 and reduction mean matches numpy.mean on 2×2×2 blocks.
  • reduce with an odd-length axis produces ceil(N/2) samples with the trailing partial block preserved.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N67xH9BejMzZp4GNAq8m7w


Generated by Claude Code

stevevanhooser and others added 4 commits September 9, 2026 09:53
…id ingest

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N67xH9BejMzZp4GNAq8m7w
The bridge-completeness test requires every MATLAB function under
+ndr/+format/+omezarr to have a bridge entry naming its Python
counterpart, its last-sync commit hash, and a decision log.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N67xH9BejMzZp4GNAq8m7w
Replace typing.List with builtin list. from __future__ import annotations
is already in place so this is a syntactic swap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N67xH9BejMzZp4GNAq8m7w
- typing.Sequence -> collections.abc.Sequence (UP035).
- Union[a, b] -> a | b (UP007), possible with `from __future__ import annotations`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N67xH9BejMzZp4GNAq8m7w
@stevevanhooser
stevevanhooser merged commit 1d8c055 into main Sep 9, 2026
7 checks passed
@stevevanhooser
stevevanhooser deleted the claude/lightsheet-zarr-ndi-viewer-djp5vk branch September 9, 2026 20:46
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.

1 participant