Skip to content

DM-56811: Fit glint trails using perpendicular distances - #484

Merged
isullivan merged 2 commits into
mainfrom
tickets/DM-56811
Oct 27, 2026
Merged

isullivan merged 2 commits into
mainfrom
tickets/DM-56811

Conversation

@isullivan

Copy link
Copy Markdown
Contributor

This fixes a bug where the slope would diverge for nearly vertical lines. The change in the default threshold is partly due to taking the square root of the previous value for comparison, and partly tightening the fit to allow fewer false detections.

@bsmartradio bsmartradio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment about the default and one other one about a logging message.

doc="Maximum perpendicular distance of a source from the line fit to its trail (pixels).",
dtype=float,
default=15.0,
default=2.0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any comments where we explain the default? Not necessary but might be useful for future reading.

RANSACRegressor regressed y on x, so it could not fit vertical trails
and fit steep ones poorly. Its squared_error loss also compared the
squared vertical residual to threshold, making the old default of 15 a
cut of about 3.9 pixels. threshold is now a perpendicular distance in
pixels, with a default of 2 for a tighter fit.
A trail of exactly min_points sources was never searched, because each
of its sources has only min_points - 1 matches.
@isullivan
isullivan merged commit c86a7ac into main Oct 27, 2026
2 of 3 checks passed
@isullivan
isullivan deleted the tickets/DM-56811 branch October 27, 2026 00:03
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