Skip to content

Universe Viewer

Universe Viewer is an interactive software for the visualization and geodesic analysis of high-redshift astronomical objects.

OverviewOverview

It allows for the production of a conformal map of cosmological structures, more specifically quasars, by taking into account the curvature of the universe. Based on concepts from astronomy and general relativity, it is designed to be a working tool for research in cosmology, facilitating the identification of large-scale structures in comoving space or in a reference space.

This project is based on the concepts developed in the publication Framework for cosmography at high redshift, by R. Triay, L. Spinelli, R. Lafaye.

ScreenshotScreenshot

It is free software, and its source code is available on its GitHub page.

This web version of the software was ported from the the Java version (which is no longer maintained today), with the help of artificial intelligence to speed up the tedious sequences of converting code from Java / Swing / JOGL to JavaScript / Vue.js / Vuetify / Three.js.

I particularly thank Pr. Roland Triay for his help during the design of the Java version of the software, created as part of my Master's training during a research study project (TER), carried out in tandem with Julie Fontaine, in 2008.

Even older versions of a similar software existed, in Fortran and C, based on the same research publication, but they suffered from portability issues.

Map Projection of Objects

The Framework for cosmography at high redshift presents a framework for projecting the studied objects onto a plane, depending on the chosen cosmological parameters and the viewpoint.

These objects are defined by three main characteristics:

  • the right ascension, the first term associated with the equatorial coordinate system, it is the azimuth, the equivalent on the celestial sphere of terrestrial longitude,
  • the declination, the second term, which measures the angle of an object from the celestial equator, it is the elevation, the equivalent of terrestrial latitude,
  • and the object’s redshift, a relativistic effect that allows its distance from the observer to be inferred.

It is therefore from this data that the objects are represented on screen. Initially, the projection onto the reference space was developed for the case of a positive curvature of the universe, then this work was generalized to negative curvature. The calculations were finally extended for representation in comoving space, which abstracts from the expansion of the universe.

Calculation of Comoving Distance

The comoving distance (dimensionless) is denoted τ, it depends on the redshift z of the object concerned and is calculated as follows:

τ(z)=(1+z)11daP(a)

where:

P(a)=λ0a4κ0a2+Ω0a+α0P(1)=1

λ0, κ0, α0, Ω0 are the cosmological parameters:

  • λ0, a cosmological constant standing for vacuum energy,
  • κ0, the curvature parameter, defining the global universe geometry,
  • α0, accounts for the presence of cosmic microwave background photons as sources of gravity,
  • Ω0, the matter density parameter,

and a represents the cosmological scale factor. For an observed object with a redshift z, it is equal to:

a(t)=11+z

This scale factor describes the state of expansion of the Universe at the moment the light was emitted. Today, we have a0=1.

Normalization of Comoving Distance in Curved Geometry

When the comoving space is not flat (κ00), the angular distance is introduced:

τ^=τ|κ0|withκ00

This variable naturally appears in the non-zero curvature spatial metric:

{R=sin(τ^)κ0κ0>0R=sinh(τ^)κ0κ0<0

In the specific case of flat space (κ0=0):

R=τ

R is used to place points in the curved geometry.

Calculation of the Projection onto the Observation Plane

Each cosmological object is represented by a 4D vector in the homogeneous spacetime of the model:

X=(x,y,z,t)

The first three coordinates (x, y, z) represent the spatial position of the object in the 3D embedding space corresponding to the chosen geometry (spherical if κ0 > 0, hyperbolic if κ0 < 0, or flat if κ0 = 0).
The fourth coordinate t represents the conformal temporal component (associated with the comoving distance τ) in the homogeneous spacetime.

The x, y and z coordinates are calculated as follows:

x=Rcos(Decobj)cos(RAobj)y=Rcos(Decobj)sin(RAobj)z=Rsin(Decobj)

where RAobj and Decobj are the right ascension and the declination of the objet.

In reference space, t=τ, and in comoving space:

t=τ|κ0|

The 2D display requires projecting this 4D vector onto an image plane, which represents the plane of the sky according to the viewpoint.

Construction of the Local Observation Basis

The user defines their orientation in the universe using three angles:

  • RA1, the right ascension (azimuth),
  • Dec1, the declination (elevation),
  • Beta, the rotation around the line of sight (roll).

From these angles, three orthonormal vectors are constructed in the 3D Euclidean space:

  • P1: direction of gaze (center of the projection),
  • P2: local horizontal direction,
  • P3: local vertical direction.

These three vectors form a spatial orthonormal basis. In the 4D spacetime of the model, this basis becomes:

E1=(P10),E2=(P20),E3=(P30)

The fourth basis vector is defined as:

E0=(0s)

where:

s={1in the reference space|κ0|in the comoving space

This vector encodes the temporal component of the frame. Its normalization depends on the chosen space (reference or comoving), as this ensures that the projections respect the model's metric.

Projection onto the Image Plane

For an object whose 4D vector is X, its projected coordinates on the 2D plane are:

xproj=XE1=XxE1x+XyE1y+XzE1z+XtE1typroj=XE2=XxE2x+XyE2y+XzE2z+XtE2t

Examples of Projections

Hewitt & Burbidge QSO Catalog

Here are some projections obtained on the Hewitt & Burbidge quasar catalog, composed of 7,236 objects.

The blue area represents the visible universe, the gray line surrounding it is the cosmological horizon.

The white area represents the visible universe, the black line surrounding it is the cosmological horizon.

Front view, positive curvature

Front view, K > 0Front view, K > 0 Our galaxy is at the center.

Edge view, positive curvature

Edge view, K > 0Edge view, K > 0 Our galaxy is on the far right.

Edge view, negative curvature

Edge view, K < 0Edge view, K < 0 Our galaxy is on the far left.

Sky view

Sky viewSky view Here we see what radio telescopes have observed from Earth.

Objects selection

SelectionSelection You can select objects with an additive or intersection selection tool, allowing to accurately select areas from different views.

Selected objects are in green.

Selected objects are in red.

6dF Galaxy Survey

6dF Galaxy Survey catalog is composed of 124,646 objects.

Zoom

ZoomZoom

Here we are in face vue 2, and the projection is zoomed with our galaxy approximately in its center.

Quasars (13th Ed.) (Veron-Cetty+)

This catalog is composed of 133,335 objects.

Coloration en dégradé du redshift

Redshift gradientRedshift gradient

To better appreciate displayed objects redshift, it is possible to give them a color.

Nearest objects from our galaxy are in blue, most distant in red.

Nearest objects from our galaxy are in green, most distant in green.

Distance Between Two Objects

Let x1 and x2 be the directions on the sky of two objects. The apparent angular separation between them is given by:

cosθ12=x1,x23

which can be written explicitly as:

cosθ12=cos(RAobj1RAobj2)cos(Decobj1)cos(Decobj2)+sin(Decobj1)sin(Decobj2)

To compute the geodesic distance between these objects in a space with non‑zero curvature, two cases must be considered:

case k0>0 (spherical geometry),

cosτ^12=cosθ12sinτ^1sinτ^2+cosτ^1cosτ^2τ^12=arccos(cosτ^12),

case k0<0 (hyperbolic geometry),

coshτ^12=coshτ^1coshτ^2cosθ12sinhτ^1sinhτ^2τ^12=arccosh(coshτ^12),

where τ^1 and τ^2 are the angular (geodesic) distances of the objects from the Earth.

The dimensionless comoving distance is then given by:

τ12=τ^12|k0|

In the special case of a flat space, the comoving distance is obtained using the Euclidean law of cosines:

τ12=τ12+τ222τ1τ2cosθ12,

Finally, the comoving distance can be expressed in physical units (Mpc) as:

r=τ12cH0

where c is the speed of light in km/s (299,792.458 km/s) and H0 is the Hubble constant.

Implementation

Here are some technical choices regarding the implementation.

Integral computation

Two ways to compute integrals have been implemented:

Parallel processing

By default, in a web browser, JavaScript runs on the main thread, which also handles the page rendering code. Not only does this loop use only a single CPU core, but intensive computations also freeze the user interface.

We have a large number of objects for which we compute projections based on cosmological parameters. This set of objects can easily be split into several chunks so that processing can be done on multiple cores at the same time.

Parallelization in Universe Viewer uses web workers, which allow us to divide the workload according to the number of available CPU cores. This process is performed in the following files:

  • workerPool.js, which manages the pool of workers, their lifecycle, and their execution for projection calculation,
  • projectionWorker.js, the worker task code that processes a subset of the objects,
  • projection.js, the projection computation functions.

If the number of objects to process falls below a certain threshold, the computation is not parallelized because the overhead caused by the workers management would be counterproductive.

To make the parallelisation more relevant, we are using shared memory between workers and graphical rendering, using SharedArrayBuffer: there is zero data copy since a catalog has been loaded.

If SharedArrayBuffer is unavailable, for example due to security constraint not met, computing is not parallelized.

These optimizations allow UniverseViewer to handle million targets catalogs, as AGN/QSO Value-Added Catalog for DESI DR1, or Million Quasars Catalog, Version 8.


Official Website
GitHub Page
Framework for cosmography at high redshift - R. Triay, L. Spinelli, R. Lafaye (1996), HTML version, et text PDF version
Romberg method for integral computation
Trapezoidal rule for integral computation
Old Java version

Made with ❤️