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

SCM Repository

[diderot] View of /tests/lamont-tests/unit-circle-go.sh
ViewVC logotype

View of /tests/lamont-tests/unit-circle-go.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (as text) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 10 months ago) by glk
File size: 1371 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
#!/bin/bash
set -o errexit
set -o nounset
shopt -s expand_aliases
JUNK=""
function junk {
  JUNK="$JUNK $@"
}
function cleanup {
  rm -rf $JUNK
}
trap cleanup err exit int term

export NRRD_STATE_VERBOSE_IO=0

PROG=unit-circle-pc3


NN=50
RNG=1
echo "0 0 0 0" | unu reshape -s 2 2 | unu resample -s = $NN | unu 1op nrand -s $RNG -o vec2.nrrd
unu project -i vec2.nrrd -a 0 -m l2 | unu axinsert -a 0 -s 2 | unu 2op / vec2.nrrd - -o vec2.nrrd

/Users/gk/diderot/diderot/branches/vis15/bin/diderotc -g --exec $PROG.diderot

rm -f phi-???.nrrd
rm -f jh-???.png
#I=100

unu dice -i vec2.nrrd -a 0 -o ./
unu jhisto -i 0.nrrd 1.nrrd -min -1.1 -1.1 -max 1.1 1.1 -b 600 600 -t float |
  unu resample -s x1 x1 -k gauss:1.5,3 | unu quantize -b 8 -min 0 -max 0.06 -o jh-000.png

I=1
for I in $(seq 1 100); do
   III=$(printf "%03d" $I)
   echo $III
   #valgrind \
   ./$PROG -initPos vec2.nrrd -iterMax $I -pcp 0 -rad 0.5 -o pos.nrrd;
   unu dice -i pos.nrrd -a 0 -o ./
   unu jhisto -i 0.nrrd 1.nrrd -min -1.1 -1.1 -max 1.1 1.1 -b 600 600 -t float |
     unu resample -s x1 x1 -k gauss:1.5,3 | unu quantize -b 8 -min 0 -max 0.06 -o jh-$III.png
   unu 2op atan2 0.nrrd 1.nrrd | unu histax -a 0 -min -pi -max pi -b 800 -t float -o phi-$III.nrrd
done
junk 0.nrrd 1.nrrd
unu join -i phi-???.nrrd -a 1 |
 unu quantize -b 8 -min 0 -max 2 |
 unu resample -s = x5 -k box -c cell -o phi.png


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