Difference between revisions of "GW150914 VisIt Tutorial"

From Einstein Toolkit Documentation
Jump to: navigation, search
(Opening the databases)
(add link to data for download)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
=Visualizing the spacetime of GW150914 with VisIt=
 
=Visualizing the spacetime of GW150914 with VisIt=
 +
<!-- This page is not an orphan, it is linked to from the ET gallery example on BBH: https://einsteintoolkit.org/gallery/bbh/index.html -->
  
 
==Installing VisIt==
 
==Installing VisIt==
Line 19: Line 20:
 
==Opening the databases==
 
==Opening the databases==
  
Once the software is running, the button <tt>Open</tt> can be used to open files from the simulation.
+
Once the software is running, the button <tt>Open</tt> can be used to open files from the simulation. If you did not run the simulation yourself, you can obtain a copy of the output data sufficient for this tutorial from [http://dx.doi.org/10.5281/zenodo.155394 Zenodo].
  
Make sure to select Open file as type: CarpetHDF5, otherwise VisIt will get confused and try to load the data using another format, and may crash.
+
Make sure to select Open file as type: CarpetHDF5, otherwise VisIt may try to load the data using another format, and may crash.
  
 
[[Image:vt-1.png]]
 
[[Image:vt-1.png]]

Revision as of 14:56, 31 August 2018

Visualizing the spacetime of GW150914 with VisIt

Installing VisIt

The 3D data output by the simulation (such as the metric, the extrinsic curvature, the curvature, and the apparent horizons) can be visualised with the VisIt package. VisIt can be obtained at the VisIt download page.

The simplest way to install VisIt is to download the ready-made executable for the right architecture (Linux, Mac OS X, and Windows are available). On Linux, this will download a tarball containing a directory

visit<version number>.<architecture>

Changing to this directory, the command

bin/visit

will launch the software.

On Mac OS X, a .dmg file will be downloaded first, containing the VisIt.app executable.

Opening the databases

Once the software is running, the button Open can be used to open files from the simulation. If you did not run the simulation yourself, you can obtain a copy of the output data sufficient for this tutorial from Zenodo.

Make sure to select Open file as type: CarpetHDF5, otherwise VisIt may try to load the data using another format, and may crash.

vt-1.png

If you are using the Simulation Factory to launch and manage the run, the data will be output under the directory <basedir>/<simulation name>/output-<nnnn>/<parfile name>, where <nnnn> is the number of the restart. There are essentially two types of files that can be visualised with VisIt:

  • Files from the thorn CarpetIOHDF5, with .h5 extension, which will be read by the CarpetHDF5 plugin in VisIt and represent the 1D, 2D, or 3D configuration of a specific field, on a number of constant-time spaces;
  • Files from the thorn QuasiLocalMeasures, with .vtk extension, which are read natively by VisIt and represent the shape and properties of relevant 2D topological spheres, such as the apparent horizons, also at different times;

A visualization example

Let us, for instance, plot the configuration of the conformal factor ML_BSSN::phi on the xy plane, and superimpose the apparent horizon shapes. We first need to load the data for the conformal factor on this plane, using the Open button and selecting the correct path for the database phi.*.xy.h5. We can then generate the plot by clicking Add > Pseudocolor > ML_BSSN--phi. If the Auto Apply feature in VisIt is not selected, we need to click on Draw to make the plot appear.

Openfiles.png

vt-3.png

vt-4.png

If necessary, we can tune the colormap until the plot looks like the one below (this result has been obtained by selecting the Plot Attributes > Pseudocolor... menu and choosing a Skew value of 1000):

vt-5.png

Next, we can plot the horizon surface of the first black hole by opening the surface01_*.vtk database, and using Add > Mesh > mesh. We can similarly add the second horizon by following the previous steps for the surface02_*.vtk database.

vt-6.png

vt-7.png

vt-8.png

The plot depicts now the system’s conformal factor and horizons at t=0. To cycle through subsequent times, we need to create a database correlation first, telling VisIt how to match the time indices in the phi.*.xy.h5, surface01_*.vtk, and surface02_*.vtk. To create the database, we need to use the menu Controls > Database correlations, select New…, select the three databases on the left window (Sources) and move them right using the right arrow. Once the databases appear in the Correlated sources window, we can name the correlation, select Cycle for the correlation method, and click Create database correlation. Once the correlation is created, an Active time slider menu will appear just below the Active Source menu, indicating that our correlation is now controlling the slider; moving this slider will then step through the three databases simultaneously, making sure that all the plotted data refers to the same time coordinate.

VisIt provides a number of tools and options to tune this visualization, output it to image or movie files, save and restore sessions, remote visualization, and so on. More information can be found on the Manuals page.

vt-9.png vt-10.png vt-11.png