Loading scripts/td_object_renderer/modeling_tool/preprocessing/data_SOFA.m +16 −12 Original line number Diff line number Diff line Loading @@ -80,6 +80,9 @@ classdef data_SOFA < handle function obj = get_hrf_itd(obj) % Load the SOFA file if verLessThan('matlab', '10.0') meas = SOFAload(fullfile(obj.info.folderNameOnset,'..',obj.info.fileNameHrf)); else netcdf.inqLibVers; sf = py.sofar.read_sofa(fullfile(obj.info.folderNameOnset,'..',obj.info.fileNameHrf)); meas.ListenerPosition = double(py.array.array('d', py.numpy.nditer(sf.ListenerPosition))); Loading @@ -92,6 +95,7 @@ classdef data_SOFA < handle dim = double(py.array.array('d', sf.Data_IR.shape)); data = double(py.array.array('d', py.numpy.nditer(sf.Data_IR))); meas.Data.IR = permute(reshape(data,fliplr(dim)), [3 2 1]); end obj.info.listenerPosition = meas.ListenerPosition; obj.info.listenerView = meas.ListenerView; Loading Loading
scripts/td_object_renderer/modeling_tool/preprocessing/data_SOFA.m +16 −12 Original line number Diff line number Diff line Loading @@ -80,6 +80,9 @@ classdef data_SOFA < handle function obj = get_hrf_itd(obj) % Load the SOFA file if verLessThan('matlab', '10.0') meas = SOFAload(fullfile(obj.info.folderNameOnset,'..',obj.info.fileNameHrf)); else netcdf.inqLibVers; sf = py.sofar.read_sofa(fullfile(obj.info.folderNameOnset,'..',obj.info.fileNameHrf)); meas.ListenerPosition = double(py.array.array('d', py.numpy.nditer(sf.ListenerPosition))); Loading @@ -92,6 +95,7 @@ classdef data_SOFA < handle dim = double(py.array.array('d', sf.Data_IR.shape)); data = double(py.array.array('d', py.numpy.nditer(sf.Data_IR))); meas.Data.IR = permute(reshape(data,fliplr(dim)), [3 2 1]); end obj.info.listenerPosition = meas.ListenerPosition; obj.info.listenerView = meas.ListenerView; Loading