Repository navigation
Z projection 4/6: convert --project on the command line (part of #176) - #215
Merged
Merged
Conversation
No default method, a zero-based half-open slice range for the whole experiment, the next commands with a new output folder (the projected copies are a different source), and z_stack_not_supported now names the command instead of Fiji. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
This was referenced Nov 8, 2026
guijacquemet
changed the base branch from
claude/z-projection-convert
to
main
November 8, 2026 05:17
An error occurred while trying to automatically change base from
claude/z-projection-convert
to
main
November 8, 2026 05:17
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.
Stacked on #213 (itself on #212 and #211). The base is
claude/z-projection-convert, so the diff shows only this PR; GitHub retargets as the earlier ones merge.What changed
Fourth PR of the plan for #176 (design: MorphoFeature
docs/restart/designs/pp176-z-projection-design-2026-11-07.md; owner answers of 2026-11-07). The command line of the recorded Z projection:--projecthas no default method:--projectalone,--project medianor--project MAXis a parser error ("--project needs a method: max, mean or sum. There is no default: choose the one that fits your analysis."), exit 2, nothing read.--z-range START:STOPis zero-based and half-open for the whole experiment (4:5is the single slice 4); it is checked at parse time (whole numbers, 0 <= START < STOP); without--projectit is refused (exit 2); a range an image does not have isprojection_z_range_outsidenaming the short images (exit 1, nothing written).--masks, or the one the run recorded in--output) is scanned from headers for 3-D masks, which stop the projection; 2-D masks do not.<--to>_MorphoBricks_Preprocessing(the projected copies are a different source, a new description lineage; the text says the design and the pixel sizes are entered again), with--axesof the copies (CYX).--outputstill names where the runs on the originals recorded their masks.z_stack_not_supportednow names the command instead of Fiji: "Make 2-D projected copies first: convert EXPERIMENT --to FOLDER --axes ROLES --project max|mean|sum (the originals are only read), then run on the copies; or exclude these images." (check,runandconvertwithout--projectstill refuse a Z-stack, so nothing is projected implicitly.)ConversionResult.projectioncarries the record's method and range. Two parser-building helpers keepadd_convert_parserunder the 60-line rule.z_stack_not_supportedrow), contract §2, README, CHANGELOG.Regression test
tests/test_cli_projection.py(16 tests). The regression istest_convert_project_makes_copies_the_run_accepts: without--projecta Z-stack is refused with the new message and nothing is written; with--project max --z-range 1:4the copies equalstack[1:4].max(axis=0), the record saysmax (1, 4), the printedcheckandruncommands name the new folder and--axes CYX, and following them (check,design --confirm-all,run) writesplane_histograms.csv. Others: the parser errors,--z-rangeforms, a range that does not fit, 3-D vs 2-D masks, another method into the same folder.unrecognized arguments: --project max, and the old hint).tests/test_2d_planes_only.pyasserted the old hint ("Z Project"); it now asserts--project max|mean|sum.Checks
python tools/check.py: Ruff, formatting and code rules clean;4335 passed, 4 skipped, 2 warnings. The base (#213) gives4319 passed, 4 skipped, 2 warnings; the difference is the 16 new tests. The 4 skips are the pre-existing ones (case-insensitive file system x3, file modes x1).Not in this series yet
projection,RunInputs.projection,masks_on_projected_images, report text) is not started. It needsrun_inputs.py, the manifest and the run modules that the open PRs Re-pin the vendored Spec to b197ac1; reserved names apply to used_ids.channels #208, Run integration of the published experiment description (Stage 1, PR 11) #209 and Semantic RunInputs from a published description (Stage 1, PR 12) #210 are changing (Run integration of the published experiment description (Stage 1, PR 11) #209 movesRunInputscode into new modules); doing it now would conflict. It should follow once those merge.projection_zarr_not_supported, see Z projection 3/6: plan and write projected copies (part of #176) #213).Series: 1 pure module (#211), 2 record v3 (#212), 3 plan and write (#213), 4 CLI (this PR), 5 run side, 6 notebook card.
Generated by Claude Code