Difference between revisions of "GW150914 VisIt Tutorial"

From Einstein Toolkit Documentation
Jump to: navigation, search
Line 32: Line 32:
 
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.
 
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.
  
[[Image:vt-2.png]]
+
[[Image:Vt-2.png]]
  
[[Image:https://bitbucket.org/repo/Xo6dR8/images/4072708075-6.png]]
+
[[Image:vt-3.png]]
  
[[Image:https://bitbucket.org/repo/Xo6dR8/images/454281865-7.png]]
+
[[Image: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):
 
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):

Revision as of 01:18, 14 June 2016

Visualizing the spacetime 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.

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:

1. 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; 2. 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.

Vt-2.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):

File:https://bitbucket.org/repo/Xo6dR8/images/1378394379-8.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.

[[Image:a.png](https://bitbucket.org/repo/Xo6dR8/images/2356284225-a.png]]

File:https://bitbucket.org/repo/Xo6dR8/images/720319941-9.png

File:https://bitbucket.org/repo/Xo6dR8/images/2675996695-11.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](https://wci.llnl.gov/simulation/computer-codes/visit/manuals).

File:https://bitbucket.org/repo/Xo6dR8/images/564420790-p4.png File:https://bitbucket.org/repo/Xo6dR8/images/1025209733-horgw.png File:https://bitbucket.org/repo/Xo6dR8/images/4146906065-hor.png