Skip to main content

Rich Townsend


Faces of Open Source

Rich Townsend

From Stars to Software: Rich Townsend’s Open Source Journey

Before stars revealed their secrets to Rich Townsend, they first had to be analyzed by software.

Now a professor in the Astronomy Department at the University of Wisconsin–Madison, Townsend studies the life and structure of stars through theoretical and computational modeling. Since joining UW in 2009 as an assistant professor—and eventually serving as department chair—he has built a reputation not just for his research, but for his contributions to open source that have helped shape the field of astrophysics.

His specialty? Understanding what stars are made of and how they change over time. In particular, Townsend focuses on stellar oscillations—the rhythmic pulsations that cause stars to flicker and hum, carrying clues about their internal structures. It’s a field that’s seen huge advances in the last two decades, thanks in part to open-source tools like the ones he helped build.

One of Townsend’s major contributions is GYRE, an open-source code that takes a numerical model of a star and predicts the observable frequencies of the star’s oscillations. It then compares it to observations of stars that show brightness fluctuations, a field known as asteroseismology.

But Townsend’s journey to open source began long before GYRE.

During his undergraduate studies in physics, Townsend discovered a passion for open-source software that would shape much of his career. What began with document processing tools quickly grew into a deeper engagement with collaborative coding communities. By the time Linux emerged during his PhD program, he was already fully immersed in the open-source world.

After a stint teaching physics in a small village in Ghana, Townsend released the software he’d developed in graduate school as open source. Soon after, researchers in Germany reached out. They had used his code and wanted to collaborate.

“They said they would like to put my name on their papers,” he said. “Not only is open-source software a community good, it can be good for the person who is writing it in terms of forging new collaborations and making new science happen.”

Partnering with MESA

Bill Paxton, an esteemed computer scientist at UC Santa Barbara, developed MESA—an open-source code for stellar modeling that has since become a cornerstone of astrophysics research. Now used by over 1,000 researchers worldwide, MESA has powered groundbreaking discoveries across the field. Its evolution soon became closely intertwined with Townsend’s GYRE, creating a powerful synergy in the modeling of stellar phenomena.

Initially, many of the support requests Paxton received came from users struggling to compile the code with the tools on their computers. In response, he turned to Townsend for help. Townsend had previously built SDK^2, a software development kit (SDK) he designed for building other SDKs. Within a week, he built an SDK for MESA, a solution that cut support requests from 90% to just 5%.

“GYRE has benefited a lot from its association with MESA because the two have been designed to work together from an early age,” Townsend said.

Now, Townsend is moving GYRE forward—transforming it from a single application into a flexible Python-accessible library. This allows researchers to interrupt and modify calculations step-by-step, vastly expanding its usefulness.

Beyond the Code

But Townsend knows that building software is just the beginning. An additional challenge is documentation. “What makes a project usable is the quality of its documentation and the spirit behind that documentation,” he said.

To support GYRE users, he’s built two detailed guides. A user guide walks newcomers through setup, input files, interpreting output, and running more detailed calculations—“meant to be read, not just referred to,” he noted. A reference guide captures every technical detail, from file formats to data outputs.

Tools like GitHub have made open-source development more collaborative and accessible. Still, Townsend warns that technical and sociological barriers remain—from debugging remotely to the lack of academic recognition for software work. “You don’t get many papers out of writing software. But thousands of papers use that software.”

He worries this misalignment deters early-career researchers from contributing to open-source projects. The result? A “talent drain” driven by traditional academic metrics that favor papers over programming.

Open Source at UW and the Wisconsin Idea

At UW–Madison, the open-source ecosystem is still developing. The new Open Source Program Office (OSPO) is a step forward, but Townsend believes with more institutional support, the community can really blossom. “Open source starts with code, but it grows into communities,” he said. “That’s where real impact happens.”

He envisions UW becoming a hub for open-source development—attracting students, researchers, and funding. “It’s the Wisconsin Idea in action,” he said. “Taking the expert knowledge and software we’ve built here and giving it to the world.”

Advice from a Developer-Scientist

For those interested in open source, Townsend’s advice is practical: start by contributing to existing projects. Learn the ropes. Balance your coding time with academic pursuits like publishing papers.

“There’s a whole range of emotions in open-source development,” he said. “It’s crushing when the code doesn’t work. It’s fantastic when people use it to make new discoveries. But sometimes you realize—you’re in the boiler room writing code, and someone else is steering the ship.”

Even so, Townsend wouldn’t have it any other way. “As long as I’m interested in stars and computers,” he said, “I’ll keep GYRE alive.”