Skip to content

⚡ Bolt: Optimize star coordinate extraction in skymap plotting#793

Merged
pozar87 merged 1 commit into
masterfrom
bolt-star-ensure-coords-opt-2143935972530827289
Jun 16, 2026
Merged

⚡ Bolt: Optimize star coordinate extraction in skymap plotting#793
pozar87 merged 1 commit into
masterfrom
bolt-star-ensure-coords-opt-2143935972530827289

Conversation

@pozar87

@pozar87 pozar87 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

💡 What: Replaced pandas.Series.apply with list comprehensions for extracting coordinates (RA, Dec) and magnitudes from Pint Quantities in the star plotting pipeline (apts/plotting/skymap_objects/stars.py).

🎯 Why: apply has significant overhead for simple attribute access on object-type columns in large DataFrames. List comprehensions over .values are a more efficient way to perform these row-wise operations in Python.

📊 Impact: Measured a ~1.2x speedup in the _ensure_coordinate_columns function. This makes skymap generation faster, especially when processing the full Hipparcos catalog or large sets of bright stars.

🔬 Measurement: Verified using a timeit micro-benchmark on 10,000 mock Pint objects. Functional correctness was confirmed by running the full unit test suite (after compiling localization catalogs).


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

Replaced pandas `apply()` with list comprehensions for faster attribute
extraction from Pint Quantities in `_ensure_coordinate_columns`.
This provides a measurable performance boost when processing large
star catalogs for skymap generation.

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

Copy link
Copy Markdown
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.

@pozar87 pozar87 merged commit 30389d2 into master Jun 16, 2026
1 check failed
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