Skip to content

Commit

Permalink
save motion corrected file only during last pass
Browse files Browse the repository at this point in the history
  • Loading branch information
epnev committed Mar 17, 2017
1 parent c95a039 commit f521d31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion concatenate_files.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
case {'hdf5','h5'}
h5write(filename,'/mov',Y_temp,[ones(1,nd),sum(ln(1:i-1))+1],size(Y_temp));
case {'tif','tiff'}
saveastiff(cast(Y_temp,data_type),options.tiff_filename,opts_tiff);
saveastiff(cast(Y_temp,data_type),filename,opts_tiff);
end
end
2 changes: 2 additions & 0 deletions normcorre_batch.m
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@
if nd == 2; mem_buffer(:,:,rem_mem-lY+1:rem_mem) = cast(Mf,data_type); end
if nd == 3; mem_buffer(:,:,:,rem_mem-lY+1:rem_mem) = cast(Mf,data_type); end
end
if it == iter
switch lower(options.output_type)
case 'mat'
if nd == 2; M_final(:,:,t:min(t+bin_width-1,T)) = Mf; end
Expand All @@ -399,6 +400,7 @@
saveastiff(cast(mem_buffer(:,:,1:rem_mem),data_type),options.tiff_filename,opts_tiff);
end
end
end

% update template
fprintf('%i out of %i frames registered, iteration %i out of %i \n',t+lY-1,T,it,iter)
Expand Down

0 comments on commit f521d31

Please sign in to comment.