Grid Objects¶
Routines to perform grid search on the sphere
-
class
pyroomacoustics.doa.grid.
Grid
(n_points)¶ Bases:
object
This is an abstract class with attributes and methods for grids
Parameters: n_points (int) – the number of points on the grid -
apply
(func, spherical=False)¶
-
find_peaks
(k=1)¶
-
set_values
(vals)¶
-
-
class
pyroomacoustics.doa.grid.
GridCircle
(n_points=360, azimuth=None)¶ Bases:
pyroomacoustics.doa.grid.Grid
Creates a grid on the circle.
Parameters: - n_points (int, optional) – The number of uniformly spaced points in the grid.
- azimuth (ndarray, optional) – An array of azimuth (in radians) to use for grid locations. Overrides n_points.
-
apply
(func, spherical=False)¶
-
find_peaks
(k=1)¶
-
plot
(mark_peaks=0)¶
-
class
pyroomacoustics.doa.grid.
GridSphere
(n_points=1000, spherical_points=None)¶ Bases:
pyroomacoustics.doa.grid.Grid
This function computes nearly equidistant points on the sphere using the fibonacci method
Parameters: - n_points (int) – The number of points to sample
- spherical_points (ndarray, optional) – A 2 x n_points array of spherical coordinates with azimuth in the top row and colatitude in the second row. Overrides n_points.
References
http://lgdv.cs.fau.de/uploads/publications/spherical_fibonacci_mapping.pdf http://stackoverflow.com/questions/9600801/evenly-distributing-n-points-on-a-sphere
-
apply
(func, spherical=False)¶ Apply a function to every grid point
-
find_peaks
(k=1)¶ Find the largest peaks on the grid
-
min_max_distance
()¶ Compute some statistics on the distribution of the points
-
plot
(colatitude_ref=None, azimuth_ref=None, colatitude_recon=None, azimuth_recon=None, plotly=True, projection=True, points_only=False)¶
-
plot_old
(plot_points=False, mark_peaks=0)¶ Plot the points on the sphere with their values
-
regrid
()¶ Regrid the non-uniform data on a regular mesh