Commit 458eec75 authored by Jonas Stienen's avatar Jonas Stienen

Merge branch 'master' of https://git.rwth-aachen.de/ita/toolbox

parents 618f72b2 37c61750
......@@ -137,12 +137,13 @@ for idxRun = 1:sArgs.nRuns
equalizationRadSource = 2;
% room transfer function (free field assumption at this point)
Psi = sph_transfer_path(posReceiver,receiverNmax,posSource,sourceNmax,kVec,...
'r',distSourceReceiver,'r_eq',equalizationRadSource,'norm',false);
PsiAliasReceiver = sph_transfer_path(posReceiver,receiverNmaxAlias,posSource,sourceNmax,kVec,...
'r',distSourceReceiver,'r_eq',equalizationRadSource,'norm',false);
PsiAliasSource = sph_transfer_path(posReceiver,receiverNmax,posSource,sourceNmaxAlias,kVec,...
Psi = sph_transfer_path(posReceiver,receiverNmaxAlias,posSource,sourceNmaxAlias,kVec,...
'r',distSourceReceiver,'r_eq',equalizationRadSource,'norm',false);
PsiAliasReceiver = Psi(1:(receiverNmaxAlias+1)^2,1:(sourceNmax+1)^2,:);
PsiAliasSource = Psi(1:(receiverNmax+1)^2,1:(sourceNmaxAlias+1)^2,:);
Psi = Psi(1:(receiverNmax+1)^2,1:(sourceNmax+1)^2,:);
if ~isempty(samplingDisplacement) && isempty(SNR)
% rest happens inside loop, only here in case of an error
......@@ -178,7 +179,7 @@ for idxRun = 1:sArgs.nRuns
if isempty(dirMeasurementFile)
sourceBalias = ita_sph_modal_strength(sourceSampling,sourceNmaxAlias,kVec(idxFreq),'rigid','transducer','ls');
sourceB = sourceBalias(1:(sourceNmax+1)^2,1:(sourceNmax+1)^2);
if numel(unique(sourceSampling.r)) == 1;
if numel(unique(sourceSampling.r)) == 1
Msource = sourceB * (sourceG.'.*sourceY');
else
Msource = sourceB .* (sourceG.'.*sourceY');
......@@ -237,7 +238,7 @@ for idxRun = 1:sArgs.nRuns
% alias error needed here since antialias bf needs them and parfor
% requires the variables to be initialized
if simSMA
if numel(unique(receiverSampling.r)) == 1;
if numel(unique(receiverSampling.r)) == 1
EreceiverAlias = receiverYalias*receiverBalias;
else
EreceiverAlias = receiverYalias.*receiverBalias;
......@@ -542,7 +543,7 @@ data = fft(data);
if isEven
data = data(1:(nSamples+2)/2,:,:);
else
display('MBE_FFT:: Be careful with odd numbers of time samples!');
disp('MBE_FFT:: Be careful with odd numbers of time samples!');
data = data(1:(nSamples+1)/2,:,:);
end
......@@ -558,4 +559,4 @@ if strcmp(signalType,'power')
end
end
end
\ No newline at end of file
end
......@@ -18,15 +18,10 @@ nSH = (nmax+1).^2;
filename = ['/Womersley/md' num2str(nmax,'%02d') '.' num2str(nSH,'%04d')];
% filepath = '~/MATLAB/Griddata';
% if ~exist(filepath,'dir')
% error(['Griddata folder missing: ' filepath])
url = 'http://www.ita-toolbox.org/Griddata';
hyper = str2num(urlread([url filename])); %#ok<ST2NM>
% else
% hyper = load([filepath filename]);
% end
url = 'http://www.ita-toolbox.org/Griddata';
hyper = str2num(urlread([url filename])); %#ok<ST2NM>
s = itaSamplingSph(hyper(:,1:3),'cart');
s.r = ones(s.nPoints,1);
s.weights = hyper(:,4);
s.nmax = nmax;
......@@ -115,7 +115,7 @@ for idx = 1:length(field_token)
token = field_token{idx};
if numel(token) >= 5 % RSC - support for arguments shorter than 5 elements
if strcmpi(token(1:3),'pos') && strcmpi(token(5),'_')
pos_num = str2double(token(4)); %this is the fixed position number in the argument list
pos_num = sscanf(token(4),'%d'); %this is the fixed position number in the argument list
token_new = token(6:end); %get rid off prefix
if pos_num <= numel(Arguments) % rsc - check if enough arguments are given
value = Arguments{pos_num}; %get value/object
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment