Repository navigation
fix(terms): actin seeds, --term-axis-shift and batched tilt-series reconstructions - #5
Merged
Merged
Conversation
Since 682c106 the seed rule compared the halves_agree column with `is True`. That is an identity test on a pandas Series, so it is always False and the term route (actin) marked no seed at all; the reference then averaged every filament instead of the seeds. `_seed_mask` applies the rule elementwise to the observations and the decoys alike, and a missing halves_agree is never a seed. Tilt-series reconstructions were one job per tilt series, so a dataset with a single tilt series ran on one worker. `_reconstruction_jobs` splits the pending segments into batches of at least 32 across the workers, even within one tilt series; each batch keeps its own scratch directory, and cached segments are left out before balancing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The term route refines each segment's axis offset over a fixed +-12 A search using low-band terms only. `--term-axis-shift` makes that range configurable, passed through as TermConfig.max_shift, and keeps 12 A as the default. A non-default value on the cylindrical route is a usage error rather than silently ignored. summary.json now records the full TermConfig the run used, so a result can be traced back to its search range and seed rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Term route only, which actin uses. The microtubule cylindrical route is not touched.
Fixes
halves_agree is Truewas tested on a pandas Series, which is never true. So the term route marked no seed, no actin filament gotpolarity_known, the default--seeds-onlywrote no registration or dense picks, andterm_averagefell back to averaging every filament._seed_masknow tests the column element-wise and handles both object and nullable boolean columns.--source tiltseriessegments are split into batches across--workers, even within one tilt series. Each batch has its own scratch directory, and cached segments are dropped before balancing.Feature
--term-axis-shift, default 12 A, sets the term route's axis-offset search. A non-default value on the cylindrical route is an error.Tests
tests/test_seed_rule.py,tests/test_term_cli.pyandtests/test_tiltseries_batches.py: 7 new tests.🤖 Generated with Claude Code