freqrir module

freqrir.freqrir.frequency_rir(receivers, source, room_dimensions, betas, points, sample_frequency, frequency, c=304.8, T=0.0001, order=- 1)

Calculate room impulse response in the frequency domain.

Parameters
  • receiver (list[float] with shape (3,)) – Reciever location in sample periods (s).

  • source (list[float] with shape(3,)) – Source location in sample periods (s).

  • room_dimensions (list[float] with shape (3,)) – Room dimensions in sample periods (s).

  • betas (float np-array with shape (3,2)) – Absorbtion coefficients. Walls: left, right, front, back, floor, ceiling.

  • points (int) – Number of points, which determines precisions of bins.

  • sample_frequency (float) – Sampling frequency or sampling rate (Hz).

  • frequency (float) – Frequency of interest (Hz).

  • c (float, optional) – Speed of sound (m/s). Defaults to 304.8 m/s (i.e. 1 ft/ms) (Allen 1979).

  • T (float, optional) – Sampling period (s). Defaults to 1E-4 s (i.e. 0.1 ms) (Allen 1979).

  • order (int, optional) – Maximum order of reflections. Defaults to -1 (i.e. all reflections).

Returns

A pressure wave in the frequency domain.

Return type

pressure (complex)

Raises

ValueError – If source and receiver are too close together (i.e. within 0.5 sampling periods).