Skip to content

Remove dead user_fixed_scale save/restore in SkyFit2 acquisition paths - #960

Open
GlassOnTin wants to merge 1 commit into
CroatianMeteorNetwork:prereleasefrom
GlassOnTin:remove-dead-fixed-scale-saverestore
Open

Remove dead user_fixed_scale save/restore in SkyFit2 acquisition paths#960
GlassOnTin wants to merge 1 commit into
CroatianMeteorNetwork:prereleasefrom
GlassOnTin:remove-dead-fixed-scale-saverestore

Conversation

@GlassOnTin

Copy link
Copy Markdown

Follow-up to @dvida's note on #951 — the NN auto-recalibration callers save/restore user_fixed_scale but never forward it, so the "Fixed scale" checkbox has no effect on automatic recalibration.

What I found (all four flagged sites)

  • SkyFit2.tryQuickAlignment and SkyFit2.getInitialParamsAstrometryNet save self.fixed_scale → user_fixed_scale and restore it, but never modify self.fixed_scale in between (they do legitimately force + restore distortion_typeradial5-odd, refraction, equal_aspect, etc.), and their fitAstrometry(use_nn_cost=True) calls don't pass it.
  • AutoPlatepar.py:600/693 fit with first_platepar_fit=True and have no fixed_scale handling at all.

All four are first_platepar_fit=True — initial acquisition, where the scale must be free to be determined. Forwarding fixed_scale=True there would pin the scale to a rough seed and degrade acquisition. So not honoring the checkbox during acquisition is correct (as you suspected), and the user_fixed_scale save/restore is simply dead code that misleadingly reads like unfinished wiring.

Change

Remove the dead user_fixed_scale save (×2) and restore (×3). No behavior changeself.fixed_scale is never read or written in these blocks. The checkbox continues to be honored where it applies: refinement via fitPickedStars, which already forwards fixed_scale=self.fixed_scale.

Note

user_fit_only_pointing in the same two methods is saved/restored but likewise never modified — the identical dead pattern. Happy to drop that too, or — if you'd actually prefer the scale held during acquisition when the box is checked — to instead finish the wiring (forward it into these NN calls). Just say which shape you'd like.

🤖 Generated with Claude Code

tryQuickAlignment and getInitialParamsAstrometryNet save and restore
self.fixed_scale around their work, but never modify it in between and never
forward it into their fitAstrometry(use_nn_cost=True) calls -- so the pair is
dead code that reads like unfinished "Fixed scale" wiring.

Not forwarding it is correct, not a bug: both methods (and the AutoPlatepar
NN callers) fit from scratch with first_platepar_fit=True, i.e. initial
acquisition, where the scale must be free to be determined. Pinning it there
would degrade acquisition when the box is checked. The "Fixed scale" checkbox
is honored where it belongs -- refinement via fitPickedStars, which already
passes fixed_scale=self.fixed_scale.

Remove the dangling save/restore so the code matches the intent. No behavior
change (fixed_scale was never used in these blocks).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant