Repository navigation
fix: ignore null _squid values so single-plane Squid Zarr runs open - #47
Merged
Merged
Conversation
…ith a TypeError Squid records z_step_um: null in the _squid block when a run has one z plane (NZ == 1), and parse_image compared it with the spec scale: `abs(scale_um["z"] - None)` raised TypeError, so no single-plane Zarr run could be opened (reproduced with Squid's real ZarrWriter on main). A null optional value is now skipped: the spec scale stays, and a null never fills a missing spec scale either. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
Squid writes
z_step_um: nullin the_squidblock when a run has a single z plane (NZ == 1).parse_imagecompared that with the spec scale,abs(scale_um["z"] - None), and raisedTypeError, so no single-plane Squid Zarr run could be opened. Reproduced with Squid's realZarrWriter(master): a(1, 1, 1, 8, 8)dataset withz_step_um=Nonefails onmain, opens with this change.A null optional
_squidvalue is now skipped: the spec scale stays, and a null never fills a missing spec scale either.Tests
test_null_squid_values_are_ignored:_squidwithpixel_size_um: null, z_step_um: nullparses; scales come from the spec.test_null_squid_value_does_not_fill_a_missing_spec_scale.Found by review of Squid #794 / #800 (the submodule bumps); both need to pick this up.
🤖 Generated with Claude Code