SpatialInterpolatorConstantRotation#

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

Bases: SpatialInterpolator

Performs spatial linear interpolation for sources undergoing constant rotation.

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

This class interpolates signals from a rotating sound source based on a constant rotational speed. It retrieves samples from the source and applies interpolation before generating output through the result() generator.

See also

SpatialInterpolator

Base class for spatial interpolation of microphone data.

SpatialInterpolatorRotation

Spatial interpolation class for rotating sound sources.

rotational_speed

Rotational speed of the source in revolutions per second (rps). A positive value indicates counterclockwise rotation around the positive z-axis, meaning motion from the x-axis toward the y-axis.

digest

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

result(num=1)

Generate interpolated time signal data in blocks of size num.

This generator method continuously processes incoming time signal data while applying rotational interpolation. The phase delay is computed based on the rotational speed and applied to the signal.

Parameters:
numint, optional

Number of samples per block. Default is 1.

Yields:
numpy.ndarray

An array containing the 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.