RectGrid¶
- class acoular.grids.RectGrid¶
Bases:
Grid
Provides a 2D Cartesian grid for beamforming results.
This grid is composed of square or nearly square cells and lies on a plane perpendicular to the z-axis. It is defined by the lower and upper x- and y-limits and a constant z-coordinate.
- x_min = Float(-1.0, desc='minimum x-value')¶
The lower x-limit that defines the grid. Default is
-1
.
- x_max = Float(1.0, desc='maximum x-value')¶
The upper x-limit that defines the grid. Default is
1
.
- y_min = Float(-1.0, desc='minimum y-value')¶
The lower y-limit that defines the grid. Default is
-1
.
- y_max = Float(1.0, desc='maximum y-value')¶
The upper y-limit that defines the grid. Default is
1
.
- z = Float(1.0, desc='position on z-axis')¶
The constant z-coordinate of the grid plane. Default is
1.0
.
- increment = Float(0.1, desc='step size')¶
The side length of each cell. Default is
0.1
.
- nxsteps = Property(desc='number of grid points along x-axis')¶
Number of grid points along x-axis. (read-only)
- nysteps = Property(desc='number of grid points along y-axis')¶
Number of grid points along y-axis. (read-only)
- digest = Property( …¶
A unique identifier for the grid, based on its properties. (read-only)
- index(x, y)¶
Find the indices of a grid point near a given coordinate.
- indices(*r)¶
Find the indices of a subdomain in the grid.
Supports rectangular, circular, and polygonal subdomains.
- Parameters:
- Returns:
tuple
A 2-tuple of indices or slices corresponding to the subdomain.
- extend()¶
Return the grid’s extension in
matplotlib.pyplot.imshow
compatible form.Notes
pylab.imhow
is the same asmatplotlib.pyplot.imshow
. It’s only using a different namespace.The return of the method is ment for the
extent
parameter ofmatplotlib.pyplot.imshow
.
Examples
>>> from acoular import RectGrid >>> grid = RectGrid() >>> grid.y_min = -5 >>> grid.y_max = 5 >>> grid.extend() (-1.0, 1.0, -5.0, 5.0)