Get Started with WWT 2022: For Developers

WWT 2022 isn’t just a single application — it’s a whole toolkit for creating rich, interactive astronomy visualization applications. If you’ve got development skills, your imagination is the only limit!

Control the WWT Research App

You can accomplish a lot by embedding the WWT research app as an <iframe> in a larger web app and then controlling it through its JSON message API. This API is used by the WWT JupyterLab extension to connect pywwt to the app.

To see what’s possible, browse the API documentation of the @wwtelescope/research-app-messages NPM package, which defines the message interface used by the app.

Build a Custom WWT-Powered Web App

If you need even more precise control over your web app user experience, you can create a fully custom app built on the WWT engine. The recommended way to do this is using TypeScript and the Vue framework with the Vuex state management system. That’s how the WWT embed and the research app are implemented.

The underlying WWT code is made available as a suite of NPM packages whose APIs are documented here. To get a sense of how these APIs can be used, browse the source code to the WWT embed or the research app.

Build a WWT-Powered Desktop App in Python

If you’re interested in staying on the desktop, you can incorporate WWT into Python-based Qt apps with pywwt. This interface is used by the desktop version of glue, for instance.

Check out the pywwt.qt API documentation to see what’s possible.

Next Steps

In most cases, you’ll also want to include custom data sets in your custom WWT apps. Never fear — plenty of data processing libraries are available as well! The primary WWT data processing tool is the Toasty Python package, which is structured as a highly modular library that can work with many kinds of data. Underlying it is the wwt_data_formats Python package, which handles I/O on a variety of WWT data formats.

You can find the Toasty installation instructions here and those for wwt_data_formats here.

Getting Help

If you run into any issues, we recommend asking in the #wwt channel of the Astropy Slack workspace. If you’re not already a member, you can get an Astropy Slack account in one simple step.

Go back to the WWT 2022 edition notes.


Copyright 2019-2023 the .NET Foundation. WorldWide Telescope is a fiscally sponsored project of NumFOCUS, a nonprofit dedicated to supporting the open-source scientific computing community.