Skip to content

SmartSPIM: read Z<z>_Ch<k>.tif slices and a single channel folder without _Ch<n> - #39

Merged
stevevanhooser merged 2 commits into
mainfrom
claude/smartspim-short-slice-names
Nov 10, 2026
Merged

stevevanhooser merged 2 commits into
mainfrom
claude/smartspim-short-slice-names

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Port of the NDR-matlab change (commit 147073c on its branch of the same name). Some SmartSPIM software versions write a single-channel acquisition with a channel folder named Ex_<laser>_Em_<filter> (no _Ch<n>) and stitched slices named Z<z*10>_Ch<k>.tif. NDR did not recognize them.

Changes

  • readAllChannelsInfo accepts Z<z*10>_Ch<k>.tif(f) slice names. Matching ignores case.
  • listChannels and isSmartSPIM accept a lone channel folder without _Ch<n>:
    • filterChannel is NaN;
    • numTiles is counted from metadata.json's tiles with its laser and filter;
    • working folders such as _MIP and _stitched still aren't taken for channels.
  • That lone channel is matched to whichever single _ch<k> its slices carry.
  • Several channel folders where any lacks _Ch<n> raise ValueError rather than guess which _ch<k> slices belong to which channel. MATLAB raises ndr:format:smartspim:listChannels:UnnumberedChannels.
  • Bridge: isSmartSPIM, listChannels and readAllChannelsInfo synced to NDR-matlab 147073c, with notes.

Tests

  • test_single_channel_without_ch_number and test_several_channels_without_ch_number_are_refused in tests/test_smartspim_all_channels.py mirror the MATLAB tests. Both pass.
  • The bridge checks pass in strict mode against NDR-matlab's branch.
  • In this container, 37 tests in the rest of the suite fail the same way with and without this change; they need packages that aren't installed here (zarr and others).

This should merge after the NDR-matlab PR: the bridge hashes name its commit.


Generated by Claude Code

…hout _Ch<n>

Port of NDR-matlab 147073c. Some SmartSPIM software versions write a
single-channel acquisition with a channel folder named Ex_<laser>_Em_<filter>
(no _Ch<n>) and stitched slices named Z<z*10>_Ch<k>.tif, which were not
recognized.

- readAllChannelsInfo accepts Z<z*10>_Ch<k>.tif(f).
- listChannels / isSmartSPIM accept a lone channel folder without _Ch<n>
  (filterChannel NaN; numTiles counted by laser and filter). Working folders
  such as _MIP and _stitched are still not channels.
- Several channel folders when any lacks _Ch<n> raise ValueError rather than
  guess which _ch<k> slices are whose.
- Bridge: isSmartSPIM, listChannels and readAllChannelsInfo synced to
  147073c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E59gJ2kMfx16TfRmzo2SnL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E59gJ2kMfx16TfRmzo2SnL
@stevevanhooser
stevevanhooser merged commit b423c31 into main Nov 10, 2026
7 checks passed
@stevevanhooser
stevevanhooser deleted the claude/smartspim-short-slice-names branch November 10, 2026 18:56
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.

2 participants