VisIt-tutorial-comparison
From DOE SciDAC VACET Center Wiki
| Back to the tutorial index |
There are two flavors of comparison that VisIt supports:
- Image-based comparisons (side-by-side comparisons)
- Data-level comparisons
Of course, the data analysis provided by VisIt enables other types of comparison, for example compare the volumes between two data sets.
Contents |
Image-based comparisons
Multiple window comparisons
In this example, we use a single file, but you should think about using multiple files (for comparison). The reason we use a single file is a dearth of example data in the VisIt download.
- Make a Pseudocolor plot of hardyglobal.
- Make the window layout be 1x2.
- There are two ways to do this:
- On the toolbar, find the fifth icon from the left, a rectangle with a line in the middle, indicating a 1x2 layout.
- Or, on the gui on the left hand side, go to Windows->Layout->1x2.
- There are two ways to do this:
- Make window #2 be the active window.
- There are two ways to do this:
- Click on the first icon in the upper left in the toolbar, which is a picture of window.
- Right above the active plots list, there is a dropdown labeled "Active window". Change that from 1 to 2.
- There are two ways to do this:
- The active plots list should be empty.
- The active plots list always reflects the plots of the active window.
- Change the active window back to window #1.
- The plot reappears in the active plots list.
- Make window #2 active.
- The active plots list is empty again.
- Change the active window back to window #1.
- The active plots list always reflects the plots of the active window.
- Go to Windows->Copy Plots From->Window #1.
- The active plots list should now have a Pseudocolor plot of hardyglobal.
- Use the variable dropdown to change the active variable to shepardglobal.
- Draw.
- You should now have a picture of hardyglobal on the left and a picture of shepardglobal on the right.
- Of course, you can have data from different files in the two windows (or even in the same window).
- Now, on the toolbar, click on the lock with the eyeball for each window.
- The views are now linked. Rotate one and the other rotates with it.
- Apply the slice operator to one of the plots.
- Modify the slice operator attributes to *not* project to 2D.
- Apply
- Also click "Make Default"
- Make the other window be active and apply the Slice operator.
- It will also not project to 2D because you clicked "Make Default".
- For both windows, click on the toolbar where there is a lock with two red squares connected by a green line.
- This will lock tools.
- Turn on the plane tool in one of the visualization windows.
- Do this by clicking on the toolbar icon of a blue "plane", which is to the left of a blue ball and to the right of a blue line.
- You will now see red hotspots in the visualization window.
- You can click in these hotspots and drag to adjust the slice plane.
- Since the tools are locked, the slice in the other window will also update.
- If you look at the Slice operator attributes window, you will see that the plane has updated to be consistent with the tool.
- Make the window that does *not* have the plane tool up be active.
- Modify the slice operator attributes so it *does* project to 2D.
- Go back to the window with the plane tool.
- Modify the plane.
- The other window gets the new plane, but it is still projected.
- Go to File->Set Save Options
- Turn "Save tiled" to be on and save.
- The result will be an image that has both windows in it.
Single window comparisons
If you want to look at two files in the same visualization window, you can do that as well, even if they occupy the same region of space.
- Open curv3d.silo.
- Make a Pseudocolor plot of "d"
- Draw.
- Open multi_ucd3d.silo.
- Make a Pseudocolor plot "u"
- Draw
- The two plots are on top of each other, at least partially, as they do not overlap perfectly.
- Turn off the button "Apply operators to all plots" located under the active plots list.
- VisIt by default will apply the same operators to all plots. This button disables that behavior.
- Apply the Reflect operator to the second Pseudocolor plot, the one from multi_ucd3d.silo.
- You can tell that this plot comes from multi_ucd3d.silo, because there is a number next to the plot (mine says 11:Pseudocolor(u)) and that number (11) corresponds to the file multi_ucd3d.silo in the file list.
- Some materials may be turned off for multi_ucd3d.silo, if so, click on the interlocking rings to bring up the Subset window and turn the materials back on.
- Bring up the Reflect operator attributes.
- Modify the attributes so that:
- Input mode is 3D
- The purple circle is clicked and turned off (turning it grey) and the square below it is still green.
- Apply
- You will now see the multi_ucd3d.silo plot of u below the curv3d.silo plot of d.
Data level comparisons
Data-level comparisons are done with "cross mesh field evaluations" ("CMFEs") which are documented extensively on visitusers.org. CMFEs are deployed through the expression language, which allows for flexible applications.
- Open curv3d.silo
- Bring up the window under Controls->Expressions
- Make a new scalar expression, named "d_multi_ucd3d"
- Define it as: pos_cmfe(</Users/childs3/visit/data/multi_ucd3d.silo:d>, curvmesh3d, -10.)
- These arguments mean:
- pos_cmfe: Take a "CMFE" and evaluate every point on the target mesh by finding the value at the same location from the donor mesh.
- </Users/childs3/visit/data/multi_ucd3d.silo:d>: the path to the data.
- This is most robust when the full path is given.
- Obviously you will need to change the path to fit your machine.
- We know this is a terrible interface.
- curvmesh3d: the mesh to evaluate multi_ucd3d.silo's "d" variable onto.
- This is explicitly specified to handle the case when there are multiple meshes in a file.
- -10: the value to use in regions that don't overlap.
- These arguments mean:
- Make a Pseudocolor plot of d_multi_ucd3d
- You will see that there are some regions of -10 and some regions that have real values.
- Make a new scalar expression, d_diff: d - d_multi_ucd3d
- Change your variable so you are plotting this.
- The "-10s" are now "+10s"
- Let's refine:
- d_diff2 = if(ge(d_multi_ucd3d, 0), d-d_multi_ucd3d, 0)
- Read as: if (d_multi_ucd3d > 0) then "d-d_multi_ucd3d" else "0"
- d_diff2 = if(ge(d_multi_ucd3d, 0), d-d_multi_ucd3d, 0)
- VisIt complains when you try to plot this. It says that the centerings are different.
- Go to File->File Information.
- "d" is zone-centered for curv3d.silo
- Activate multi_ucd3d.silo.
- File->File information updates automatically
- "d" is node-centered for multi_ucd3d.silo.
- REGARDLESS: VisIt should handle this issue. This is a bug.
- Go to File->File Information.
- Redefine d_diff2 as:
- d_diff2 = if(ge(recenter(d_multi_ucd3d)), 0), d-d_multi_ucd3d, 0)
- You now get the right answer.
- Delete your Pseudocolor plot.
- Add a Histogram plot of d_diff2.
- Modify the Histogram plot attributes so the bin contribution is by frequency.
- Click draw.
- You now have a histogram of the differences between the two data sets.
| Back to the tutorial index |
