ImportGrid¶
-
class
acoular.grids.
ImportGrid
¶ Bases:
acoular.grids.Grid
Loads a 3D grid from xml file.
-
from_file
= File(filter=['*.xml'], …¶ Name of the .xml-file from wich to read the data.
-
basename
= Property( depends_on = 'from_file', …¶ Basename of the .xml-file, without the extension; is set automatically / readonly.
-
index
(x, y)¶ Queries the indices for a grid point near a certain co-ordinate.
This can be used to query results or co-ordinates at/near a certain co-ordinate.
- Parameters
- x, yfloat
The co-ordinates for which the indices are queried.
- Returns
- 2-tuple of integers
The indices that give the grid point nearest to the given x, y co-ordinates from an array with the same shape as the grid.
-
indices
(*r)¶ Queries the indices for a subdomain in the grid.
Allows either rectangular, circular or polygonial subdomains. This can be used to mask or to query results from a certain sector or subdomain.
- Parameters
- x1, y1, x2, y2, …float
If three parameters are given, then a circular sector is assumed that is given by its center (x1, y1) and the radius x2. If four paramters are given, then a rectangular sector is assumed that is given by two corners (x1, y1) and (x2, y2). If more parameters are given, the subdomain is assumed to have polygonial shape with corners at (x_n, y_n).
- Returns
- 2-tuple of arrays of integers or of numpy slice objects
The indices that can be used to mask/select the grid subdomain from an array with the same shape as the grid.
-