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

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
`-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
### Optional arguments:
......
......@@ -7,6 +7,7 @@ Required arguments:
-f map_filename: the file name of the input EM map
-t threshold: the density threshold
-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
Optional arguments:
-i first_iteration: initial recursion level (defaults to 1)
......@@ -18,16 +19,18 @@ Optional arguments:
map_name=
threshold=
n_gaussians=
n_gaussians0=
N=
i0=1
serial=0
while getopts f:t:n:N:i:sh opt
while getopts f:t:n:N:i:0:sh opt
do
case "$opt" in
f) map_name="$OPTARG";;
t) threshold="$OPTARG";;
n) n_gaussians="$OPTARG";;
0) n_gaussians0="$OPTARG";;
N) N="$OPTARG";;
i) i0="$OPTARG";;
s) serial=1;;
......@@ -67,7 +70,6 @@ cd $map_root_dir
mkdir -p converged
for ((i=$i0 ; i<=N ; i++))
do
n=$((n_gaussians**i))
n=$((i))
jobname=${map_name}_${n}
......@@ -78,7 +80,7 @@ do
then
${gmconvert} -imap ${map_name} -zth ${threshold} -oimap threshold.map -ogmm /dev/null -ng 0
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
else
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