Skip to content

Commit

Permalink
Avoid overwriting original ALL_CELLS.mat files
Browse files Browse the repository at this point in the history
  • Loading branch information
sebromano authored Nov 16, 2017
1 parent 06686dc commit 23c5533
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Toolbox software/SanityTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,16 @@
distances=data.distances; pixelLengthX=data.pixelLengthX; pixelLengthY=data.pixelLengthY;

cut=strfind(filename,'.mat');
filenameBackUp=[filename(1:cut-1) '_Original.mat'];
doneOriginal=0; countOriginal=1;
while doneOriginal==0
filenameBackUp=[filename(1:cut-1) '_Original' num2str(countOriginal) '.mat'];
if exist(filenameBackUp)==2
countOriginal=countOriginal+1;
continue
else
doneOriginal=1;
end
end
save(filenameBackUp,'avg','bkg','cell_number','cells_mean','npil_mean','cell_per','cells','distances','pixelLengthX','pixelLengthY');
deleted.bkg=zeros(size(bkg));
for i=1:length(deletedCells)
Expand Down

0 comments on commit 23c5533

Please sign in to comment.