forked from polarch/Spherical-Array-Processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamWeightsPressureVelocity.m
29 lines (28 loc) · 1.26 KB
/
beamWeightsPressureVelocity.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function M_sh2pv = beamWeightsPressureVelocity(basisType)
% BEAMWEIGHTSPRESSUREVELOCITY Convert from SH signals to pressure velocity
%
% Returns the 4x4 matrix that converts first-order SH signals to pressure
% velocity signals, with the ordering [p v_x v_y v_z], where v_xyz are the
% cartesian components of the acoustic veclocity vector.
%
% basisType: 'complex' or 'real' for the respective type of spherical
% harmonics under use.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% BEAMWEIGHTSPRESSUREVELOCITY.M - 11/7/2013
% Archontis Politis, [email protected]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
switch basisType
case 'real'
M_sh2pv = sqrt(4*pi)*[ 1 0 0 0;
0 0 0 1/sqrt(3);
0 1/sqrt(3) 0 0;
0 0 1/sqrt(3) 0];
case 'complex'
M_sh2pv = sqrt(4*pi)*[ 1 0 0 0;
0 1/sqrt(6) 0 -1/sqrt(6);
0 -1i/sqrt(6) 0 -1i/sqrt(6);
0 0 1/sqrt(3) 0];
end