Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /tests/vis15-bugs/badptclC/run_sh.in
ViewVC logotype

View of /tests/vis15-bugs/badptclC/run_sh.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5436 - (download) (annotate)
Wed Sep 27 18:42:00 2017 UTC (19 months, 2 weeks ago) by glk
File size: 1174 byte(s)
now to be configured
#!/bin/bash
set -o errexit
set -o nounset
shopt -s expand_aliases

alias diderotc=@DIDEROTC@
alias unu=@TEEM_BIN@/unu

PROG=badptclC

echo "==================== compiling"
diderotc --snapshot --exec $PROG.diderot

echo "==================== running"

rm -f ID-????.nrrd jh-????.ppm pos-????.nrrd
./$PROG -rad 0.2 -eps 0.0085 -v0 2.3 -s 1 -vol vol.nrrd -ipos ipos.nrrd 2>&1 | tee runlog.txt

echo "==================== post-processing"
JH_XMIN=0.2
JH_XMAX=0.8
JH_YMIN=0.2
JH_YMAX=0.8

export NRRD_STATE_VERBOSE_IO=0
SZ=400
for PIIN in pos-????.nrrd; do
    IIN=${PIIN#*-}
    II=${IIN%.*}
    echo "... $PIIN --> jh-$II.ppm ..."
    unu crop -i $PIIN -min 0 0 -max 1 M -o posxy.nrrd
    unu dice -i ID-$II.nrrd -a 0 -o ./
    for C in 0 1 2; do
        unu jhisto -i posxy.nrrd -min $JH_XMIN $JH_YMIN -max $JH_XMAX $JH_YMAX -b $SZ $SZ -w $C.nrrd -t float |
        unu resample -s x2 x2 -k box |
        unu quantize -b 8 -min 0 -max 255 -o $C.pgm
    done
    unu join -i {0,1,2}.pgm -a 0 -incr -o jh-$II.ppm
done
rm -f posxy.nrrd {0,1,2}.{nrrd,pgm}



# cleanup:
# rm -f ID-????.nrrd jh-????.ppm pos-????.nrrd
# rm -f ID.nrrd pos.nrrd runlog.txt
# rm -f pbfsmini{,.o,.cxx}

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0