Skip to content

Feature: Infer OME-Zarr axes_units from BioImage.dimension_properties#58

Open
BrianWhitneyAI wants to merge 6 commits into
mainfrom
feature/axes-units-from-metadata
Open

Feature: Infer OME-Zarr axes_units from BioImage.dimension_properties#58
BrianWhitneyAI wants to merge 6 commits into
mainfrom
feature/axes-units-from-metadata

Conversation

@BrianWhitneyAI

@BrianWhitneyAI BrianWhitneyAI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves #57 Populate the OME-Zarr axes_units from file-sourced per-axis units exposed through the reader-agnostic BioImage.dimension_properties surface.

Related

🤖 Generated with Claude Code

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>
@BrianWhitneyAI BrianWhitneyAI self-assigned this Jul 1, 2026
@BrianWhitneyAI BrianWhitneyAI marked this pull request as ready for review July 1, 2026 20:26
@BrianWhitneyAI BrianWhitneyAI requested a review from a team as a code owner July 1, 2026 20:26
BrianWhitneyAI and others added 3 commits July 1, 2026 13:56
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>
@BrianWhitneyAI BrianWhitneyAI changed the title Infer OME-Zarr axes_units from BioImage.dimension_properties Feature: Infer OME-Zarr axes_units from BioImage.dimension_properties Jul 1, 2026
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.

Feature Request: Carry axis units and time interval into OME-Zarr output

2 participants