Skip to content

Commit

Permalink
pass the options struct also as an output
Browse files Browse the repository at this point in the history
  • Loading branch information
epnev committed Nov 26, 2017
1 parent a6e6599 commit 63ccd37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demo.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
%Y = Y - min(Y(:));
%% set parameters (first try out rigid motion correction)

options_rigid = NoRMCorreSetParms('d1',size(Y,1),'d2',size(Y,2),'bin_width',50,'max_shift',15,'us_fac',50,'init_batch',200);
options_rigid = NoRMCorreSetParms('d1',size(Y,1),'d2',size(Y,2),'bin_width',200,'max_shift',15,'us_fac',50,'init_batch',200);

%% perform motion correction
tic; [M1,shifts1,template1] = normcorre(Y,options_rigid); toc
tic; [M1,shifts1,template1,options_rigid] = normcorre(Y,options_rigid); toc

%% now try non-rigid motion correction (also in parallel)
options_nonrigid = NoRMCorreSetParms('d1',size(Y,1),'d2',size(Y,2),'grid_size',[32,32],'mot_uf',4,'bin_width',50,'max_shift',15,'max_dev',3,'us_fac',50,'init_batch',200);
tic; [M2,shifts2,template2] = normcorre_batch(Y,options_nonrigid); toc
options_nonrigid = NoRMCorreSetParms('d1',size(Y,1),'d2',size(Y,2),'grid_size',[32,32],'mot_uf',4,'bin_width',200,'max_shift',15,'max_dev',3,'us_fac',50,'init_batch',200);
tic; [M2,shifts2,template2,options_nonrigid] = normcorre_batch(Y,options_nonrigid); toc

%% compute metrics

Expand Down

0 comments on commit 63ccd37

Please sign in to comment.