Skip to content

⚡ Bolt: Vectorize zoomed NGC skymap plotting#389

Open
pozar87 wants to merge 1 commit intomasterfrom
bolt-vectorize-ngc-plotting-15741374996618611731
Open

⚡ Bolt: Vectorize zoomed NGC skymap plotting#389
pozar87 wants to merge 1 commit intomasterfrom
bolt-vectorize-ngc-plotting-15741374996618611731

Conversation

@pozar87
Copy link
Owner

@pozar87 pozar87 commented Mar 7, 2026

💡 What: Optimized NGC skymap plotting by vectorizing coordinate access and Skyfield observations, and eliminating redundant catalog parsing.
🎯 Why: Plotting zoomed views with many NGC objects was extremely slow and occasionally crashed due to row-wise iteration over thousands of entries.
📊 Impact: Significant reduction in skymap generation time for dense fields; fixed an AttributeError when processing multiple NGC objects.
🔬 Measurement: Verified with a benchmark script showing successful rendering of ~800 objects in ~0.9s.


PR created automatically by Jules for task 15741374996618611731 started by @pozar87

Optimized `_plot_ngc_on_skymap` by:
1. Replacing slow row-wise `RA`/`Dec` string parsing with direct access to pre-calculated `ra_hours`/`dec_degrees` floats.
2. Vectorizing Skyfield observations using the `Star.from_dataframe` pattern (supported by an updated `NGC.get_skyfield_object`).
3. Using vectorized Numpy access for position vectors (`.position.au`).
4. Fixed a bug where planetary targets caused crashes in zoomed skymaps.

These changes significantly improve skymap generation performance in dense fields and eliminate a known AttributeError.

Co-authored-by: pozar87 <9629954+pozar87@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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