Repository navigation
Two spec mismatches from cellmap-flow: source_voxel_size under relabel, box under resample (0.3.1) - #5
Merged
Conversation
on_mismatch="relabel" renamed the grid and source_voxel_size read the renamed grid, so it reported the requested size; the spec says the stored level's. Reads, voxel_size, translation and corner are unchanged. Reported by cellmap-flow. Version 0.3.1. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
With a resample target, box was the stored data's extent while shape, voxel_size and translation were the target grid's, so read(box) could return fewer voxels than shape (7 voxels of 8 nm at 24 nm: box ended at 56 nm, shape said 3). box is now the extent of the target voxels shape counts, as the spec's [corner, corner + shape * voxel_size) says and as Grid.from_meta's box already was. resample.target_range is shared by both. Found by cellmap-flow. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
kilometer/kilometre/km at 1e3 m convert, abbreviate to km and are written as OME's kilometer (chunkmirage's ask). The README's placement rule gains the corner formula, a worked example, why the centre is the model and how the read rule follows from it. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
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.
Two fixes from cellmap-flow's migration, both cases where the code disagreed with the spec, and two small additions. No voxel moves in any read.
source_voxel_sizenow reports the stored level's voxel size underon_mismatch="relabel", as spec section 2 says. It used to report the relabelled size, because relabel renames the grid and the property read the renamed grid. A funlib level at 16, 4, 4 nm opened withvoxel_size=(8, 8, 8)and relabel reported 8, 8, 8.boxof an array opened with a resample target is now the extent of the target voxelsshapecounts, as the spec's[corner, corner + shape * voxel_size)says and asGrid.from_meta(meta, voxel_size=t).boxalready was. It used to be the stored data's extent, soread(box)could return fewer voxels thanshape: 7 voxels of 8 nm read at 24 nm gave a box ending at 56 nm, withshapesaying 3. Now it ends at 72 nm.kilometer,kilometre,km, 1e3 m): they convert, abbreviate tokm, andome_multiscaleswrites them as OME'skilometerinstead of as given. chunkmirage asked for this so it can drop its own unit table.corner = translation - voxel_size / 2, a worked example (8 nm voxels, corner 0, translation 4), why the centre is the model, and how the read rule follows from it.No consumer repo reads
source_voxel_sizetoday; cellmap-flow reads resampled arrays byread_indexand is unaffected by theboxchange. Version 0.3.1, changelog entries added, and both new fix tests fail on main.https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64