Recognise the normal Createc trailing appendix; only warn on oversized tails#34
Merged
Conversation
…d tails Every healthy Createc image carries a small appendix after the image planes: four spare scan-line buffers (4 * Num.X floats) plus a 32-float zero block in newer headers. Since the viewer began surfacing scan.warnings in the status bar, this normal format layout produced a "Loaded with warnings" message on every Createc load. The reader now treats tails within the 4 * Num.X + 32 budget as expected layout (still recorded as ignored_tail_float_count for diagnostics) and only warns when the tail exceeds the budget, i.e. payload it does not understand. Corpus test asserts every fixture loads warning-free; a synthetic oversized-tail test keeps the loud path covered. Co-Authored-By: Claude Fable 5 <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.
Problem
Since the parser review (#32) the viewer surfaces
scan.warningsin the status bar — and every healthy Createc.datload showed "Loaded with warnings: ignored N trailing float32 value(s)". Investigation showed the trailing data is normal Createc format layout, not data loss: four spare scan-line buffers (4 * Num.Xfloats, zero-filled apart from an occasional stray turnaround sample) plus a 32-float zero block in newer header variants, present in every healthy fixture regardless of channel count.Fix
read_createc_dat_reportnow treats tails within the4 * Num.X + 32budget as expected layout: still recorded inignored_tail_float_countfor diagnostics, but no user-facing warning.docs/createc_dat_reader.mddocuments the appendix.Tests
createc_scan_*.datfixture has a tail within budget and loads with no trailing-data warning (through bothread_createc_dat_reportandload_scan).ruff checkclean.🤖 Generated with Claude Code