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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4666 - (download) (as text) (annotate)
Thu Sep 29 18:28:48 2016 UTC (2 years, 8 months ago) by glk
File size: 1045 byte(s)
tweaking
#!/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-sphere

alias diderotc=../../branches/vis15/bin/diderotc

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

diderotc --double --snapshot --exec $PROG.diderot

rm -f pos-????.nrrd jh-????.png
./$PROG -initPos vec3.nrrd -rad 0.3 -pcp 2 -iterMax 0 -mvmtEps 0.0015 -o pos

SZ=300
OV=3
for PIIN in pos-????.nrrd; do
  IIN=${PIIN#*-}
  II=${IIN%.*}
  echo $II
  unu dice -i $PIIN -a 0 -o ./
  unu 2op gt 2.nrrd 0 | unu 2op x - 2.1 | unu 2op + - 0.nrrd |
  unu jhisto -i - 1.nrrd -min -1.05 -1.05 -max 3.15 1.05 -b $[OV*SZ*2] $[SZ*OV] -t float |
  unu resample -s /$OV /$OV -k gauss:1.5,5 | unu quantize -b 8 -min 0 -max $(echo 0.015 / $OV | bc -l) -o jh-$II.png
done



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