Feature: Infer OME-Zarr axes_units from BioImage.dimension_properties#58
Open
BrianWhitneyAI wants to merge 6 commits into
Open
Feature: Infer OME-Zarr axes_units from BioImage.dimension_properties#58BrianWhitneyAI wants to merge 6 commits into
BrianWhitneyAI wants to merge 6 commits into
Conversation
Add OmeZarrConverter._infer_axes_units, which reads real, file-sourced per-axis units from the reader-agnostic BioImage.dimension_properties surface and passes them to the writer, instead of forwarding the user-supplied axes_units passthrough unchanged. An explicit axes_units override still takes precedence. Readers that do not attach units leave them as None, in which case axes_units is omitted entirely rather than fabricated, preserving prior behavior for those formats. Part of #57 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make explicit that the converter already routes the reader's acquisition time interval into the level-0 T coordinate scale: BioImage.time_interval -> scale.T (seconds) -> physical_pixel_size[t] -> writer Axes scale, with the matching "second" unit flowing through _infer_axes_units. Document this in _infer_physical_pixel_sizes so the time path is not an implicit side effect of the spatial scale lookup. Add unit tests (no resource files; stubbed BioImage surface) locking in: - time interval -> T physical size (incl. sub-second, and default 1.0 when the file has no interval) - explicit physical_pixel_size / axes_units overrides win - file units attached from dimension_properties, and graceful omission when a reader attaches no units or exposes no dimension_properties Part of #57 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kmitcham
approved these changes
Jul 2, 2026
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
Resolves #57 Populate the OME-Zarr
axes_unitsfrom file-sourced per-axis units exposed through the reader-agnosticBioImage.dimension_propertiessurface.Related
🤖 Generated with Claude Code