1 ''' The vapor module is internal to vaporgui, so its methods and variables can only be accessed in the python scripts used to calculate derived variables inside vaporgui.
2 This module includes the following methods:
3 vapor.MapVoxToUser - map voxel coordinates to user coordinates
4 vapor.MapUserToVox - map user coordinates to voxel coordinates
5 vapor.GetValidRegionMax - determine maximum valid voxel coordinates of a variable
6 vapor.GetValidRegionMin - determine minimum valid voxel coordinates of a variable
7 vapor.Get3DVariable - Obtain a 3 dimensional array of variable data from the VDC
8 vapor.Get2DVariable - Obtain a 2 dimensional array of variable data from the VDC
9 vapor.VariableExists - Determine whether a specified variable exists at a timestep
10 vapor.Get3DMask - Obtain a 3D mask variable indicating where a variable is not equal to its missing value
11 vapor.Get2DMask - Obtain a 2D mask variable indicating where a variable is not equal to its missing value.
13 This module also includes the following variables
14 vapor.TIMESTEP - The integer time step of the output variable(s) being calculated.
15 vapor.REFINEMENT - the integer refinement level of the output variable(s) being calculated.
16 vapor.LOD - The integer level-of-detail (compression level) of the output variable(s) being calculated.
17 vapor.BOUNDS - The integer 6-tuple specifying the integer extents of the Z, Y, and X coordinates
18 of the variable being calculated, inside the full 3D domain of the current VDC. '''
21 ''' Convert voxel coordinates to user coordinates, at a given refinement level and level of detail.
22 Calling sequence: userCoord = MapVoxToUser(voxcoord, refLevel ,lod)
23 Where: voxcoord is an integer 3-tuple indicating voxel coordinates to convert.
24 refLevel is the integer refinement level
25 lod (optional, defaults to 0) is the integer compression level
26 Result userCoord is the returned float32 3-tuple of user coordinates.'''
29 ''' Convert user coordinates to voxel coordinates, at a given refinement level and level of detail.
30 Calling sequence: voxCoord = MapUserToVox(userCoord, refLevel [,lod])
31 Where: userCoord is a float3 3-tuple indicating user coordinates to convert.
32 refLevel is the integer refinement level
33 lod (optional, defaults to 0) is the integer compression level
34 Result voxCoord is the returned integer 3-tuple of voxel coordinates.'''
37 ''' Determine the maximum voxel coordinates of a variable at a timestep and refinement level.
38 Calling sequence: maxCoord = vapor.GetValidRegionMax(timestep,variableName,refinementLevel)
39 Where: timestep is an integer time step in the VDC.
40 variableName is a string variable name in the VDC
41 refinementLevel is an integer refinement level in the VDC
42 returns maxCoord, an integer 3-tuple, the maximum coordinates of the variable at the timestep and refinement level.'''
45 ''' Determine the minimum voxel coordinates of a variable at a timestep and refinement level.
46 Calling sequence: minCoord = vapor.GetValidRegionMin(timestep,variableName,refinementLevel)
47 Where: timestep is an integer time step in the VDC.
48 variableName is a string variable name in the VDC
49 refinementLevel is an integer refinement level in the VDC
50 returns minCoord, an integer 3-tuple, the minimum coordinates of the variable at the timestep and refinement level.'''
53 ''' Obtain a 3-dimensional array of variable data from the VDC, using:
54 timestep (integer time step)
55 variableName (the variable name, a string)
56 refinement (integer refinement level)
57 lod (integer compression level)
58 bounds (6-tuple integer extents identifying the location of the data in the full domain,
60 Returns a 3-dimensional float32 array of variable values.'''
63 ''' Obtain a 2-dimensional array of variable data from the VDC, using:
64 timestep (integer time step)
65 variableName (the variable name, a string)
66 refinement (integer refinement level)
67 lod (integer compression level)
68 bounds (6-tuple integer extents identifying the location of the data in the full domain,
69 as with vapor.BOUNDS, however the first and fourth element of this tuple are ignored.
70 Returns a 2-dimensional float32 array of variable values.'''
73 ''' Determine if a variable is present in the VDC at specified timestep, refinement, and lod. Arguments are:
74 timestep (integer time step)
75 varname (the variable name, a string)
76 refinement (integer refinement level, optional, defaults to 0)
77 lod (integer compression level, optional, defaults to 0)
78 Returns: boolean value, true if the variable exists.'''
80 def Get3DMask(timestep, varname, refinement, lod, bounds):
81 ''' Obtain the boolean 3D mask associated with a 3D variable at a timestep, with specified refinement, lod, and bounds. Arguments are:
82 timestep (integer time step)
83 varname (string variable name)
84 refinement (integer refinement level)
85 lod (integer compression level)
86 bounds (6-tuple integer extents identifying the location of the data in the full domain, as with vapor.BOUNDS.
87 Returns: a 3-dimensional boolean array, which is the requested mask.'''
89 def Get2DMask(timestep, varname, refinement, lod, bounds):
90 ''' Obtain the boolean 2D mask associated with a 2D variable at a timestep,
91 with specified refinement, lod, and bounds. Arguments are:
92 timestep (integer time step)
93 varname (string variable name)
94 refinement (integer refinement level)
95 lod (integer compression level)
96 bounds (6-tuple integer extents identifying the location of the data in the full domain,
97 as with vapor.BOUNDS. The first and fourth entry are ignored.
98 Returns: a 2-dimensional boolean array, which is the requested mask.'''
def Get3DMask(timestep, varname, refinement, lod, bounds)
def MapVoxToUser(voxcoord, refinementLevel, lod)
def MapUserToVox(userCoord, refinementLevel, lod)
def Get3DVariable(timestep, variableName, refinement, lod, bounds)
def VariableExists(timestep, varname, refinement, lod)
def Get2DMask(timestep, varname, refinement, lod, bounds)
def GetValidRegionMin(timestep, variableName, refinementLevel)
def Get2DVariable(timestep, variableName, refinement, lod, bounds)
def GetValidRegionMax(timestep, variableName, refinementLevel)