Scene from "The Martian." Credit: 20th Century Fox

“The Martian” is a box office hit because it fits the tenor of the times. The film is a perfect reflection of the anti-politics-as-usual mood of the U.S. electorate and our craving for genuine heroes. Supporters of presidential candidates Donald Trump and Bernie Sanders could join hands in rallying around this film. It’s so enjoyable that Democrats on Capitol Hill might even be willing to plus up NASA’s budget by $1 billion every year to make the agency as good as it can be — while Republicans decide to close a small tax loophole for the super-wealthy to pay for it.

Heck, why stop at NASA? Why not kill sequestration and make the United States stronger and its citizens better off by raising taxes on those who can most afford it and paring entitlements? It sounds ridiculously ambitious, I know. But after seeing this movie, our elected officials might be moved to aim higher than gridlock. If they don’t, our political dysfunction deficit will grow with sideshow barkers filling the void.

Let’s not nitpick. Spare me the astrophysics. Leave all the improbable plot twists aside. “The Martian” resonates with our hunger for true leadership and acceptance of calculated risk.

We love spaceflight and exploration because we are drawn to stories of talented people who improvise and refuse to give up. We don’t even need humans in deep space to fire our imaginations and sense of wonder, as the flyby of Pluto amply proved. But it helps at the box office when humans in grave peril act with understated heroism far, far away.

This film tips its cap to “Apollo 13,” but Tom Hanks as Jim Lovell is a dullard compared with Matt Damon’s character, astronaut Mark Watney. The folks at NASA have learned a few improvisational tricks, too. “The Martian” clarifies why we have lost interest in the International Space Station and have no time for politicians who bloviate and measure accomplishment in empty gesture. Ditto for disingenuous diplomats who make arrangements with themselves while offering arguments they know to be hollow. (Space diplomacy is not exempt from these pathologies, as the halting progress of an international code for conduct for responsible spacefaring nations attests.)

No politicians and diplomats sully a single frame of this movie. Yes, there’s a NASA director who is risk averse, but the president is completely absent. (What, was Morgan Freeman unavailable to make a wise and noble speech to the nation?) Instead, in a nice plot twist, the Chinese make noble gestures. In real life — yet another symptom of dysfunctional politics — Republicans on Capitol Hill pushed through legislation forbidding bilateral exchanges between NASA and the Chinese space agency.

Ridley Scott, director of “The Martian,” does science fiction as well as anyone. But unlike his 1982 film “Blade Runner,” which was totally suffused with shades of gray and moisture, the scenes in “The Martian” are, with one significant exception, crisp and dry. The landscapes are reminiscent of the panoramas of rugged terrain and endless sand that filled the screen in “Lawrence of Arabia” — this time, through a dull orange filter.

Those drawn to clear night skies, staring into infinity watching for shooting stars and satellite tracks, will love this movie. If this is not already a habit, it could become one after watching “The Martian.”

Michael Krepon is co-founder of the Stimson Center and the author of “Life Lessons: Recovering from Chemo and Serious Illness.”

Michael Krepon is co-founder of the Stimson Center and the author of “Life Lessons: Recovering from Chemo and Serious Illness.”