Visualizing Shapes Datasets
A goal of the Computational Nanophotonics group is to "carry out realistic theory, modeling, and simulation of light interacting with tailored architectures of metal nanoparticles and hybrid systems."  Understanding the data generated by numerical simulations is an important component of this goal. We developed a plugin for the Rocketeer Suite of 3D visualization tools  to provide parallel, scalable visualization support for nanophotonics datasets. This wiki contains documentation on building and using all components of the Rocketeer Suite, including the HDF5  and Tae-Woo text file plugins, and documentation on the underlying plugin framework, which enables the programmer to develop his/her custom reader plugin.
Initial documentation written by Peter Schmitt (firstname.lastname@example.org)--summer Givens associate working with Boyana Norris in Argonne's Mathematics and Computer Science Division.
- 1 Rocketeer Suite
- 2 Why Bother with Rocketeer? Aren't there other existing Visualization tools?
- 3 Shapes Data Layout
- 4 Acknowledgments
- 5 External Links
The Rocketeer Suite is a rich set of visualization tools built on the Visualization Toolkit, which was originally developed to analyze numerical results from rocket simulations. There are three major components of Rocketeer: single-processor desktop visualization (Rocketeer); multi-processor batch-visualization (Voyager), which is ideal for generating animations; and a client-server renderer to render data files that would be impractical on a single processor (Apollo/Houston). Originally developed by The Center for Simulation of Advanced Rockets, the Rocketeer Suite provides a platform to visualize any dataset via a Rocketeer reader plugin. With the addition of user-developed reader plugins, the careful programmer can extend Rocketeer to visualize virtually any 2d or 3d scientific dataset. We developed a file reader plugin to load nanophotonics data generated by Shapes (built on top of Chombo), stored in the HDF5 (Hierarchical Data Format, version 5) file format, which is compatible with Chombo.
Rocketeer (desktop visualization)
Rocketeer is the serial visualization component of the Rocketeer Suite. Built on top of the Visualization Toolkit and wxWidgets, Rocketeer has a simple user-interface to let the application scientist interact with 3D scientific datasets. Documentation on building and using Rocketeer is available on the Rocketeer wiki page.
Voyager (batch processing to generate animations)
Voyager processes a series data files and produces an image from different simulation times. An external program, such as mencoder, or ImageMagick can be used to string the images together into a single animation. Documentation on building and using Voyager is available on the Voyager wiki page.
Apollo/Houston let the application scientist visualize data on a remote system. Apollo is run on your local workstation (i.e. client), whereas Houston is a remote parallel renderer (i.e. server). Houston utilizes MPI to render subsections of a dataset in parallel across multiple processors. Apollo composes the rendered images on the users local workstation, with a user-interface identical to that of Rocketeer. This provides visualization for datafiles that may be impractical for serial visualization: even if datasets are small enough to be stored in memory on a single CPU, complex filters may be taxing on a processor, making interactive visualization difficult. Documentation on building and using the client/server component of the Rocketeer Suite is available on the Apollo and Houston wiki pages.
Why Bother with Rocketeer? Aren't there other existing Visualization tools?
There are two previously-existing means for visualizing Shapes datasets: Gnuplot and ChomboVis. Shapes can be configured to write data to human-readable ASCIII .dat files. Gnuplot can create vector-based renderings of these .dat files. Gnuplot gnuplot is a text-command-driven environment for visualization, which may be more cumbersome than a graphical user interface to the application scientist (Example gnuplot-generated image).
The Chombo group developed ChomboVis to visualize 2d and 3d AMR data using a convenient graphical user interface. Like Rocketeer, ChomboVis uses the visualization toolkit to render its data. However, all rendering occurs on a single processor on the user's local workstation. This limits the visualization capabilities: a single workstation must have a sufficiently fast CPU and enough RAM to store a 3D dataset in memory. The Rocketeer Suite includes a parallel client/server visualization tool (Apollo/Houston), which farms off visualization duties to a cluster of computers. Chombovis also lacks the ability to batch-process several HDF5 files in order to generate animations of data. The Rocketeer Suite's Voyager can be used to render frames of an animation in parallel (Example chombovis-generated image).
Rocketeer is ideally suited for our visualization needs. Unlike other visualization tools, such asParaview, the default user interface within Rocketeer is very simple to use for results-oriented application scientists. Although Paraview's user interface can be modified by the careful programmer, Rocketeer provides a smaller learning curve with its default user interface for the both programmer and application scientist.
The visualization team at Lawrence Livermoore National Lab recently (as of February, 2006) developed a Chombo reader plugin for their own scientific visualization package, VisIt. VisIt is a "interactive parallel visualization and graphical analysis tool for viewing scientific data on Unix and PC platforms."  We discovered VisIt late in the Rocketeer Reader plugin development process and have not had time to review the software.
Shapes Data Layout
Shapes is a finite difference time domain (FDTD) solver built on top of Chombo, "a set of tools for implementing finite difference methods for the solution of partial differential equations on block-structured adaptively refined rectangular grids."  Chombo's HDF5 file I/O is used by Shapes to save HDF5 data files of AMR data.
The files use HDF5's  hierarchical structure to define and label data. Data and meta-data are split up into a groups and datasets. A "group" is similar to a directory tree in a Unix environment and a "dataset" is akin to files within a directory tree. The root group of a HDF5 file contains data for each AMR level as a group (denoted "level_i", where i=0,1,2,...,n; Level 0 is coarsest and level n is the finest level). Each level contains data defining the Geometry and data.
The three dimensional geometry is represented by the following variables:
- dx: the step size between the center of each cell (note: all cells are evenly spaced cubes);
- prob_domain: nodal coordinates of the entire domain in which data may exist--the nodes are assumed to be spaced evenly, with spacing dx. Nodal coordinates correspond to the center of the cells;
- boxes: nodal coordinates of sub-domain in which data exists on-file.
For example, if dx=0.25 and prob_domain=[0,0,399,399], the physical coordinates are [0,0,100,100]: a 2-d plate of 100x100 units.
Data for each level is stored as an HDF5 dataset, "data:datatype=0". All data is stored as one single contiguous array of scalar data (as of August, 2006 there is data stored in HDF5's native vector format. Vectors are treated as 1-d scalars, such as "E_x", "E_y" and "E_z"). Scalars exist for each variable (also known as a component in Shapes) for each box. The data array (labeled datatype=0) consists of an 1-D array looping over box number first and component number second (e.g. [data for box 1, component 1], [data for box 2, component 1], ... [data for box 1, component 2], [data for box 2, component 2], ...).
Printing the Contents of an HDF5 to the screen
One can inspect the contents of an HDF5 file using h5dump , a command-line utility that is built with the standard HDF5 installation. To print all meta-data of an HDF5 file, fields_001.hdf5, and display its contents in a simple text viewer, type:
h5dump -H fields_001.hdf5 | less
Likewise, to print all data in an HDF5 file (warning, this may take a while if the HDF5 file is very large), type:
h5dump fields_001.hdf5 | less
Rocketeer HDF5 Reader
I (Peter Schmitt, the original "Visualizing Shapes Datasets" author) thank the United States Department of Energy, the Office of Science, the Argonne Division of Educational Programs and the MCS Givens Associate position for giving me the opportunity to participate in an exceptional internship program. This work would not be possible without the contributions from Gustav Meglicki, Stephen Gray, and Tae-Woo Lee. I would like to extend special thanks to Boyana Norris and John Norris for their knowledge and patience, which helped make my internship such an amazing learning experience.
- The Center for Simulation of Advanced Rockets
- Chombo Infrastructure for Adaptive Mesh Refinement (i.e. what Shapes is built on top of)
- ChomboVis - a program for visualization of 2D and 3D AMR Chombo data sets
- Computational Nanophotonics - project page
- HDF5 What is HDF5?
- HDF5 Project Page Download HDF5 software, documentation, etc. here.
- Rocketeer Project Page
- Rocketeer Users Guide
- Shapes 2.1 User Guide
- The Visualization Toolkit Back-end of the Rocketeer Suite that does the rendering.
|Visualizing Shapes Datasets|
|The Rocketeer Suite:||Rocketeer | Voyager | Apollo/Houston | Source code|
|Plugins:||HDF5 | Tae-Woo|
|Miscellaneous:||Setting up binaries, colorbars and readers | Animation software|