0001 function info = bml_neuroomega_info_depth(cfg)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 sortvar = ft_getopt(cfg,'sort','depth');
0022 direction = ft_getopt(cfg,'direction','descend');
0023
0024 files = bml_neuroomega_info_file(cfg);
0025 files.size = files{:,'bytes'}/1e6;
0026
0027 info=varfun(@(x)round(sum(x),1),files,'InputVariables','size',...
0028 'GroupingVariables','depth');
0029 if ismember('time_begin', files.Properties.VariableNames)
0030 info=join(info,...
0031 varfun(@min,files,'InputVariables','time_begin',...
0032 'GroupingVariables','depth')...
0033 ,'Keys','depth');
0034 end
0035 if ismember('time_end', files.Properties.VariableNames)
0036 info=join(info,...
0037 varfun(@max,files,'InputVariables','time_end',...
0038 'GroupingVariables','depth')...
0039 ,'Keys','depth');
0040 end
0041 if all(ismember({'time_begin','time_end'}, files.Properties.VariableNames))
0042 files.file_duration=files.time_end-files.time_begin;
0043 info=join(info,...
0044 varfun(@sum,files,'InputVariables','file_duration',...
0045 'GroupingVariables','depth')...
0046 ,'Keys','depth');
0047 info.duration=info.max_time_end-info.min_time_begin;
0048 info.contiguous=info.sum_file_duration > 0.99 * info.duration;
0049 end
0050
0051 if ismember('GroupCount_info', info.Properties.VariableNames)
0052 info.Properties.VariableNames{'GroupCount_info'} = 'files';
0053 elseif ismember('GroupCount', info.Properties.VariableNames)
0054 info.Properties.VariableNames{'GroupCount'} = 'files';
0055 end
0056
0057
0058 info(:,strncmp('GroupCount',info.Properties.VariableNames,10))=[]
0059
0060 info.Properties.VariableNames{'Fun_size'} = 'size';
0061
0062
0063 info=sortrows(info,sortvar,direction);
0064
0065
0066
0067
0068
0069
0070