Built-in-Queries

The following contains descriptions for the built-in queries that VisIt supports.

Unless stated otherwise
each query operates on the Variable and/or Mesh used by the highlighted plot in the Plot list.
results are printed to the Query results.
described options are shown with their GUI names
Python equivalent usage is provided
each query operates on currenly plotted data (so is affected by operators in the pipeline)
For query-over-time, additional python arguments are
do_time=1 (turn on the query-over-time)
start_time=5 (starting time index, default is 0)
end_time=200 (ending time index, default is Num-time-states -1)
stride=5 (stride for time indices, default is 1)


2D area

Calculates the area of the 2D plot.

Enabled for Query-over-time.

Python example
Query("2D area")
Query("2D area", do_time=1)
QueryOverTime("2D area")


3D surface area

Calculates the area of the plot.

Enabled for Query-over-time.

Python examples
Query("3D surface area")
Query("3D surface area", do_time=1, stride=3)
QueryOverTime("3D surface area", stride=3)


Area Between Curves

Calculates the area between 2 curve plots. The plots that will serve as input to this query must both be highlighted in the Plot list or VisIt will issue an error message.

Python example
Query("Area Between Curves")


Average Mean Curvature

NEEDS DESCRIPTION

Enabled for Query-over-time.

Python example
Query("Average Mean Curvature")


Average Value

NEEDS DESCRIPTION

Enabled for Query-over-time.

Python example
Query("Average Value")


Best Fit Line

NEEDS DESCRIPTION

Python example
Query("Best Fit Line")


Centroid

Calculates the centroid of a dataset. The contribution of each cell is calculated assuming its mass all lies at the center of the cell. If the query is performed on a Pseudocolor plot, the plot's variable will be assumed to be density. If the query is performed on a plot such as a Mesh plot or FilledBoundary plot, uniform density will be used.

Python example
Query("Centroid")


Chord Length Distribution

Calculates a probability density function of chord length over a two or three dimensional object. Axially symmetric objects (RZ-meshes) are treated as 3D meshes and chords are calculated over the revolved, 3D object. A statistical approach, casting uniform density, random lines, is used. The result of this query is a curve, which is outputted as a separate file. This curve is a probability density function over length scale. The name of the resulting file is printed to the Query results.

There are two variations of this query: aggregate and individual.

Option Default Description
Number of Lines 1000 ""
Number of Bins 100 ""
Min Length 0.0 ""
Max Length 1.0 ""


Python examples
Query("Chord Length Distribution - individual", num_lines=15000, num_bins=100, min=0, max=0.5)
Query("Chord Length Distribution - aggregate", num_lines=15000, num_bins=100, min=0, max=0.5)


Compactness

Calculates mesh metrics.

Python example
Query("Compactness")


Connected Component Area

For more details, see Connected Components and Connected Components Queries

Python example
Query("Connected Component Area")


Connected Component Centroids

For more details, see Connected Components and Connected Components Queries

Python example
Query("Connected Component Centroids")


Connected Component Length

For more details, see Connected Components and Connected Components Queries

Python example
Query("Connected Component Length")


Connected Component Variable Sum

For more details, see Connected Components and Connected Components Queries

Python example
Query("Connected Component Variable Sum")


Connected Component Volume

For more details, see Connected Components and Connected Components Queries

Python example
Query("Connected Component Volume")


Connected Component Weighted Variable Sum

For more details, see Connected Components and Connected Components Queries

Python example
Query("Connected Component Weighted Variable Sum")


Connected Components Summary

For more details, see Connected Components and Connected Components Queries

Option Default Description
Output File cc_summary.okc Name and location for the output file.


Python example
Query("Connected Component Summary")
Query("Connected Component Summary", output_file="somefile.okc")


Cycle

Outputs the cycle.

Python example
Query("Cycle")


Distance From Boundary

Calculates how much mass is at a given distance away from the boundary of a shape. An important distinction for this query is that distance from the boundary (for a given point) is not defined as the shortest distance to the boundary, but simultaneously as all surrounding distances. Axially symmetric objects (RZ-meshes) are treated as 3D meshes and length scales are calculated over the revolved, 3D object. The implementation employs a statistical approach, with the casting of uniform density, random lines. The result of this query is a curve, which is outputted as a separate file. This curve contains the amount of mass as a function of length scale. Integrating the curve between P0 and P1 will give the total mass at distance between P0 and P1 (given the interpretation above). The name of the resulting file is printed to the Query results.

Option Default Description
Number of Lines 1000 ""
Number of Bins 100 ""
Min Length 0.0 ""
Max Length 1.0 ""


Python example
Query("Distance From Boundary", num_lines=15000, num_bins=100, min=0, max=0.5)


Elliptical Compactness Factor

NEEDS DESCRIPTION

Enabled for Query-over-time.

Option Default Description
Centroid default ""


Python examples
Query("Elliptical Compactness Factor")
Query("Elliptical Compactness Factor", centroid="default")
Query("Elliptical Compactness Factor", centroid=[1.0, 0.0, 0.0])


Eulerian

Calculates the Eulerian number for the mesh.

Python example
Query("Eulerian")


Expected Value

Calculates the integral of xf(x)dx for some curve f(x). This query is intended for distribution functions.

Python example
Query("Expected Value")


Hohlraum Flux

NEEDS DESCRIPTION

Enabled for Query-over-time.

Option Default Description
Variables "absorbtivity", "emissivity" Variables to use for absorbtivity and emissivity.
Number Of Lines 1000
Divide Emis By Absorb false
Ray Center 0.0, 0.0, 0.0
Radius 0.0
Theta 0.0
Phi 0.0


Python example
Query("Hohlram Flux", num_lines=150, ray_center=(5, 5, 5), radius=2.5, vars=(absvar, emisvar))


Integrate

Calculates the area under the Curve plot that is highlighted in the Plot list.

Python example
Query("Integrate")


Kurtosis

Calculates the kurtosis of a normalized distribution function. The normalized distribution function must be represented as a Curve plot in VisIt. Kurtosis measures the variability of a distribution by comparing the ratios of the fourth and second central moments.

Python example
Query("Kurtosis")


L2Norm

The L2Norm query calculates the L2Norm, or square of the integrated area, of a Curve plot. The Curve plot must be highlighted in the Plot list.

Python example
Query("L2Norm")


L2Norm Between Curves

The L2Norm query takes two Curve plots as input and calculates the L2Norm between the 2 curves. Both Curve plots must be highlighted in the Plot list or VisIt will issue an error message.

Python example
Query("L2Norm Between Curves")


Line Sampler Info

NEEDS DESCRIPTION

Option Default Description
Dump Coordinates false ""
Dump Values false ""


NEEDS PYTHON EXAMPLE


Line Scan Transform

NEEDS DESCRIPTION

Option Default Description
Number of Lines 1000 ""
Number of Bins 100 ""
Min Length 0.0 ""
Max Length 1.0 ""


Python example
Query("Line Scan Transform", num_lines=15000, num_bins=100, min=0, max=0.5)


Lineout

Creates a new instance of the highlighted plot in the Plot list, applies a Lineout operator, and copies the plot to another vis window. The properties of the Lineout operator such as the start and end points are set using the controls in the Query parameters area of the Query Window. Creating Lineouts in this manner instead of using VisIt's interactive lineout allows you to create 1D Curve plots from 3D databases.

Option Default Description
Variables default Variables to use for curve generation.
Start point (0.0, 0.0, 0.0) Beginning point of line.
End point (1.0, 0.0, 0.0) Ending point of line.
Use Sampling false Use sampling mode.
Sample Points 50 Number of sample points to use in sampling mode.


Python examples
Lineout(start_point=(0.4, 1.04, 0), end_point=(0.4, 0.1, 0))
Lineout(start_point=(0.4, 1.04, 0), end_point=(0.4, 0.1, 0), vars=("p", "u", "d"))
Lineout(start_point=(-10, -10, -10), end_point=(10, -10, -10), use_sampling=1, num_samples=200)


Localized Compactness Factor

NEEDS DESCRIPTION

Enabled for Query-over-time.

Python examples
Query("Localized Compactness Factor")
Query("Localized Compactness Factor", do_time=1)


Mass Distribution

Calculates how much mass occurs at different length scales over a two or three dimensional object. Axially symmetric objects (RZ-meshes) are treated as 3D meshes and length scales are calculated over the revolved, 3D object. The implementation employs a statistical approach, with the casting of uniform density, random lines. The result of this query is a curve, which is outputted as a separate file. This curve contains the amount of mass as a function of length scale. Integrating the curve between P0 and P1 will give the total mass between length scale P0 and length scale P1. The name of the resulting file is printed to the Query results.

Option Default Description
Number of Lines 1000 ""
Number of Bins 100 ""
Min Length 0.0 ""
Max Length 1.0 ""


Python example
Query("Mass Distribution", num_lines=15000, num_bins=100, min=0, max=0.5)


Max

Calculates the maximum value for the variable used. Results include the maximum value and the logical and physical coordinates where the maximum value was found. Enabled for Query-over-time.

Option Default Description
Original Data true Use values from the database.
Actual Data false Use values as currently plotted.


Python examples
Query("Max")
Query("Max", use_actual_data=1)
Query("Max", do_time=1)
QueryOverTime("Max", use_actual_data=1, stride=2)


Memory Usage

NEEDS DESCRIPTION

NEEDS PYTHON EXAMPLE


Min

Calculates the minimum value for the variable used. Results include the minimum value and the logical and physical coordinates where the minimum value was found.

Enabled for Query-over-time.

Option Default Description
Original Data true Use values from the database.
Actual Data false Use values as currently plotted.


Python examples
Query("Min")
Query("Min", use_actual_data=1)
Query("Min", do_time=1)
QueryOverTime("Min", use_actual_data=1, stride=2)


MinMax

Calculates the minimum and maximum values for the variable used. Results include minimum and maximum values and their logical and physical coordinates.

Option Default Description
Original Data true Use values from the database.
Actual Data false Use values as currently plotted.


Python example
Query("MinMax")
Query("MinMax", use_actual_data=1)


Moment of Inertia

Calculates the moment of inertia tensor for each cell in a three-dimensional dataset. The contribution of each cell is calculated assuming its mass all lies at the center of the cell. If the query is performed on a Pseudocolor plot, the plot's variable will be assumed to be density. If the query is performed on a plot such as a mesh plot or FilledBoundary plot, uniform density will be used.

Python example
Query("Moment of Inertia")


NodeCoords

The NodeCoords query prints the node coordinates for the specified node.

Option Default Description
Domain 0 Domain id of the node to be queried.
Node 0 Id of the node to be queried.
Use Global Node false When true, Node is considered global, and Domain is not needed.


Python examples
Query("NoneCoords", domain=5, element=27, use_global_node=0)
Query("NoneCoords", element=1050, use_global_node=1)


NumNodes

Calculates the number of nodes for the mesh.

Option Default Description
Original Data true Use values from the database.
Actual Data false Use values as currently plotted.


Python examples
Query("NumNodes")
Query("NumNodes", use_actual_data=1)


NumZones

Caluclates the number of zones for the mesh.

Option Default Description
Original Data true Use values from the database.
Actual Data false Use values as currently plotted.


Python examples
Query("NumZones")
Query("NumZones", use_actual_data=1)


Number of Connected Components

Calculates the number of connected components.

Python example
Query("Number of Connected Components")


Pick

Performs picking at the specified location. Results are printed to the Query results and the Pick Window.

Enabled for Query-over-time.


Option Default Description
Variables "default" Variables for which to return information (default means active variable for current plot).
Pick Type Pick using coordinate to determine zone
Type Description
Pick using coordinate to determine zone Finds zone containing specified coordinate (provided coordinate lies withing dataset bounds)
Pick using coordinate to determine node Finds node closest to specified coordinate (provided coordinate lies withing dataset bounds)
Pick using domain and element Id Uses specified node/zone and domain id combinations.
Pick using glocal element id Uses specified global node/zone id.
Time Curve Options [depends on Pick Type] For time curves, and time-steps beyond first, will Pick use a spatial coordinate or node/zone id?
Option Description
Preserve Picked coordinate uses same spatial coordinate for each time step
Preserve Picked Element id uses same node or zone id for each time step. If original pick type used coordinate, then node/zone id used is the one determined from coordinate at first time state.
Time-curve Plot Type controls the plot type for Pick-through-time
Option Description
Create single Y-Axis plot (default) Curves for each variable use same Y-axis
Create Multiple Y-Axes plot Curves for each variable use their own Y-axis (only available when multiple variables requested)

Python examples:

Zone pick using coordinate
ZonePick(coord=(0.0, 0.0, 0.0))
Zone pick using domain, zone id
PickByZone(domain=10, element=200)
Zone pick using global zone id
PickByGlobalZone(element=200)
Node pick using coordinate
NodePick(coord=(0.0, 0.0, 0.0))
Node pick using domain, node id
PickByNode(domain=10, element=200)
Node pick using global node id
PickByGlobalNode(element=2500)
Adding multiple variables
PickByZone(domain=10, element=200, vars=("d", "p", "u"))
Performing a pick-through-time
PickByNode(domain=10, element=200, do_time=1, preserve_coord=0)
PickByZone(coordinate=(0.5, 0, 0), do_time=1, preserve_coord=1)
PickByZone(coordinate=(0.5, 0, 0), do_time=1, preserve_coord=1, vars=("d", "p"), curve_plot_type=1)

Population Statistics

The Sample Statistics and Population Statistics queries calculates mean, variance, standard deviation, skewness, and kurtosis on a field value.

Note that this ignores any mesh geometry and only works on data values. It differs from the standalone "Skewness" and "Kurtosis" queries in that those require a curve as input and assume the curve to be a population density function; these work on data as if it is actually samples, and so make sense on any scalar for any mesh type.

The "Population Statistics" assumes that you're looking at a whole population, whereas the "Sample Statistics" version assumes that you're looking at a sample of a larger population and calculates unbiased metrics. You might recognize this as the difference between using 1/(N-1) vs. 1/N when calculating the variance, but it applies to the other statistics as well.


Python examples
>>> OpenDatabase("rect2d.silo")
>>> AddPlot("Pseudocolor","u")
>>> DrawPlots()
>>> Query("Population Statistics")
Mean = -0.000709364
Std Dev = 0.643611
Variance = 0.414235
Skewness = 0.0018543
Kurtosis = -1.37253

Ray Length Distribution

NEEDS DESCRIPTION

There are two variations of this query: aggregate and individual.

Option Default Description
Number of Lines 1000 ""
Number of Bins 100 ""
Min Length 0.0 ""
Max Length 1.0 ""


Python examples
Query("Ray Length Distribution - individual", num_lines=15000, num_bins=100, min=0, max=0.5)
Query("Ray Length Distribution - aggregate", num_lines=15000, num_bins=100, min=0, max=0.5)


Revolved surface area

Revolves the mesh about the X-axis and calculates the plot's revolved surface area.

Enabled for Query-over-time.

Python examples
Query("Revolved surface area")
Query("Revolved surface area", do_time=1)
QueryOverTime("Revolved surface area")


Revolved volume

Revolves the mesh about the X-axis and calculates's the plot's volume.

Enabled for Query-over-time.

Python examples
Query("Revolved volume")
Query("Revolved volume", do_time=1)
QueryOverTime("Revolved volume")


Sample Statistics

The Sample Statistics and Population Statistics queries calculates mean, variance, standard deviation, skewness, and kurtosis on a field value.

Note that this ignores any mesh geometry and only works on data values. It differs from the standalone "Skewness" and "Kurtosis" queries in that those require a curve as input and assume the curve to be a population density function; these work on data as if it is actually samples, and so make sense on any scalar for any mesh type.

The "Sample Statistics" version assumes that you're looking at a sample of a larger population and calculates unbiased metrics, whereas "Population Statistics" assumes that you're looking at a whole population. You might recognize this as the difference between using 1/N vs. 1/(N-1) when calculating the variance, but it applies to the other statistics as well.


Python examples
>>> OpenDatabase("rect2d.silo")
>>> AddPlot("Pseudocolor","u")
>>> DrawPlots()
>>> Query("Sample Statistics")
Mean = -0.000709364
Std Dev = 0.643864
Variance = 0.414561
Skewness = 0.00185649
Kurtosis = -1.37321

Shapelet Decomposition

NEEDS DESCRIPTION


Option Default Description
Beta 5.0
NMax 16
Recomp Output(Vtk) [skip]


NEEDS PYTHON EXAMPLE


Skewness

Calculates the skewness of a normalized distribution function. The normalized distribution function must be represented as a Curve plot in VisIt. Skewness measures the symmetry of a distribution using its second and third central moments.

Python example
Query("Skewness")


Spatial Extents

Queries the spatial extents for the plot.

Option Default Description
Original Data true Use values from the database.
Actual Data false Use values as currently plotted.


Python examples
Query("Spatial Extents")
Query("Spatial Extents", use_actual_data=1)


Spherical Compactness Factor

Attempts to measure how spherical a three dimensional shape is. The query first determines what the volume of a shape is. It then constructs a sphere that has that same volume. Finally, the query positions the sphere so that the maximum amount of the original shape is within the sphere. The query returns the percentage of the original shape that is contained within the sphere.

Enabled for Query-over-time.

Option Default Description
Centroid default ""


Python examples
Query("Spherical Compactness Factor")
Query("Spherical Compactness Factor", centroid="default")
Query("Spherical Compactness Factor", centroid=[1.0, 0.0, 0.0])


Streamline Info

NEED DESCRIPTION

Option Default Description
Dump Steps false ""


Python examples
Query("Streamline Info")
Query("Streamline Info", dump_steps=1)


Time

Queries the time for the plot.

Python example
Query("Time")


Total Length

NEEDS DESCRIPTION

Enabled for Query-over-time.

Python examples
Query("Total Length")
Query("Total Length", do_time=1)
QueryOverTime("Total Length")


TrajectoryByNode

Computes a trajectory between two node-centered variables at a specified node over time. Only valid for time-varying datasets.

Option Default Description
Variables var_for_x, var_for_y Variable to use for x-coordinates, variable to use for y coordinate
Domain 0 Domain id
Node 0 Node id
Use Global Node false When true, Node is considered global, and Domain is not needed.


Python examples
QueryOverTime("TrajectoryByNode, use_global_id=1, element=242, vars=("va", "vb"))
Query("TrajectoryByNode, do_time=1, domain=5,element=7, vars=("va", "vb"))


TrajectoryByZone

Computes a trajectory between two zone-centered variables at a specified zone over time. Only valid for time-varying datasets.

Option Default Description
Variables var_for_x, var_for_y Variable to use for x-coordinates, variable to use for y coordinates
Domain 0 Domain id
Zone 0 Zone id
Use Global Zone false When true, Zone is considered global, and Domain is not needed.


Python examples
QueryOverTime("TrajectoryByNode, domain=5, element=7, vars=("va", "vb"))
Query("TrajectoryByNode, do_time=1, use_global_id=1, elment=242, vars=("va", "vb"))


Variable Sum

Adds up the variable values for all cells.

Enabled for Query-over-time.

Python examples
Query("Variable Sum")
Query("Variable Sum", do_time=1)
QueryOverTime("Variable Sum", stride=7, end_time=216)


Volume

Calculates the volume of the mesh.

Enabled for Query-over-time.

Python examples
Query("Volume")
Query("Volume", do_time=1)
QueryOverTime("Volume")


Watertight

Determines if a three-dimensional surface mesh is "watertight", meaning that it is a closed volume with mesh connectivity such that every edge is indicident to exactly two faces. This means that no edge can have a duplicate in the exact same position.

Python example
Query("Watertight")


Weighted Variable Sum

Adds up the variable values, weighted by cell size, for all cells. cell size is surface-area for 2D plots, volume for 3D plots, or revolved volume for axi-symmetric 2D plots.

Enabled for Query-over-time.

Python examples
Query("Weighted Variable Sum")
Query("Weighted Variable Sum", do_time=1)
QueryOverTime("Weighted Variable Sum", stride=7, end_time=216)


XRay Image

NEEDS DESCRIPTION

Option Default Description
Variables "absorbtivity", "emissivity" Variables to use for absorbtivity and emissivity.
Output Image Format png Image format for output file.
Divide Emis By Absorb false
Origin 0.0 0.0 0.0
Up Vector 0.0 0.0 0.0
Theta 0.0
Phi 0.0
Image Width 1
Image Height 1
Image Pixel Size 200 200


Python example
params = GetQueryParameters("XRay Image")
params['image_size'] = (300, 300)
params['divide_emis_by_absorb'] = 1
params['width'] = 10.
params['height'] = 10.
params['vars'] = ("d", "p")
Query("XRay Image", params)


ZoneCenter

Calculates the zone center for a given cell.

Option Default Description
Domain 0 Domain id of the zone to be queried.
Node 0 Id of the zone to be queried.
Use Global Zone false When true, Zone is considered global, and Domain is not needed.


Python example
Query("ZoneCenter", domain=5, element=27, use_global_zone=0)
Query("ZoneCenter", element=1050, use_global_zone=1)