| |
- nvVectorField
class nvVectorField |
|
nvVectorField: Averages u,v fields including A,B,C,D,E grids. |
|
Methods defined here:
- AddObserver(self, f)
- CheckAxes(self)
- Out:
string Error message if X,Y, or Z Axis doesn't agree, otherwise empty string.
axis Reference to Z Axis if U & V agree, otherwise None.
- CheckUnits(self)
- Returns a string message if units don't agree.
Returns empty string if units agree.
- FireEvent(self, *args)
- GetCoordinatesAsColumns(self, x=':', y=':', z=0)
- As a convenience, this returns a 3 column array for the axes
requested with the columns always ordered as x,y,z, i.e. output[:,0|1|2],
all as N.Float32, which is often used for VTK structured grid pipelines.
Any axis not requested has its values set to zero.
This eliminates a user's guesswork for gridding coordinates for
rectilinear and warped fields.
Note: all possible combinations have not yet been implemented or tested.
Current combinations available:
- x=:, y=:, z=integer (with or without valid z axis)
@param z elevation index, or None for none, or ':' for all z (similarly for x and y)
@returns None if request not defined, otherwise Numeric array
- GetData(self, uname=None, vname=None, it=None, iz=None)
- Update change in time, elevation, or variables.
All input values must be supplied, otherwise
they'll be ignored.
- GetElevationAxis(self)
- Returns nvAxis instance or None.
- GetGrid(self, it=None, iz=None, fieldu=None, fieldv=None)
- Creates averaged grid for C & D grid types, otherwise an A,B or E grid.
Performs masking of invalid values.
Returns x, nx, y, ny, u, v, gridtype
- GetMagnitudeMinMax(self, u, v)
- Returns min & max (both >= 0) for u, v grids.
Assumes u, v are Numeric arrays.
- GetPeriodicGrid(self, it=None, iz=None, fieldu=None, fieldv=None)
- Creates averaged grid for C & D grid types, otherwise an A,B or E grid
for periodic grids.
Should be called only by GetGrid function.
Returns x, nx, y, ny, u, v, gridtype
- IsWarped(self)
- MaskArrayWithValidRange(self, array)
- Masks invalid values by setting them to zero.
- PrintSelf(self)
- UpdateMinMax(self, z=None)
- Computes estimate for vector amplitude min/max.
If vector is one component only, then data min/max is exact and
the same as the field's.
A specific elevation index can be specified to minimize computation overhead.
The minimum is set to and unchanged from zero.
- __init__(self, fields=None)
Data and other attributes defined here:
- GRIDTYPE_ABE = 'ABE'
- GRIDTYPE_C = 'C'
- GRIDTYPE_D = 'D'
| |