acdecom.WaveGuide.decompose¶
-
WaveGuide.
decompose
(data, f_col, probe_col, case_col=None, Mach_col=None, temperature_col=None, Ps_col=None)¶ Decompose sound fields into modal components. The function can process several frequencies and test-cases at the same time. It returns \(p_\pm\) , which contains all complex mode amplitudes of the propagating modes in \(z_+\) and \(p_-\) direction.
\[p_\pm = M^{-1} p\]- Parameters
data (numpy.ndArray (complex)) –
All data that is needed for the decomposition. The columns in the srray are the relevant parameters for the decomposition (pressure values, frequencies, temperatures, Mach-numbers). The rows are measurements of different frequencies and test-cases. A measurement of a single frequency for a test with three microphones would have at following format:
Frequency [Hz]
Mic1
Mic2
Mic3
f1
P1
P2
P3
A measurement of multiple frequencies for a test with three microphones would have at following format:
Frequency [Hz]
Mic1
Mic2
Mic3
f1
P11
P21
P31
f2
P12
P22
P32
…
…
…
…
fn
P1n
p2n
p3n
A measurement of a multiple frequencies with multiple tests per frequencies with three microphones would have at following format:
Frequency [Hz]
Case
Mic1
Mic2
Mic3
f1
0
P110
P210
P310
f1
1
P111
P211
p311
…
…
…
…
…
fn
m
p1nm
p2nm
p3nm
The method can process any number of testcases, frequencies, and microphones.
f_col (integer) – Column in data in which the frequency is stored. Starting with 0.
probe_col (array_like) – Columns in data in which the pressure at the different probe locations is stored. Starting with 0. The order of the probes must be the same as for the microphone positions.
case_col (integer, optional) – Column in data in which the case number is stored. Important for tests with multiple loudspeakers. Starting with 0. Defaults to None.
Mach_col (integer, optional) – Column in data in which the Mach-number is stored. Starting with 0. Defaults to None.
temperature_col (integer, optional) – Column in data in which the temperature is stored. Starting with 0. Defaults to None.
Ps_col (integer, optional) – Column in data in which the static pressure is stored. Starting with 0. Defaults to None.
- Returns
Returns (decomposed_fields, headers). decomposed_fields (numpy.ndArray) contains the complex mode amplitudes (as columns) for the different test cases (as rows). headers (list) contains the names of the columns in decomposed_fields.
- Return type
tuple