Commit cf29106c authored by sstucker's avatar sstucker
Browse files

Added waitbar to hrf table generation because it takes a long time

parent 57600b67
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -670,9 +670,10 @@ classdef ProcResultClass < handle
            tblcells = TableCell.empty();
            if isa(obj.dcAvg, 'DataClass')
                dataTimeSeries = obj.dcAvg(iBlk).GetDataTimeSeries('');
                
                h = waitbar_improved(0, sprintf('Generating table cells for export ... 0%% complete.'));
                % Data rows
                for iCond = 1:length(CondNames)
                    waitbar_improved(iCond/length(CondNames), h, sprintf('Generating table cells for export ... %d%% complete.', uint32(100 * iCond/length(CondNames))));
                    measListIdxs = obj.dcAvg(iBlk).GetMeasurementListIdxs(iCond);
                    for iCh = measListIdxs
                        iT = (obj.dcAvg.time >= trange(1)) & (obj.dcAvg.time <= trange(2));
@@ -685,6 +686,7 @@ classdef ProcResultClass < handle
                        tblcells(iCond, mod(iCh-1, length(measListIdxs))+1) = TableCell(cname, width);
                    end
                end
                close(h);
            end
        end
        
@@ -710,7 +712,9 @@ classdef ProcResultClass < handle
                end
                
                % Data rows
                h = waitbar_improved(0, sprintf('Generating table cells for export ... 0%% complete.'));
                for t = 1:size(dataTimeSeries,1)
                    waitbar_improved(t/size(dataTimeSeries,1), h, sprintf('Generating table cells for export ... %d%% complete.', uint32(100 * t/size(dataTimeSeries,1))));
                    for iCh = 1:length(measList)
                        if isnan(dataTimeSeries(t,iCh))
                            cname  = 'NaN';
@@ -720,6 +724,7 @@ classdef ProcResultClass < handle
                        tblcells(t+2,iCh) = TableCell(cname, 12);
                    end
                end
                close(h);
            else
                
            end