Skip links

SimSpin

Coming Soon.

Portfolio

Interactive galaxy simulations; from R-package to re-deployable web app

An interactive tool for visualising galaxy simulations in the browser using the SimSpin R package, enabling the dynamic exploration and visualisation of theoretical galaxies (and/or downloading .fits files for offline use).

SimSpin was awarded development time through the ADACS merit allocation program, to deliver a performant web-application to access interactive outputs from the SimSpin R package. 

Client

Astronomical Research Community

Product

Scientific Tool

Funding

ADACS

URL

datacentral.org.au

SimSpin is an R package that inputs a simulated galaxy (from either a cosmological hydro-dynamical or N-body+semi-analytic simulation) and produces a mock-observed data cube in the style of an Integral Field Spectrograph (IFS) to facilitate comparisons with real IFS observations.

Here we present a performant React Single Page App communicating asynchronously with a RESTful API (built with django-rest-framework ) to access the SimSpin package. The react app is written in Typescript using Material-UI components, transpiled with webpack + BabelJS. Django-webpack-loader consumes the output generated by webpack-bundle-tracker to serve the generated js bundles in django directly. The api has 81% test coverage, including integration tests with the SimSpin R package.

The api handles requests asynchronously, passing each task to celery workers and alerting the user via email once their data products are complete.

The project is containerised by docker-compose into six services (web, db, redis-cache, celery-workers, celery-node, celery-beat), such that the project is easily re-deployable. 

The app is asynchronous, allowing users to submit queries and receive an email notification when the data products are ready for retrieval.

The app allows for instant data exploration via a dedicated viewer, with multiple colour maps and image scaling functionality right in the browser. The fits header is available and users are able to load multiple file extensions into the viewer.

A RESTful api provides programatic data access, an in both the app and api, authenticated users can re-visit previous queries and share results with others (authenticating via Data Central’s CAS service, which then generates JWTs for communication with the React app).

The API is fully documented, and comes with an API Schema (adhering to the OpenAPI Specification) to aid users in calling the API from other services.

Checkout the tool at simspin.datacentral.org.au.

The SimSpin app removes the barrier of entry for novice astronomers (no R installation required, minimal tool understanding, instant data visualisation), providing an accessible and time-saving tool for simulated galaxy visualisations.

 

Furthermore, the project configuration is forkable for new projects with similar requirements (scientific package generating data products accessible via a RESTful asynchronous api and interactive front-end web app with integrated CI and celery task management). We plan to use this system for future similar projects.

This website uses cookies to improve your web experience.