Skip to content

Add new default ellipse estimation method for beam mask using Sobel filter - #13

Merged
mgiammar merged 3 commits into
Lucaslab-Berkeley:mainfrom
mgiammar:beam-mask-sobel-edge-fit
Oct 28, 2026
Merged

mgiammar merged 3 commits into
Lucaslab-Berkeley:mainfrom
mgiammar:beam-mask-sobel-edge-fit

Conversation

@mgiammar

Copy link
Copy Markdown
Member
  • feat: beam mask estimation with Sobel edge fitting
  • fix: low-pass filter cutoff correction

@jdickerson95

Copy link
Copy Markdown
Contributor

Remove 3.10 from the CI to get the tests passing.
Is there any reason to keep otsu or should we just have sobel?

@mgiammar

Copy link
Copy Markdown
Member Author

No reason to keep otsu. There is no backwards compatibility issues other than the "method" field in the configuration becoming invalid. Nothing emitted as results are spesific to otsu.

@mgiammar
mgiammar force-pushed the beam-mask-sobel-edge-fit branch from d5fe48d to e0def6e Compare October 21, 2026 00:26
The Sobel edge-ray fit replaces Otsu thresholding entirely.

- Remove low_pass_filter, threshold_otsu and fit_ellipse from
  ripple.core.beam_mask, and the scikit-image dependency they needed.
- BeamMaskConfig.threshold_method now only accepts "sobel"; the Otsu-only
  low_pass_resolution field is removed.
- estimate_beam_mask drops its low_pass_resolution and device arguments.
- BeamMaskResult.n_edge_points and n_inliers are now required ints.
- BeamMaskResult.threshold_method is kept so downstream stores still get
  a value.
- Manager tests use a Sobel-sized synthetic movie (8 A/px) instead of the
  64x64 Otsu-only fixture.

BREAKING CHANGE: configs that set threshold_method="otsu" or
low_pass_resolution no longer validate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mgiammar

Copy link
Copy Markdown
Member Author

@jdickerson95 have removed the otsu paths, though this will make some configs/results incompatible with the newer version. Is ok since both un-released and in development.

@mgiammar
mgiammar merged commit 6a1ea0e into Lucaslab-Berkeley:main Oct 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants