Repository navigation
Handle stacked MultipartRelatedConsolidator with fpp > 1 - #67
thopkins32 wants to merge 5 commits into
Conversation
Assisted-by: oh-my-pi:gpt-5.6-sol
Assisted-by: oh-my-pi:gpt-5.6-sol
…reads Collapse the two stacked-layout helpers into a single `_derive_frames_per_file` that is the one source of truth for how many frames each file holds. Both `files_per_datum` (= `datum_shape[0] // frames_per_file`) and the physical `orig_chunks` layout now derive from it, so they can no longer disagree. This fixes sub-array reads for the legacy file-per-frame `multiplier` (`frame_per_point`) layout: previously that path set `files_per_datum` but not `orig_chunks`, so `read(0)` on a stacked multi-file datum raised a 422 reshape error. `orig_chunks` is now recorded for every stacked datum spanning more than one file (single-frame, multi-page, and legacy multiplier alike). Also rename `_recompute_files_per_datum` -> `_derive_files_per_datum`. Extend the stacked-TIFF writer test with a `legacy-multiplier` case so full and sub-array reads are value-checked for all three layouts.
|
When the default Fix: introduce a single TST: add a parametrized consolidator test (single/2/3-frame, non-divisor, inner-shape-mismatch, legacy multiplier) and a writer test that value-checks full and sub-array reads for single-frame, multi-page, and legacy-multiplier layouts; fix a vacuous assertion in test_tiff_and_jpeg_chunks that never checked the stack file count. |
An explicit `files_per_datum` StreamResource parameter is authoritative, but `_derive_frames_per_file` was still inferring from `chunk_shape[0]`, so `orig_chunks` could violate the invariant `files_per_datum * frames_per_file == datum_shape[0]` (e.g. datum_shape (6, H, W), chunk_shape (1, H, W), files_per_datum=2 wrongly yielded frames_per_file=1 instead of 3). Back-derive frames_per_file from an explicit files_per_datum, and skip orig_chunks when files_per_datum does not divide datum_shape[0] (the previous guard, dropped in the unification, used to protect this). Add a regression test for the explicit files_per_datum override under stack.
Unify multipart frames-per-file derivation and fix legacy multiplier reads
genematx
left a comment
There was a problem hiding this comment.
Awaiting Tiled v0.2.19 release before merging.
Assisted-by: oh-my-pi:gpt-5.6-sol.
Closes #66