JavaScript has had a hand in providing the images of James Webb Space Telescope


It turns out that JavaScript, the programming language that web developers and users alike love to complain, helped deliver the stunning images beamed back to Earth by the James Webb Space Telescope. And no, I don’t mean that in a snappy way, like that the… website NASA hosts them on uses JavaScript (it does). I mean the actual telescope, arguably one of mankind’s greatest scientific achievements, is largely controlled by JavaScript files. Oh, and it’s based on a 2002 software development kit.

According to a manuscript (PDF) for the JWST’s Integrated Science Instrument Module (or ISIM), the software for the ISIM is controlled by “the Script Processor Task (SP), which executes scripts written in JavaScript upon receipt of a command to to do.” The actual code responsible for turning those JavaScripts (NASA’s phrasing, not mine) into actions can execute 10 at a time.

The script processor actually performs the tasks, but gets instructions on what to do from the JavaScripts.
Schedule: NASA

The manuscript and the newspaper (pdf) “JWST: Maximizing Efficiency and Minimizing Ground Systems,” written by Ilana Dashevsky and Vicki Balzano of the Space Telescope Science Institute, describes this process in detail, but I’ll simplify it a bit to save you the pages of reading . The JWST has some of these pre-written scripts for performing specific tasks, and scientists on the ground can tell it to perform those tasks. When they do, those JavaScripts are interpreted by a program called the script processor, which then contacts the other applications and systems it needs based on what the script asks for. The JWST doesn’t use a web browser in which JavaScript directly controls the mid-infrared instrument – it’s more like a manager gets a list of tasks (the JavaScripts in this example) to do and delegates it to his team.

The JavaScripts are only part of the puzzle, but they are an important one.
Schedule: NASA

The JavaScripts are still terribly important though – the ISIM is the set of instruments that actually take the pictures through the telescope, and the scripts control that process. NASA calls it “the heart of the James Webb Space Telescope.”

So it seems a bit odd that it uses such an old technology; according to Dashevsky and Balzano, the language in which the scripts are written is called Nombas ScriptEase 5.00e. According to Nombas’ (now defunct) website, the last update to ScriptEase 5.00e was released in January 2003 – yes, almost two decades ago. There are those who can vote who weren’t born when the software that controls some of the JWST’s most vital instruments came out.

This knowledge is bubbling up on the internet in Hacker News and Twitter threads for years, but it still surprised quite a few of us here The edge once it really clicked. At first glance, it seems odd that such a vital (not to mention expensive) piece of scientific equipment would be controlled by a very old version of a technology not exactly known for being robust.

However, after thinking about it for a while, the age of the software makes a little more sense – while the JWST launched in late 2021, the project has been in the works since 1989. When the telescope was built started in 2004ScriptEase 5 would have been only about two years old, with launched in 2002. That’s actually not particularly old, since spacecraft are often powered by proven technology rather than the latest and greatest. Due to the length of time it takes projects like the JWST to (literally) get off the ground, things that had to be locked early can seem outdated by more conventional standards as launch day rolls around.

It’s worth noting that, like the project itself, these documents describing the JWST’s JavaScript system are quite old; that of Dashevsky and Balzano is undated but came out in 2006, according to ResearchGateand the ISIM script is from 2011. (Seems to have been there) a version published in 2010, but the one I read cites articles published in 2011.) It’s always possible that NASA could have changed the scripting system since then, but that seems like a pretty big undertaking that would have been mentioned somewhere. Also, while NASA didn’t reply to The Verges request for comment, this JWST documentation page published in 2017 mentions “event-driven science operations,” which is pretty much exactly how the docs describe the JavaScript-based system.

This knowledge base also contains a few more details about: the telescope’s 68 GB SSD, and says it can hold anywhere from 58.8 to 65 gigabytes of actual scientific data. Wait, did I forget to mention that? Yes, this telescope’s solid-state drive has about the same capacity as the one available in the original 2008 MacBook Air.

Anyway, we are not here to talk about the storage of the JWST. I feel like the big question right now is: why javascript?? Sure, there’s probably a little more apprehension about the language now than there was when the project’s engineers selected technology for the project, but NASA is famous among some programmers for are strict programming guidelines – what’s the point of using web-like scripts instead of more traditional code?

Well, NASA’s paper says this way of doing things “gives operations personnel greater visibility, control, and flexibility over telescope operations,” allowing them to easily change the scripts “while learning the ramifications and subtleties of operating the instruments.” Basically, NASA works with a bunch of files written in a somewhat human-readable format – if they need to make changes, they can just open a text editor, a lot from ground testing and then send the updated file to the JWST. It’s certainly easier (and therefore probably less error-prone) than having every program written in secret code that you would have to recompile if you wanted to make changes.

A “simplified” diagram of the architecture from the document Maximizing Efficiency.
Image: Space Telescope Science Institute

If you’re still concerned, keep in mind that the Space Telescope Science Institute document mentions that the script processor itself is written in C++, which is known as… well, the kind of language you’d want to use if you were programming a spacecraft. And it obviously works, right? The photos are incredible no matter what kind of code was used to generate them. It’s a fun bit of trivia, though — next time you curse the modern web since you’re so slow and want someone to just blast JavaScript into space, you can remember that NASA basically did that.


Please enter your comment!
Please enter your name here