Skip to content

fix: ignore null _squid values so single-plane Squid Zarr runs open - #47

Merged
hongquanli merged 1 commit into
mainfrom
fix/squid-null-z-step
Nov 8, 2026
Merged

hongquanli merged 1 commit into
mainfrom
fix/squid-null-z-step

Conversation

@hongquanli

Copy link
Copy Markdown
Collaborator

Summary

Squid writes z_step_um: null in the _squid block when a run has a single z plane (NZ == 1). parse_image compared that with the spec scale, abs(scale_um["z"] - None), and raised TypeError, so no single-plane Squid Zarr run could be opened. Reproduced with Squid's real ZarrWriter (master): a (1, 1, 1, 8, 8) dataset with z_step_um=None fails on main, opens with this change.

A null optional _squid value is now skipped: the spec scale stays, and a null never fills a missing spec scale either.

Tests

  • test_null_squid_values_are_ignored: _squid with pixel_size_um: null, z_step_um: null parses; scales come from the spec.
  • test_null_squid_value_does_not_fill_a_missing_spec_scale.
  • Full suite: 315 passed, 3 skipped on PyQt5 and PyQt6 (ndv 0.5.0, offscreen).

Found by review of Squid #794 / #800 (the submodule bumps); both need to pick this up.

🤖 Generated with Claude Code

…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>
@hongquanli
hongquanli merged commit 3bb74b0 into main Nov 8, 2026
2 checks passed
@hongquanli
hongquanli deleted the fix/squid-null-z-step branch November 8, 2026 14:47
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.

1 participant