SpatialInterpolatorRotation#

class acoular.tprocess.SpatialInterpolatorRotation(*args, **kwargs)

Bases: SpatialInterpolator

Spatial interpolation class for rotating sound sources.

Deprecated since version :class:`SpatialInterpolatorRotation`: is deprecated and will be removed in version 27.01.

This class extends SpatialInterpolator to handle sources that undergo rotational movement. It retrieves samples from the source attribute and angle data from the AngleTracker instance (angle_source). Using these inputs, it computes interpolated outputs through the result() generator method.

See also

SpatialInterpolator

Base class for spatial interpolation of microphone data.

angle_source

Provides real-time tracking of the source’s rotation angles, instance of AngleTracker.

digest

Unique identifier for the current configuration of the interpolator. (read-only)

result(num=128)

Generate interpolated output samples in block-wise fashion.

This method acts as a generator, yielding time-domain time signal samples that have been spatially interpolated based on rotational movement.

Parameters:
numint, optional

Number of samples per block. Default is 128.

Yields:
numpy.ndarray

Interpolated time signal samples in blocks of shape (num, num_channels), where num_channels is inherited from the SpatialInterpolator base class. The last block may contain fewer samples if the total number of samples is not a multiple of num.

sinc_mic(r)

Compute a modified sinc function for use in Radial Basis Function (RBF) approximation.

This function is used as a kernel in sinc-based interpolation methods, where the sinc function serves as a basis function for reconstructing signals based on spatially distributed microphone data. The function is scaled according to the number of virtual microphone positions, ensuring accurate signal approximation.

Parameters:
rfloat or list of floats

The radial distance(s) at which to evaluate the sinc function, typically representing the spatial separation between real and virtual microphone positions.

Returns:
numpy.ndarray

Evaluated sinc function values at the given radial distances.

source

The input data source. It must be an instance of a SamplesGenerator-derived class. It provides the time-domain pressure samples from microphones.

mics

The physical microphone geometry. An instance of MicGeom that defines the positions of the real microphones used for measurement.

mics_virtual

The virtual microphone geometry. This property defines the positions of virtual microphones where interpolated pressure values are computed. Default is the physical microphone geometry (mics).

method

Interpolation method used for spatial data estimation.

Options:

  • 'linear': Uses NumPy linear interpolation.

  • 'spline': Uses SciPy’s CubicSpline interpolator

  • 'rbf-multiquadric': Radial basis function (RBF) interpolation with a multiquadric kernel.

  • 'rbf-cubic': RBF interpolation with a cubic kernel.

  • 'IDW': Inverse distance weighting interpolation.

  • 'custom': Allows user-defined interpolation methods.

  • 'sinc': Uses sinc-based interpolation for signal reconstruction.

array_dimension

Defines the spatial dimensionality of the microphone array.

Possible values:

  • '1D': Linear microphone arrays.

  • '2D': Planar microphone arrays.

  • 'ring': Circular arrays where rotation needs to be considered.

  • '3D': Three-dimensional microphone distributions.

  • 'custom': User-defined microphone arrangements.

sample_freq

Sampling frequency of the output signal, inherited from the source. This defines the rate at which microphone pressure samples are acquired and processed.

num_channels

Number of channels in the output data. This corresponds to the number of virtual microphone positions where interpolated pressure values are computed. The value is ´determined based on the mics_virtual geometry.

num_samples

Number of time-domain samples in the output signal, inherited from the source.

interp_at_zero

Whether to interpolate a virtual microphone at the origin. If set to True, an additional virtual microphone position at the coordinate origin \((0,0,0)\) will be interpolated.

Q

Transformation matrix for coordinate system alignment.

This 3x3 orthogonal matrix is used to align the microphone coordinates such that rotations occur around the z-axis. If the original coordinates do not conform to the expected alignment (where the x-axis transitions into the y-axis upon rotation), applying this matrix modifies the coordinates accordingly. The transformation is defined as

\[\begin{split}\begin{bmatrix}x'\\y'\\z'\end{bmatrix} = Q \cdot \begin{bmatrix}x\\y\\z\end{bmatrix}\end{split}\]

where \(Q\) is the transformation matrix and \((x', y', z')\) are the modified coordinates. If no transformation is needed, \(Q\) defaults to the identity matrix.

num_IDW

Number of neighboring microphones used in IDW interpolation. This parameter determines how many physical microphones contribute to the weighted sum in inverse distance weighting (IDW) interpolation.

p_weight

Weighting exponent for IDW interpolation. This parameter controls the influence of distance in inverse distance weighting (IDW). A higher value gives more weight to closer microphones.