Repository navigation
Add ndr.format.omezarr.probe and .reduce helpers for lightsheet pyramid ingest - #28
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Python mirrors of
+ndr/+format/+omezarr/probe.mand.reduce.mfrom 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 underVH-Lab/NDI-matlab#<link>/VH-Lab/NDI-python#<link>).src/ndr/format/omezarr/probe.py— returns anOMEZarrProbedataclass with pyramid count, names, types, axes order/units, level-0 shape/chunks/scale/dtype and per-pyramid level counts. WrapsisOMEZarr+listPyramids.src/ndr/format/omezarr/reduce.py—mean/maxblock 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
probeon the OME-Zarr fixture used by the existingformat/omezarrtests returnsok=Truewith the right pyramid count.probeon a non-OME-Zarr directory returnsok=Falsewith default fields.probeoutput matches the MATLABprobeoutput on the same fixture (dispatch undertests/symmetry/).reducewith factor 2 and reductionmeanmatchesnumpy.meanon 2×2×2 blocks.reducewith an odd-length axis producesceil(N/2)samples with the trailing partial block preserved.🤖 Generated with Claude Code
https://claude.ai/code/session_01N67xH9BejMzZp4GNAq8m7w
Generated by Claude Code