-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauto_align_queue
executable file
·127 lines (95 loc) · 1.99 KB
/
auto_align_queue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/bin/csh -f
#echo $#argv
#set j = 1
#@ j ++
#echo $j
if ($#argv != 7) then
echo "usage: auto_align <# iter> <starting im> <orig im> <num particles> <starting class number> <ending class number> <filter strength>"
exit(0)
endif
set i = 1
set current_images = $2
set orig_im = $3
set numParts = $4
set start_class = $5
set end_class = $6
set filt_strength = $7
@ dec_num = ($start_class - $end_class) / ($1 - 2)
@ numIters = $numParts * 6
if ($i == 1 ) then
mkdir auto_iteration_1
cp ${current_images}.hed auto_iteration_1/mra0.hed
cp ${current_images}.img auto_iteration_1/mra0.img
ln -s auto_iteration_1/mra0.hed current_mra.hed
ln -s auto_iteration_1/mra0.img current_mra.img
cd auto_iteration_1
endif
while ( $i < $1 )
if ($i != 1) then
mkdir auto_iteration_${i}
cd auto_iteration_${i}
endif
pwd
ls -l
ls -l ../
@ l = $dec_num * ${i}
@ l = $l - $dec_num
@ m = $start_class - ${l}
set nodes=${m}
echo "queuing CAN..."
qsub ../CAN_queue.csh ../current_mra classsums${i} $numIters 0.01 0.0005 25 $nodes
while 1
if (-e CAN_is_done) then
rm -f CAN_is_done
break
else
sleep 60
endif
end
echo "queuing pretreat..."
qsub ../pretreat_queue.csh classsums${i}
while 1
if (-e pretreat_is_done) then
rm -f pretreat_is_done
break
else
sleep 60
endif
end
echo "queuing MRA..."
qsub ../mra_queue.csh ../current_mra mra${i} classsums${i}_center_prep_mask_norm ../${orig_im} ${filt_strength}
while 1
if (-e MRA_is_done) then
rm -f MRA_is_done
break
else
sleep 60
endif
end
echo "queuing INCORE PREP..."
qsub ../incore_prep_queue.csh mra${i} mra_filt${i} ${filt_strength}
while 1
if (-e incore_prep_is_done) then
rm -f incore_prep_is_done
break
else
sleep 60
endif
end
mv mra${i}.hed mra_unFilt${i}.hed
mv mra${i}.img mra_unFilt${i}.img
mv mra_filt${i}.hed mra${i}.hed
mv mra_filt${i}.img mra${i}.img
pwd
ls -l
ls -l ../
cd ..
rm -f current_mra.hed
rm -f current_mra.img
ln -s auto_iteration_${i}/mra${i}.hed current_mra.hed
ln -s auto_iteration_${i}/mra${i}.img current_mra.img
pwd
ls -l
ls -l ../
@ i ++
end