Repository navigation
OME-Zarr copies: asked on the first screen, written as a recorded conversion once the axes are confirmed (redesign 3, part 4) - #287
Conversation
… written once the axes are confirmed Owner's test of v0.5.1, item (t). convert_experiment(store='ome-zarr') writes every image that is read as <position>.ome.zarr (OME-NGFF 0.4, written directly), with the conversion record; the entry keeps the source's path in source_relative_path (written only for such copies). The notebook's option on the first screen writes nothing; the Axes step offers the copy once the roles are confirmed and then opens the copies as the experiment. Projections are written as OME-Zarr when the option is ticked. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
… in full Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…ing API is pinned) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…it (Windows) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
|
Local gate (
The 4 skips are the same on every head and are environment skips: Same answers, main Changes made for CI only, in the test helpers: the kernel runs of the notebook file are repeated when the client loses the kernel's output (macOS runners, "Timeout waiting for IOPub output"), and two path assertions compare the folder as the record spells it (Windows). 🤖 Generated with Claude Code https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc Generated by Claude Code |
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
|
Final heads (this replaces the table above; main
The 4 skips are environment skips, the same on every head (case-sensitive file system ×3, file modes ×1). The macOS failures of the earlier heads, explained. The app's cell sends one IOPub message per widget model: 1,837 on main, 2,015 with #284 and 2,135 at the top of the stack (counted with nbclient). ZeroMQ keeps 1,000 messages on each side for a subscriber and drops the rest, so above 2,000 a client that reads slowly (nbclient on the macOS runners) lost the end of the stream, with the cell's display message. Byte comparison (same answers, main 🤖 Generated with Claude Code https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
…F 0.4 requires The OME-NGFF 0.4 image schema requires a window (start, end, min, max) and a color for each omero channel; a copy with channel names had only the label and failed the official schema. They are written as display-only values: white and the pixel type's whole range, never read from the pixels, so the same source still gives the same bytes. The brick's reader is unchanged (labels only). Regression test: test_the_omero_channels_have_what_ome_ngff_0_4_requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Independent review: #287 (OME-Zarr copy option)Verdict: approve after one fix (pushed), with owner questions. Merged the projection branch forward ( Defect found and fixed: After the fix my script wrote YX, CYX and TCYX (named) and TCZYX/ZCYX (max, mean, sum projections; uint16 and float32). All of them:
The record stays Also checked:
Owner questions. My recommendation comes first in each.
Byte identity (re-measured on
The only other differences are in Gates (Ruff check, Ruff format, code rules, pytest
CI on Generated by Claude Code |
682e14e) Not for merging: RELEASE_REF points at main as merged (#284-#287, with #289) so the owner can test it in Colab. Only RELEASE_REF changes; cell 3 calls PreprocessingNotebook(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Redesign iteration 3, part 4 of 4, stacked on #286. Item (t) of "OWNER v0.5.1 NOTEBOOK TEST" (RESTART.md).
Summary
convert_experiment(..., store="ome-zarr")(default"ome-tiff", unchanged).ome_zarr_copy:write_named_zarrandwrite_projected_zarrwrite OME-NGFF 0.4 stores directly (nozarrpackage needed to write; reading needs thezarrextra as for any OME-Zarr image): one array0, uncompressed, little-endian, one chunk per plane, sorted JSON metadata, so one copy of one source is the same bytes. Planes are read withiter_planes/read_planeunder the confirmed roles and projected withPlaneAccumulator, as the OME-TIFF writers do. Axes, units, level-0 scale (an unknown size is the placeholder 1 named undermetadata.unknown_scale, which the reader already reads as unknown), channel names (omero), a projected copy's description (morphobricks.description).<position>.ome.zarrin the same folder (same position ID); two images that would share a copy name are refused (copy_names_collide).relative_pathis the copy's path; the new optional keysource_relative_pathholds the source's path and is written only for such an entry, so every record without OME-Zarr copies is byte for byte as before (tested).significant_bitsis null (OME-NGFF 0.4 has no field). The lock,.partialwrites, reuse, the copy's SHA-256 and the run's checks (conversion_source_changednames the source by its own path) are those of the other copies.plan_conversiontakesprojection,masks_folderandstoreas keywords (the eight-parameter rule).notebook_zarr_copy): Also save a copy as OME-Zarr (in the output folder) in the Folders card of the first screen, unticked; ticking writes nothing. On Axes, the card OME-Zarr copy shows where the copy goes and Write the OME-Zarr copy and continue with it, greyed with its reason until the axis roles are confirmed (or while a pixel-size statement has an error). The copies go to<output>/ome_zarrand are opened as the experiment (scanned and checked again; the user confirms their axes). With Z-stacks the projection card of Notebook: Z-stacks saved as recorded projections from the Axes step; 3-D stacks kept recorded (redesign 3, part 3) #286 writes the projected copies as OME-Zarr (<output>/projected_<method>_zarr). Without thezarrpackage the option is greyed with the reason.Notes for review (owner decisions wanted)
source_relative_pathis added without raising the record version (3): old records read as before, and a v0.5.1 reader given a tree of OME-Zarr copies finds the copies but would look for the sources under the copies' names (a falseconversion_source_changedwarning, nothing worse). Raise the version to 4 if a strict refusal is preferred..or a folder keep applying (same output folder). A size stated for a single image names the image file and must be stated again for the copy (calibration_target_not_foundsays so).projection_zarr_not_supported, unchanged).Tests
tests/test_ome_zarr_copy.py(new): bit-for-bit planes read back through the brick's reader, metadata, record, reuse, same bytes twice, projection as OME-Zarr, changed source, name collision, unchanged records, and the notebook flow through save and run on the copies. Gate counts for every head of the stack are in a comment below.Generated by Claude Code