API Reference for Enthought Tool Suite 3.0.1
Data sources classes and their associated functions for mlab.
Creates structured 2D data from a 2D array.
Function signatures:
array2d_source(s, ...) array2d_source(x, y, s, ...) array2d_source(x, y, f, ...)
If 3 positional arguments are passed the last one must be an array s, or a callable, f, that returns an array. x and y give the coordinnates of positions corresponding to the s values.
x and y can be 1D or 2D arrays (such as returned by numpy.ogrid or numpy.mgrid), but the points should be located on an orthogonal grid (possibly non-uniform). In other words, all the points sharing a same index in the s array need to have the same x or y value.
If only 1 array s is passed the x and y arrays are assumed to be made from the indices of arrays, and an uniformly-spaced data set is created.
Keyword arguments:
name: the name of the vtk object created. figure: optionally, the figure on which to add the data source. mask: Mask points specified in a boolean masking array.
Converts a list of iterables to a list of arrays or callables, if needed.
Creates 2D grid data.
x, y, z are 2D arrays giving the positions of the vertices of the surface. The connectivity between these points is implied by the connectivity on the arrays.
For simple structures (such as orthogonal grids) prefer the array2dsource function, as it will create more efficient data structures.
Keyword arguments:
name: the name of the vtk object created. scalars: optional scalar data. figure: optionally, the figure on which to add the data source.
Creates line data.
Function signatures:
line_source(x, y, z, ...) line_source(x, y, z, s, ...) line_source(x, y, z, f, ...) If 4 positional arguments are passed the last one must be an array s, or a callable, f, that returns an array.
Keyword arguments:
name: the name of the vtk object created. figure: optionally, the figure on which to add the data source.
Open a supported data file given a filename. Returns the source object if a suitable reader was found for the file.
Converts different signatures to (x, y, s).
Converts different signatures to (x, y, z, s).
Converts different signatures to (x, y, z, u, v, w).
Creates a scalar field data.
Function signatures:
scalar_field(s, ...) scalar_field(x, y, z, s, ...) scalar_field(x, y, z, f, ...)
If only 1 array s is passed the x, y and z arrays are assumed to be made from the indices of arrays.
If the x, y and z arrays are passed they are supposed to have been generated by numpy.mgrid. The function builds a scalar field assuming the points are regularily spaced.
If 4 positional arguments are passed the last one must be an array s, or a callable, f, that returns an array.
Keyword arguments:
name: the name of the vtk object created. figure: optionally, the figure on which to add the data source.
Creates scattered scalar data.
Function signatures:
scalar_scatter(s, ...) scalar_scatter(x, y, z, s, ...) scalar_scatter(x, y, z, s, ...) scalar_scatter(x, y, z, f, ...)
If only 1 array s is passed the x, y and z arrays are assumed to be made from the indices of vectors.
If 4 positional arguments are passed the last one must be an array s, or a callable, f, that returns an array.
Keyword arguments:
name: the name of the vtk object created. figure: optionally, the figure on which to add the data source.
Creates vector field data.
Function signatures:
vector_field(u, v, w, ...) vector_field(x, y, z, u, v, w, ...) vector_field(x, y, z, f, ...)
If only 3 arrays u, v, w are passed the x, y and z arrays are assumed to be made from the indices of vectors.
If the x, y and z arrays are passed, they should have been generated by numpy.mgrid or numpy.ogrid. The function builds a scalar field assuming the points are regularily spaced on an orthogonal grid.
If 4 positional arguments are passed the last one must be a callable, f, that returns vectors.
Keyword arguments:
name: the name of the vtk object created. scalars: optional scalar data. figure: optionally, the figure on which to add the data source.
Creates scattered vector data.
Function signatures:
vector_scatter(u, v, w, ...) vector_scatter(x, y, z, u, v, w, ...) vector_scatter(x, y, z, f, ...)
If only 3 arrays u, v, w are passed the x, y and z arrays are assumed to be made from the indices of vectors.
If 4 positional arguments are passed the last one must be a callable, f, that returns vectors.
Keyword arguments:
name: the name of the vtk object created. scalars: optional scalar data. figure: optionally, the figure on which to add the data source.
| Local name | Refers to |
|---|---|
| Array | enthought.traits.trait_numeric.Array |
| ArraySource | enthought.mayavi.sources.array_source.ArraySource |
| Bool | enthought.traits.trait_types.Bool |
| camel2enthought | enthought.tvtk.common.camel2enthought |
| Either | enthought.traits.trait_types.Either |
| engine_manager | enthought.mayavi.tools.engine_manager.engine_manager |
| HasTraits | enthought.traits.has_traits.HasTraits |
| Instance | enthought.traits.trait_types.Instance |
| numpy | numpy |
| on_trait_change | enthought.traits.has_traits.on_trait_change |
| registry | enthought.mayavi.core.registry.registry |
| tools | enthought.mayavi.tools.tools |
| tvtk | enthought.tvtk.tvtk.tvtk |
© Copyright 2002-2008 Enthought, Inc.