Replace create_empty_hcs_zarr with iohub's create_empty_plate#554
Merged
talonchandler merged 2 commits intomainfrom Apr 24, 2026
Merged
Replace create_empty_hcs_zarr with iohub's create_empty_plate#554talonchandler merged 2 commits intomainfrom
talonchandler merged 2 commits intomainfrom
Conversation
iohub's `create_empty_plate` does the same plate + channel create/append work. The only waveorder-specific behavior was writing a `plate_metadata` dict into the plate's zattrs; that's now done inline in apply_inverse_transfer_function.py after create_empty_plate returns. Tests: 347 passed, 1 skipped, 2 xfailed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was
linked to
issues
Apr 23, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 tasks
talonchandler
approved these changes
Apr 24, 2026
Collaborator
talonchandler
left a comment
There was a problem hiding this comment.
Thanks @ieivanov!
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
waveorder.cli.utils.create_empty_hcs_zarr. iohub'screate_empty_platedoes the same plate/channel creation work.plate_metadatadict into the plate's zattrs; that's done inline inapply_inverse_transfer_function.pyaftercreate_empty_platereturns, matching the pattern used in biahub (Replace create_empty_hcs_zarr with iohub's create_empty_plate czbiohub-sf/biahub#215, Preserve OME-Zarr version across pipelines, with override knob czbiohub-sf/biahub#241).tests/util_tests/test_create_empty.py,tests/cli_tests/test_zarr_v3_reconstruct.py) tocreate_empty_plate.Why not also replace
apply_inverse_to_zyx_and_save?iohub's
process_single_positionis numpy-native: it loadsndarrayslices viaoindexand writes them back the same way.apply_inverse_to_zyx_and_saveoperates onxr.DataArray— it selects channels by name, passes the xarray to the waveorder reconstruction functions (birefringence/phase/fluorescence.apply_inverse_transfer_function, all xarray-in/xarray-out), and writes viaoutput_position.write_xarray(...)so thetcoord and attributes are preserved. A drop-in swap would either require refactoring the reconstruction API to become numpy-native (loses xarray coord semantics and breaks public API) or adding a numpy↔xarray wrapper that duplicates logic iohub doesn't expose. Deferred.Test plan
uv run pytest— 347 passed, 1 skipped, 2 xfailed.🤖 Generated with Claude Code