Commit 4ab1e431 authored by samuel hanot's avatar samuel hanot
Browse files

added new option (-0 n0) that can be used to specify number of gaussians at first iteration

parent 2e6c0aa6
...@@ -27,6 +27,8 @@ ${SRC_DIR}/recursive_gmconvert.sh -f map_filename -t threshold -n num_gaussians ...@@ -27,6 +27,8 @@ ${SRC_DIR}/recursive_gmconvert.sh -f map_filename -t threshold -n num_gaussians
`-n num_gaussians`: number of gaussians per sub-process `-n num_gaussians`: number of gaussians per sub-process
`-0 num_gaussians0`: number of gaussians for first iteration
`-N num_iterations`: number of recursion levels `-N num_iterations`: number of recursion levels
### Optional arguments: ### Optional arguments:
......
...@@ -7,6 +7,7 @@ Required arguments: ...@@ -7,6 +7,7 @@ Required arguments:
-f map_filename: the file name of the input EM map -f map_filename: the file name of the input EM map
-t threshold: the density threshold -t threshold: the density threshold
-n num_gaussians: number of gaussians per sub-process -n num_gaussians: number of gaussians per sub-process
-0 num_gaussians0: number of gaussians for first iteration
-N num_iterations: number of recursion levels -N num_iterations: number of recursion levels
Optional arguments: Optional arguments:
-i first_iteration: initial recursion level (defaults to 1) -i first_iteration: initial recursion level (defaults to 1)
...@@ -18,16 +19,18 @@ Optional arguments: ...@@ -18,16 +19,18 @@ Optional arguments:
map_name= map_name=
threshold= threshold=
n_gaussians= n_gaussians=
n_gaussians0=
N= N=
i0=1 i0=1
serial=0 serial=0
while getopts f:t:n:N:i:sh opt while getopts f:t:n:N:i:0:sh opt
do do
case "$opt" in case "$opt" in
f) map_name="$OPTARG";; f) map_name="$OPTARG";;
t) threshold="$OPTARG";; t) threshold="$OPTARG";;
n) n_gaussians="$OPTARG";; n) n_gaussians="$OPTARG";;
0) n_gaussians0="$OPTARG";;
N) N="$OPTARG";; N) N="$OPTARG";;
i) i0="$OPTARG";; i) i0="$OPTARG";;
s) serial=1;; s) serial=1;;
...@@ -67,7 +70,6 @@ cd $map_root_dir ...@@ -67,7 +70,6 @@ cd $map_root_dir
mkdir -p converged mkdir -p converged
for ((i=$i0 ; i<=N ; i++)) for ((i=$i0 ; i<=N ; i++))
do do
n=$((n_gaussians**i))
n=$((i)) n=$((i))
jobname=${map_name}_${n} jobname=${map_name}_${n}
...@@ -78,7 +80,7 @@ do ...@@ -78,7 +80,7 @@ do
then then
${gmconvert} -imap ${map_name} -zth ${threshold} -oimap threshold.map -ogmm /dev/null -ng 0 ${gmconvert} -imap ${map_name} -zth ${threshold} -oimap threshold.map -ogmm /dev/null -ng 0
fi fi
echo ${profile_cmd} ${gmconvert} -imap ${map_name} -ogmm $n/${n}_0.gmm -ng ${n_gaussians} -zth ${threshold} echo ${profile_cmd} ${gmconvert} -imap ${map_name} -ogmm $n/${n}_0.gmm -ng ${n_gaussians0} -zth ${threshold}
echo ${gmconvert} -igmm $n/${n}_0.gmm -imap ${map_name} -omap /dev/null echo ${gmconvert} -igmm $n/${n}_0.gmm -imap ${map_name} -omap /dev/null
else else
n_prev=$((i-1)) n_prev=$((i-1))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment