Skip to content

SmartSPIM 6.0: map unnumbered channel folders by IMS_Notes.txt or metadata.json - #40

Merged
stevevanhooser merged 1 commit into
mainfrom
claude/smartspim-short-slice-names
Nov 12, 2026
Merged

stevevanhooser merged 1 commit into
mainfrom
claude/smartspim-short-slice-names

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Port of the NDR-matlab change (commit a77f2d6, VH-Lab/NDR-matlab branch of the same name). It lets two-channel SmartSPIM 6.0 acquisitions read. Their channel folders are Ex_<laser>_Em_<filter>, with no _Ch<n>.

Changes

A channel's _ch<k> now comes from, in order:

  1. its _MIP_stitched suffix;
  2. IMS_Notes.txt, read by the new readImsNotes ("The folder <channel>_stitched is represented as Ch<k>"). A missing file gives [];
  3. the filter-channel rank. A folder without _Ch<n> takes its number from metadata.json's tiles for its laser and filter (listChannels).

ValueError is raised, rather than guessing, when:

  • one folder still has no number and IMS_Notes.txt doesn't name it;
  • unnumbered folders mapped by rank disagree with the order metadata.json lists them (MATLAB ChannelOrderDisagrees).

Bridge: new readImsNotes entry; listChannels and readAllChannelsInfo synced to a77f2d6.

Tests

  • New tests in tests/test_smartspim_all_channels.py mirror the MATLAB ones:
    • metadata numbering;
    • order disagreement refused, then settled by IMS_Notes.txt;
    • no evidence refused;
    • IMS_Notes.txt outranks the rank;
    • no notes file.
  • test_single_channel_without_ch_number now expects filterChannel 2.
  • All 53 SmartSPIM tests pass, the bridge checks pass in strict mode, and black and ruff pass with CI's versions.

Merge after the NDR-matlab PR: the bridge hashes name its commit.


Generated by Claude Code

…adata.json

Port of NDR-matlab a77f2d6. A channel's All_Channels _ch<k> comes from:
1. its _MIP_stitched suffix;
2. IMS_Notes.txt (new readImsNotes);
3. the filter-channel rank, with a folder without _Ch<n> taking its number
   from metadata.json's tiles with its laser and filter.

Two-channel SmartSPIM 6.0 acquisitions (Ex_<laser>_Em_<filter>
folders) now read. ValueError is raised when one folder still has no number
and IMS_Notes.txt does not name it, or when unnumbered folders mapped by
rank disagree with the order metadata.json lists them (MATLAB
ChannelOrderDisagrees).

Bridge: new readImsNotes entry; listChannels and readAllChannelsInfo synced
to a77f2d6.

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