SpiralMap: A Python library of the Milky Way's spiral arms

SpiralMap is a Python library that compiles nine major models of the Milky Way's spiral arms, enabling users to extract their 2D traces and visualize them in various coordinate frames and tracers.

Abhay Kumar Prusty, Shourya Khanna

Published 2026-03-03
📖 4 min read☕ Coffee break read

Imagine the Milky Way not as a blurry smear of light in the night sky, but as a giant, swirling city. For decades, astronomers have been trying to draw a map of this city, figuring out where the "downtown" (the bulge), the "suburbs" (the disc), and the "highways" (the spiral arms) are located.

But here's the problem: Different astronomers use different tools to see the city. Some use radio telescopes to spot gas clouds, others use optical telescopes to count stars, and some look for specific types of pulsing stars. Each tool gives a slightly different map. Sometimes these maps agree, and sometimes they look like they were drawn by different cartographers who never talked to each other.

Enter "SpiralMap."

Think of SpiralMap as the ultimate GPS app for the Milky Way, but instead of giving you turn-by-turn directions to the nearest coffee shop, it helps you overlay different historical maps of the galaxy's spiral arms onto a single, clean screen.

Here is the simple breakdown of what this paper is about:

1. The Problem: Too Many Maps, Too Much Confusion

Imagine you are trying to plan a road trip across a country. You have a map from 1992, a map from 2006, and a brand new map from 2024.

  • The 1992 map says the highway goes through the mountains.
  • The 2024 map says it goes through the valley.
  • If you want to compare them, you have to manually draw them on top of each other, which is tedious, confusing, and prone to errors.

In astronomy, researchers often want to compare where the spiral arms should be (according to a specific model) with where they actually see stars or gas. Doing this manually for every new study is a "cumbersome exercise," as the authors put it.

2. The Solution: The "Universal Translator"

SpiralMap is a free, open-source software library (written in Python) that acts as a universal translator. It takes all these different, messy maps from various scientific papers and standardizes them.

  • It speaks every language: Whether the original data was based on radio waves, dust, or specific types of stars, SpiralMap converts it into a format you can easily use.
  • It has two views: You can look at the galaxy from the perspective of the Sun (Heliocentric) or from the center of the galaxy (Galactocentric). It's like switching from a "street view" to a "satellite view" instantly.
  • It's a library of 9 major models: The current version includes maps based on everything from gas clouds (HI) to giant molecular clouds and even pulsing stars (Cepheids).

3. How It Works (The "Magic" Trick)

The authors show that with just a few lines of code, a scientist can:

  1. Pick a model: "Let's look at the 2024 map based on Cepheid stars."
  2. Pick an arm: "Show me the 'Sag-Car' arm."
  3. Plot it: The software instantly draws that arm on a graph, either as a straight line (Cartesian) or a curve (Polar), ready to be compared with new data.

4. Why Does This Matter? (The "Science Case")

The paper gives a great example of why this is useful. Imagine astronomers built a 3D model of where stars should be in the Milky Way. When they looked at the real data, they found "residuals"—places where the stars didn't match the model.

By using SpiralMap, they could instantly overlay the spiral arm maps on top of these "mismatch" spots. It was like putting a transparent sheet with the highway map over a traffic report. Suddenly, they could see: "Ah! The traffic jams (extra stars) are happening exactly where the spiral arms are!"

This helps scientists understand how the galaxy's structure influences the movement and birth of stars.

The Bottom Line

SpiralMap is a tool that saves astronomers hours of manual drawing and math. It gathers the best "maps" of our galaxy's spiral arms from the last 30 years of research, puts them in one neat package, and lets scientists easily compare them to see how the Milky Way really works.

It's not just a map; it's the Google Earth for the Milky Way's spiral structure, making it easier for anyone to explore the shape of our home galaxy.