Commit a3be5a15 authored by Hark Braren's avatar Hark Braren
Browse files

small updates to HRTF class

parent 7dd7e4be
......@@ -4,6 +4,7 @@ classdef itaHRTF < itaAudio
%
% Examples:
% hrtf = itaHRTF('sofa','TU-Berlin_QU_KEMAR_anechoic_radius_1m.sofa')
% hrtf = itaHRTF(itaAudio)
%
% These objects can be used like itaAudios and helps to find HRTF angles
% quickly. In addition different methods are implemented to evaluate
......@@ -12,7 +13,7 @@ classdef itaHRTF < itaAudio
% itaHRTF Properties:
% dirCoord Measured directions
% EarSide Ear side ('L' left or 'R' right) of each channel
% TF_type [HRTF DTF Recording]
% TF_type [(HRTF) DTF Recording]
% sphereType [ring cap sphere undefined]
%
% resAzimuth resolution in azimuth (only equiangular)
......@@ -635,7 +636,7 @@ classdef itaHRTF < itaAudio
coordC = itaCoordinates([r thetaC phiC],'sph');
end
idxCoord = this.dirCoord.findnearest(coordC);
idxCoord = this.dirCoord.findnearest(coordC,'sph');
[~, I] = unique(idxCoord);
idxCoordUnique = idxCoord(I);
......@@ -760,7 +761,7 @@ classdef itaHRTF < itaAudio
function this = sortByThetaAndPhi(this)
%sort HRTF by direction, fist in slices (by theta) then in
%increasing order of azimuth (phi)
[~,sortIdx] = sortrows(this.dirCoord,[2,3]);
[~,sortIdx] = sortrows(this.dirCoord.sph,[2,3]);
this = this.direction(sortIdx);
end
......
......@@ -102,7 +102,7 @@ if ~ismember(handleSofa.N_Units,{'hertz','hz','Hertz','Hz'})
end
frequencies = handleSofa.N;
data = handleSofa.Data.Real+1j*handleSofa.Data.Imag;
data = complex(handleSofa.Data.Real,handleSofa.Data.Imag);
if std(diff(frequencies)) > 0.01*mean(diff(frequencies))
ita_verbose_info('Please check frequency Vector. It seems there are some values missing - returnin itaResult',0);
......@@ -115,7 +115,7 @@ else
end
samplingrate = 2*max(fVec);
samplingrate = 2*max(frequencies);
% check number of ears
switch size(data,2)
case 1
......
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