Skip to content

App beta backprop - #51

Merged
bogsdarking merged 5 commits into
devfrom
app-beta-backprop
Jun 3, 2026
Merged

bogsdarking merged 5 commits into
devfrom
app-beta-backprop

Conversation

@bogsdarking

Copy link
Copy Markdown
Owner

Added

  • Concavity penalty for the L2 annotation cost function. The optimizer can occasionally
    converge to a physically wrong, inverted arc — a failure mode on off-apex images or with
    loose parameter bounds. The penalty detects this by checking whether the predicted arc
    curves in the correct direction relative to its chord, and adds a large cost when it does
    not. Enabled by default; configurable via concavity_penalty (bool) and
    concavity_penalty_scale (float) kwargs in fit_arc(). The correct curvature direction
    is auto-detected from theta_z, so non-standard viewing geometries (e.g. camera pointing
    away from nadir) are handled correctly without any user configuration.

Changed

  • Sagitta pre-fitter (fit_sagitta) upgraded from a 2-D to a 3-D optimisation: the arc
    apex x-position is now a free parameter alongside curvature and camera angle. This removes
    a systematic radius bias on asymmetric arcs whose true apex falls outside the annotated
    region.
  • Sagitta pre-fitter now seeds the differential-evolution warm-start with a geometrically
    computed camera angle (arccos(r / (r + h))) rather than the raw optimiser estimate,
    avoiding a near-degeneracy that could misguide the final fit.

@bogsdarking bogsdarking self-assigned this Jun 3, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.67925% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
planet_ruler/fit.py 88.67% 4 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@bogsdarking
bogsdarking merged commit acf653a into dev Jun 3, 2026
6 checks passed
@bogsdarking
bogsdarking deleted the app-beta-backprop branch June 3, 2026 15:18
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