This is a static copy of a profile report

Home

flagRFI_std>padSmooth (12 calls, 0.645 sec)
Generated 05-Aug-2011 13:00:40 using cpu time.
subfunction in file /home/LeechJ/cbass_analysis/reduc/flagRFI_std.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
flagRFI_stdfunction12
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
562
dataVecT = interp1(xVec(flagVe...
120.404 s62.7%
590
dataVecFilt = real(ifft(fft(da...
120.164 s25.4%
583
dataVecPad(1:padParams(2)) = ....
120.044 s6.8%
586
dataVecPad(end-padParams(3)+1:...
120.022 s3.4%
566
dataVecF = dataVec .* (1 - fla...
120.011 s1.7%
All other lines  0 s0%
Totals  0.645 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
interp1function120.262 s40.7%
smoothfunction120.120 s18.6%
repmatfunction240.033 s5.1%
medianfunction240.022 s3.4%
substructfunction20 s0%
meanfunction20 s0%
Self time (built-ins, overhead, etc.)  0.208 s32.2%
Totals  0.645 s100% 
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function37
Non-code lines (comments, blank lines)20
Code lines (lines that can run)17
Code lines that did run14
Code lines that did not run3
Coverage (did run/can run)82.35 %
Function listing
   time   calls  line
558 function smoothVec = padSmooth(xVec,dataVec,kernelVec,flagVec,padParams)
559
560
561 % Interpolate over the flagged regions.
0.40 12 562 dataVecT = interp1(xVec(flagVec == 0), ...
563 smooth(dataVec(flagVec == 0),ceil(length(dataVec) / 100)), ...
564 (1:length(dataVec)), 'pchip');
565
0.01 12 566 dataVecF = dataVec .* (1 - flagVec) + flagVec .* dataVecT;
567
12 568 if flagVec(1) == 1
2 569 noFlagPos = find(flagVec == 0,1,'first');
570
2 571 dataVecF(1:noFlagPos-1) = mean(dataVecF(noFlagPos:noFlagPos+99));
2 572 end
12 573 if flagVec(end) == 1
574 noFlagPos = find(flagVec == 0,1,'last');
575
576 dataVecF(noFlagPos+1:end) = mean(dataVecF(noFlagPos-99:noFlagPos));
577 end
578
579
580
581 % Pad the data up to a power of two.
12 582 dataVecPad = zeros(padParams(1),1);
0.04 12 583 dataVecPad(1:padParams(2)) = ...
584 repmat(median(dataVecF(1:10)),padParams(2),1);
12 585 dataVecPad(padParams(2)+1:padParams(2)+length(dataVec)) = dataVecF;
0.02 12 586 dataVecPad(end-padParams(3)+1:end) = ...
587 repmat(median(dataVecF(end-9:end)),padParams(3),1);
588
589 % Perform a Fourier filtering.
0.16 12 590 dataVecFilt = real(ifft(fft(dataVecPad).*fft(kernelVec)));
591
592 % And then clip off the padding.
12 593 smoothVec = dataVecFilt(padParams(2)+1:end - padParams(3));
12 594 end

Other subfunctions in this file are not included in this listing.