Repository navigation
Present axes in another order on request (0.10.0) - #16
Merged
Merged
Conversation
TensorSwitch writes OME-Zarr v3 with dimension_names x, y, z, and worldarray presents the store's C order, so a reader that indexes axes by position (mesh-n-bone, cellmap-analyze's read_onto, cellmap-flow's blockwise input) meshes or reads such an array transposed, or refuses it. open, open_pyramid and metadata take axes_order: "stored" (the default, for good: an x, y, z store read faithfully is x, y, z with its names), "zyx" (the axes named z, y and x last, the others first in stored order) or a sequence of names. Names move with the data, and shape, chunks, shards, units, voxel size and translation with them, through reads, writes, a pyramid's placements and level_meta, level choice, base_voxel_size, reopen and a pickle. Chunk keys take and give presented indices with the store's keys, and add_level takes its arguments in the pyramid's order. open_tensorstore stays in the store's order. 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.
TensorSwitch writes OME-Zarr v3 with
dimension_namesx, y, z, and worldarray presents the store's C order. Code that indexes axes by position then gets such an array transposed. mesh-n-bone meshes it transposed with no error, cellmap-analyze'sread_ontorefuses it, and cellmap-flow's blockwise input reads it transposed.The option.
open,open_pyramidandmetadatatakeaxes_order:"stored"is the default, permanently: an x, y, z store read faithfully is x, y, z with its names, which name-based readers (Neuroglancer, chunkmirage, mirrors) need."zyx"moves the axes named z, y and x last, in that order, with the other axes first in stored order. A channel-last array comes out channel-first, and an array with none of those names is unchanged.What moves with it. The names move with the data, and shape, chunks, shards, units, voxel size and translation move with them. That covers
.ts,meta,grid, reads, writes,blocks, a pyramid's placements andlevel_meta, level choice by voxel size,base_voxel_size,reopenand pickling.open_tensorstorestays in the store's order.Write paths.
chunk_key,parse_chunk_keyandlist_chunkstake and give indices in the presented order; the keys themselves are the store's. A selected axis keeps its stored place in a key index, as it does inlevel_meta.add_leveltakes its per-axis arguments in the pyramid's order and creates the array in the group's own order.codecs_ofreturns shards in the store's order; the spec says a mirror of a reordered handle takesvol.meta.shard_shapeinstead.Spec. Convention 2 states the option and why the default stays, with Behaviours 14 and 15 and the tests section updated. It also removes a stray
\1that had been in the spec since the first draft.https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64