Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
fixed stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
MPIBR-vollrathf committed Oct 9, 2016
1 parent 670eeb5 commit a4d8d04
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions functions/CellSortLoadTrials.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,18 @@
%do shift correction on complete video
disp('Performing Shift Correction On All Frames..');
[data_g_array, data_r_array] = CellSortShiftCorrection(data_g_array,data_r_array,reference, 'iter');

%calculate quality plot
reference = mean(data_r_array, 3);
qualityPlot = zeros(1,size(data_r_array, 3));
parfor i = 1:size(data_r_array,3)
qualityPlot(i) = squeeze(mean(mean(data_r_array(:,:,i) - reference,1),2));
end
qualityPlot = qualityPlot.^2;
figure;
plot(qualityPlot);
for i=1:numberGreen
vline(numFrameList(i), 'black', greenFiles(i).name);
end
disp('Finished Loading Trial Files!');
end
2 changes: 1 addition & 1 deletion functions/CellSortLoadTrialsShiftCorrOnTrials.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
data_g{i} = [];
end

disp('Finished Loading Trial Files!');
%calculate quality plot
reference = mean(data_r_array, 3);
qualityPlot = zeros(1,size(data_r_array, 3));
Expand All @@ -63,4 +62,5 @@
for i=1:numberGreen
vline(numFrameList(i), 'black', greenFiles(i).name);
end
disp('Finished Loading Trial Files!');
end
2 changes: 2 additions & 0 deletions main.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
%% load files
%go to corr folder
outFolder = 'F:\Arbeit\testData\PCAICA';
%shifft correction on all frames
%[data_g, data_r, frames, fn_green, fn_red, fileNamesGreen, fileNamesRed] = CellSortLoadTrials(outFolder);
%shift correction only on trials
[data_g, data_r, frames, fn_green, fn_red, fileNamesGreen, fileNamesRed] = CellSortLoadTrialsShiftCorrOnTrials(outFolder);
%If you want to load single files, use the functions below.
% fn_green = 'data_g.tif';
Expand Down

0 comments on commit a4d8d04

Please sign in to comment.