Skip to content

Replace create_empty_hcs_zarr with iohub's create_empty_plate#554

Merged
talonchandler merged 2 commits intomainfrom
switch-to-iohub-create-empty-plate
Apr 24, 2026
Merged

Replace create_empty_hcs_zarr with iohub's create_empty_plate#554
talonchandler merged 2 commits intomainfrom
switch-to-iohub-create-empty-plate

Conversation

@ieivanov
Copy link
Copy Markdown
Contributor

Summary

Why not also replace apply_inverse_to_zyx_and_save?

iohub's process_single_position is numpy-native: it loads ndarray slices via oindex and writes them back the same way. apply_inverse_to_zyx_and_save operates on xr.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 via output_position.write_xarray(...) so the t coord 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

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>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@talonchandler talonchandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ieivanov!

@talonchandler talonchandler merged commit c27b97b into main Apr 24, 2026
10 checks passed
@talonchandler talonchandler deleted the switch-to-iohub-create-empty-plate branch April 24, 2026 15:23
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.

Replace create_empty_hcs_zarr with iohub's create_empty_plate

2 participants