Skip to content

tiffstack: ignore non-image sidecar files when TIFFs are listed directly#108

Merged
stevevanhooser merged 1 commit into
mainfrom
claude/loving-wozniak-stmogc
Jun 10, 2026
Merged

tiffstack: ignore non-image sidecar files when TIFFs are listed directly#108
stevevanhooser merged 1 commit into
mainfrom
claude/loving-wozniak-stmogc

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Summary

Bug fix for ndr.reader.tiffstack.imagefiles, found by the NDI-matlab image-DAQ end-to-end test (VH-Lab/NDI-matlab#824).

imagefiles treated any non-TIFF, non-folder epoch file as a directory anchor and globbed its parent directory. But NDI's file navigator hands the reader an epoch's image files plus companion files (e.g. epochprobemap.ndi). The companion was treated as an anchor, so in a flat directory holding several epochs:

  • every epoch globbed in every other epoch's TIFFs (wrong frame count / frames), and
  • the frame-times sidecar lookup switched to the directory-level frametimes.txt instead of <base>_frametimes.txt, so a movie epoch was mis-reported as clockless (no_time instead of dev_local_time).

Fix

Prefer directly-listed TIFFs (and directory expansions). Resolve an anchor file to its parent directory's TIFFs only when no TIFFs are supplied directly — i.e. the marker-file-only case (a Prairie .xml/.pcf config in a directory of TIFFs) still works, but companion files alongside the TIFFs are ignored. This mirrors how the mfdaq NDR readers tolerate extra non-data files in an epoch's file list.

Existing TestTiffstack coverage (single file, directory, file-list, anchor-only) still applies; the anchor-only path is unchanged, and the "TIFFs + companion file" case is the one being corrected.

Why this is a separate PR

NDI-matlab#824's CI installs NDR from main, so this fix needs to land on NDR main for that PR to pass its image end-to-end test. No behavior change for the Prairie/marker-file path.

https://claude.ai/code/session_01M7f7wSBJeN4QJFvuCwdsSu


Generated by Claude Code

ndr.reader.tiffstack.imagefiles treated ANY non-TIFF, non-folder epoch
file as a directory anchor and globbed its parent directory. NDI's file
navigator hands the reader the epoch's image files PLUS companion files
(e.g. 'epochprobemap.ndi'); the companion was treated as an anchor, so in
a flat directory holding several epochs every epoch globbed in every
other epoch's TIFFs -- and the frame-times sidecar lookup switched to the
directory-level 'frametimes.txt', mis-reporting movie epochs as clockless.

Prefer directly-listed TIFFs (and directory expansions): resolve anchor
files to their parent directory's TIFFs ONLY when no TIFFs are supplied
directly (the marker-file-only case). This mirrors how the mfdaq NDR
readers tolerate extra non-data files in an epoch's file list.

https://claude.ai/code/session_01M7f7wSBJeN4QJFvuCwdsSu
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

177 tests  ±0   177 ✅ ±0   6s ⏱️ -1s
 25 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 1d61cf2. ± Comparison against base commit 68512e1.

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.92%. Comparing base (dd6e309) to head (1d61cf2).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
+ Coverage   37.87%   37.92%   +0.04%     
==========================================
  Files         102      102              
  Lines        5367     5371       +4     
==========================================
+ Hits         2033     2037       +4     
  Misses       3334     3334              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stevevanhooser stevevanhooser merged commit 661d6a3 into main Jun 10, 2026
7 checks passed
@stevevanhooser stevevanhooser deleted the claude/loving-wozniak-stmogc branch June 10, 2026 17:35
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