function Widefield_loadTiffStacks(cPath)
if ~exist('cPath','var') || isempty(cPath)
    cPath = '\\whitebox\imag2019\DATA\TeamAwesome\190809-LightField-lightTouchStim-cxWindow\trial1\';
end

files = dir([cPath 'O105*.tif']);



for iFiles = 1 : length(files)
    
    checker = true; Cnt = 0;
    clear cData
    while checker
        try
            Cnt = Cnt  +1;
            cData(:,:,Cnt) = imread([cPath files(iFiles).name], Cnt);
        catch
            checker = false;
        end
    end
    
    if iFiles == 1
        allData4 = zeros(size(cData,1),size(cData,2),size(cData,3),length(files));
    end
    allData4(:,:,:,iFiles) = cData;
    fprintf('load trial %d\n',iFiles) 
 
end


%% dF / F
meanData = nanmean(allData4,4);
baseLine = mean(meanData(:,:,1:20),3);
allData4 = (allData4 - baseLine) ./ baseLine;

