Chart: revive target cross, add nearby-DSO markers + zoom-scaled mag filter#513
Open
brickbots wants to merge 2 commits into
Open
Chart: revive target cross, add nearby-DSO markers + zoom-scaled mag filter#513brickbots wants to merge 2 commits into
brickbots wants to merge 2 commits into
Conversation
…filter The chart screen's target cross was dead code (ui_state.set_target had no callers after the object_details/object_list refactor, so ui_state.target() was always None), nearby catalog DSOs were never plotted, and on a fresh session with no observing list loaded the chart drew no markers at all. This wires the target to selection and adds a nearby-catalog marker layer: - object_details: set_target(self.object) in update_object_info() -- the one chokepoint for open/scroll/eyepiece-cycle -- so the cross tracks the last-viewed object immediately (no push-to, no dwell lag). - chart.plot_markers(): restructured into deduped layers. The target cross is drawn in its own pass at full brightness, independent of chart_dso (so it survives chart_dso=0), with its designator label when on-screen. When chart_dso > 0, the observing-list layer (unchanged) and the new nearby layer render at chart_dso brightness. Deduped by object_id with precedence target -> observing-list -> nearby. - Nearby layer: objects from the active "All Filtered" set within fov*0.75 deg, magnitude-filtered by a zoom-scaled limit (dso_mag_limit: mag 11 @ 5deg -> mag 7 @ 60deg, unknown mags hidden), capped at the brightest 20. The BallTree is rebuilt only when the catalog filter's dirty_time changes or deferred catalogs finish loading -- never per frame; the radius query runs on the new-solve path only. - nearby: add ClosestObjectsFinder.get_objects_within_radius (query_radius, haversine), reusing the existing M/NGC dedup. - main: mark the filter dirty on catalogs_fully_loaded so the chart's index rebuilds to include newly loaded (e.g. WDS) objects. - docs: add the "Target" term to docs/ax/ui/CONTEXT.md resolving the target vs selected-object distinction. Mag-curve endpoints and the radius margin are starting values to tune on-device. Tested: dso_mag_limit endpoints/clamp, get_objects_within_radius correctness, nearby mag/cap/dedup selection (stubbed Starfield), and set_target tracking on open+scroll via the real UIObjectDetails; verified live via the headless app (on-screen cross+label for M57, off-screen pointer for NGC 1, nearby markers rendering). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR #513 revives the chart's target cross and makes nearby-DSO markers actually appear (magnitude-filtered by zoom). The Star Chart section claimed 'markers for nearby objects' but never explained them; add prose covering the object-type symbols, the filter/zoom behaviour and the DSO Display brightness tie-in, plus the last-viewed-object cross with its on-screen designation label and off-screen pointer. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
The chart screen's target cross was dead code —
ui_state.set_target()lost all callers in theobject_details/object_listrefactor, soui_state.target()was alwaysNoneand the cross never drew. Nearby catalog DSOs were never plotted (only a loaded observing list ever was), so on a fresh session with no list loaded the chart looked bare. This PR fixes both and adds a zoom-scaled magnitude filter for the new nearby layer.What changed
ui/object_details.py—set_target(self.object)inupdate_object_info(), the single chokepoint for open / scroll / eyepiece-cycle / display-mode-cycle. The cross now tracks the last-viewed object immediately (not push-to, no 10s dwell lag).ui/chart.py—plot_markers()restructured into three deduped layers:chart_dso(surviveschart_dso=0), with its designator label when on-screen (off-screen shows the existing pointer arrow, no label).chart_dsobrightness.object_id, precedence target → observing-list → nearby.dso_mag_limit(fov): linear mag 11 @ 5° → mag 7 @ 60°, clamped; unknown mags (filter_mag == 99) hidden.fov * 0.75°, mag-filtered, capped at the brightest 20. TheBallTreeis rebuilt only when the filter'sdirty_timechanges or deferred catalogs finish loading — never per frame; the radius query runs on the new-solve path only.nearby.py—ClosestObjectsFinder.get_objects_within_radius()viaBallTree.query_radius(haversine), reusing the existing M/NGC dedup.main.py— mark the filter dirty oncatalogs_fully_loadedso the chart's index rebuilds to include newly loaded (e.g. WDS) objects.docs/ax/ui/CONTEXT.md— new Target glossary term resolving target vs selected object.Testing
dso_mag_limitendpoints/clamp/linearity;get_objects_within_radiuscorrectness + dedup; nearby selection mag-filter/cap/type-filter, dedup precedence, and index-rebuild-only-on-dirty (stubbedStarfield, nohip_main.datneeded).set_targettracks the object on open and scroll via a realUIObjectDetails; existing chart UI-module smoke still passes (realStarfield+ real solve).🤖 Generated with Claude Code