Closed zqwei closed 7 years ago
from Yinan ---
w = 40; // baselineWindowSize p = 20; //baselinePrc background = 90; baseline = nan(nCells, numel(timepoints)); for i = 1:numel(timepoints) timeWindow = max(1, i-w+1):min(i+w,numel(timepoints)); baseline(:, i) = prctile(profile_all(:, timeWindow), p, 2); end dff = (profile_all - baseline)./(repmat(nanmean(baseline, 2), 1, numel(timepoints))-background);
@yinan-wan Is minus background a must-do?
I guess not. We use zscored data anyway so minus background is just a factor right?
from Yinan ---