stats/run.sh

Tue, 06 Oct 2026 01:11:33 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Tue, 06 Oct 2026 01:11:33 -0500
changeset 16
841a0d255db3
parent 13
2cb7f20654e6
permissions
-rwxr-xr-x

Add n_spikes to summary

#!/bin/sh

iters=5000

set -e

for f in "$@"; do
    if ! test -f "$f"; then
        echo "$f does not exist"
        exit 1
    fi
done

i=1
n=$#
for f in "$@"; do
    a=$(basename "$f" .py)
    #prefix="results_$(hg id -i)_$(hg --repo=../pointsource_algs id -i)_$(hg --repo=../measures id -i)"
    prefix="results"
    printf '\033]2;%s\033\\' "${prefix}_$a"
    tmp=$(mktemp)
    sed "s/laser_and_mirrors/laser_and_mirrors2/; s/mirrors2_aux/mirrors_aux2/;" "$f" > "$tmp"
    if echo "$a" | grep do_non_sliding=False  > /dev/null; then
        nice cargo run --release  --   -o "${prefix}_$a" -a radon_sliding_fb --max-iter $iters "$f" "$tmp"
    else
        nice cargo run --release  --   -o "${prefix}_$a" -a radon_sliding_fb -a radon_fb --max-iter $iters "$f" "$tmp"
    fi
    #echo "Results in ${prefix}_$a"
    i=$(expr $i + 1)
done

for f in "$@"; do
    a=$(basename "$f" .py)
    echo "Results in ${prefix}_$a"
done

mercurial