This section contains some tutorial examples that show how to use named selections in VisIt.


Named Selections

Named selections restrict the cells used in a plot to a user-specified list of cells. This set of cells usually consists of domainID and cellID pairs. The selections can come from a text file or can be generated from existing plots in VisIt. The selections can be given names (hence the name "named selection") and can be applied to plots using the Subset window.

In this example, we will use named selections to coordinate selected cells between 2 plots.

  1. Open example.silo
  2. Add a Parallel Coordinates plot of pressure, radial, grad_magnitude, temp and click Draw
  3. Enable the Axis restriction tool in the vis window
  4. Restrict pressure to roughly 3.5 to 4.0
  5. Open the Selections window
  6. Click New to activate the Selection Dialog. This will make a new selection with a default name like selection01. Click the dialog's OK button to make a selection based on the current Parallel Coordinates plot.
  7. Turn on the Automatically apply updated selections check box in the Selections window
  8. Switch to a 1x2 window layout
  9. Make window 2 active, delete any plots that were copied to it
  10. Add a Pseudocolor plot of temp and click Draw
  11. Open the Subset Window and make the new Pseudocolor plot use selection01 as its selection
  12. Go back to window 1 and restrict the radial variable to roughly 15 to 25
  13. Restrict grad_magnitude to roughly 0.0 to 0.2
  14. Restrict temp to roughly 2.0 to 2.5
  15. When you are done, delete window 2 and delete all plots from window 1
Coordinating selection between Parallel Coordinates plot and a Pseudocolor plot

Cumulative Query

Cumulative query is a type of named selection that can apply various range queries to data over time. Each time step in the dataset will have some list of cells that satisfies the query criteria. The list of cells can be binned in various ways to and those bins can be restricted to come up with a final list of cells that can be used as a selection.

Finding areas of the globe that have warmed the most

In this example, we will use the avg_temp.visit dataset, which contains the average annual temperature for nearly one century (some years may be projections).

  • We want to see the areas on the globe that have warmed the most and have an idea how the has warming progressed.
  • We will compute the difference of each year vs. the first year and then see which regions have most frequently been warmer by at least 5 degrees F.
  • We will find the regions using cumulative query.

Set up some map context

  1. Turn on Auto apply in the Main window
  2. Open continents.shp
  3. Create a Mesh plot of polygon and click Draw
  4. Turn off the Apply selection to all plots check box under the plot list

Continent outlines

Select the warmer regions

  1. Open avg_temp.visit
  2. Open the Expression window
  3. Create scalar expression tdelta defined as temp_F - conn_cmfe(<[0]i:temp_F>, mesh)
  4. Open the Controls->Selections window
  5. Click the New button in the lower left of the window to start creating the selection via the Selection creation dialog.
  6. Type five_degrees for the selection name
  7. Click the Database radio button so the avg_temp.visit database will be used for the selection.
  8. Click the OK button
    Selection Dialog
  9. Now, in the Selections window, click the Cumulative Query check box to enable the settings for cumulative queries
  10. Next to the Add variable label, select the tdelta variable to add the tdelta variable to the cumulative query
  11. Type 5 for the minimum value of tdelta
    Selecting regions that are at least 5 degrees warmer
  12. Click on the Histogram tab
    (Notice that the selection will now calculate and display that over the past 50 years or so that there has been a roughly linear increase in the number of cells that are warmer)
  13. Create a Pseudocolor plot of temp_F and click Draw
  14. Open the Subset window and select five_degrees from the Applied selection options. This will cause your plot to be restricted to the regions that have ever warmed more than 5 degrees.
Regions that have ever warmed by 5 degrees

Show consistently warmer regions

The above plot shows that most of the land areas on the Earth have at some point been warmer than 5 degrees since the first time step in the dataset.

  • We want to see which regions have been warmer most frequently
  • We can do this be changing the five_degrees named selection

We will change the cumulative query from sorting based on time to sorting based on matches. This means that the cells will be sorted by the number of times they matched the query criteria over time. The cells will then be placed into bins. Cells that matched less frequently will be in bins on the left. Cells that match most frequently will be in bins on the right. For relatively small numbers of time steps, the number of bins will be equal to the maximum number of time steps that generated a match. In the context of this example, the bins on the right were found to be warm for the largest number of time steps.

  1. Get back to the Histogram tab in the Selections window
  2. Change the Axis setting from Time to Matches. This will produce a different histogram.
  3. Type 58 into the Minimum bin spin box
  4. Click the decrement button on the Minimum bin spin box several times and watch the warm regions expand on the map. Note that most of them appear in the Arctic, indicating that the Arctic has been warming more than most regions on Earth.
Using matches to isolate cells that match the criteria most frequently
Most matches appear in the Arctic, indicating that the Arctic has been warming more than most regions on Earth.