timerir module
- freqrir.timerir.high_pass_filter(pressures, points, sample_frequency)
High-pass digital filter to wierd behaviour at low frequencies (i.e. 100 Hz).
- Parameters
pressures (list[complex]) – Pressure wave in the time domain.
points (int) – The number of points.
sample_frequency (float) – Sampling frequency or sampling rate (Hz).
- Returns
Pressure wave with frequencies below cutoff removed.
- Return type
pressures (list[complex])
- freqrir.timerir.time_rir(receivers, source, room_dimensions, betas, points, sample_frequency, order=- 1, c=304.8)
Calculate room impulse response in the time domain.
- Parameters
receivers (list[list[float]] with shape (N,3)) – Reciever location(s) 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).
c (float, optional) – Speed of sound (m/s). Defaults to 304.8 m/s (i.e. 1 ft/ms) (Allen 1979).
- Returns
A pressure wave in the time domain.
- Return type
pressures (list[complex])
- Raises
ValueError – If source and receiver are too close together (i.e. within 0.5 sampling periods).
- freqrir.timerir.time_rir_slow(receiver, source, room_dimensions, betas, points, sample_frequency, c=304.8)
Calculate room impulse response in the time 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).
c (float, optional) – Speed of sound (m/s). Defaults to 304.8 m/s (i.e. 1 ft/ms) (Allen 1979).
- Returns
A pressure wave in the time domain.
- Return type
pressures (list[complex])
- Raises
ValueError – If source and receiver are too close together (i.e. within 0.5 sampling periods).