-
Notifications
You must be signed in to change notification settings - Fork 1
/
MocoMacro.ijm
24 lines (23 loc) · 871 Bytes
/
MocoMacro.ijm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
path = "/media/HDnyc_data/data_analysis/in_vivo_cerebellum_walking/LocoRungsData/171126_m90/";
fName = "171126_m90_2018.01.18_000_CheckMovement_015_ImageStack.tif";
savePath = "/media/HDnyc_data/data_analysis/in_vivo_cerebellum_walking/LocoRungsData/171126_m90/";
avgName = "AVG_"+fName;
open(path+fName);
run("Z Project...", "stop=1 projection=[Average Intensity]");
arg = "value=208 downsample_value=0 template=AVG_"+fName+" stack="+fName+" log=[Generate log file] plot=[Plot RMS]"
run("moco ", arg)
selectWindow("New Stack");
fNameLength = lengthOf(fName);
saveName = substring(fName,0, (fNameLength-4));
saveAs("Results", savePath+saveName+"_moco.csv");
selectWindow("Errors");
close();
selectWindow("New Stack");
save(savePath+saveName+"_moco.tif");
close();
selectWindow("AVG_"+fName);
close();
selectWindow(fName);
close();
//selectWindow("Results");
//close();