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

SCM Repository

[diderot] Diff of /tests/vis15-bugs/badptclC/run.sh
ViewVC logotype

Diff of /tests/vis15-bugs/badptclC/run.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5432, Wed Sep 27 17:28:52 2017 UTC revision 5433, Wed Sep 27 17:59:01 2017 UTC
# Line 2  Line 2 
2  set -o errexit  set -o errexit
3  set -o nounset  set -o nounset
4  shopt -s expand_aliases  shopt -s expand_aliases
 JUNK=""  
 function junk { JUNK="$JUNK $@"; }  
 function cleanup { rm -rf $JUNK; }  
 trap cleanup err exit int term  
5    
6  alias diderotc=/Users/gk/diderot/diderot/branches/vis15/bin/diderotc  alias diderotc=/Users/gk/diderot/diderot/branches/vis15/bin/diderotc
7  alias unu=/Users/gk/diderot/teem/bin/unu  #alias unu=/Users/gk/diderot/teem/bin/unu
8    
9  PROG=pbfsmini  PROG=pbfsmini
10    
11  echo "==================== compiling"  echo "==================== compiling"
12  diderotc --snapshot --exec $PROG.diderot  diderotc --snapshot --exec $PROG.diderot
13    
 #./$PROG $PARM $DASHS 2>&1 | tee slog-SAVE.txt  
   
14  export NRRD_STATE_VERBOSE_IO=0  export NRRD_STATE_VERBOSE_IO=0
15    
16  echo "==================== running"  echo "==================== running"
# Line 27  Line 21 
21  JH_YMAX=0.8  JH_YMAX=0.8
22    
23  rm -f pos-????.nrrd pos-????.eps jh-????.png  rm -f pos-????.nrrd pos-????.eps jh-????.png
24  ./pbfsmini -rad 0.2 -eps 0.0085 -v0 2.3 \  ./pbfsmini -rad 0.2 -eps 0.0085 -v0 2.3 -s 1 -vol vol.nrrd -ipos ipos.nrrd 2>&1 | tee runlog.txt
     -s 1 -vol vol.nrrd -ipos ipos.nrrd -l 35 ||:  
25    
26  SZ=700  SZ=400
27  for PIIN in pos-????.nrrd; do  for PIIN in pos-????.nrrd; do
28      IIN=${PIIN#*-}      IIN=${PIIN#*-}
29      II=${IIN%.*}      II=${IIN%.*}
30      echo $II      echo $II
31      unu crop -i $PIIN -min 0 0 -max 1 M -o posxy.nrrd      unu crop -i $PIIN -min 0 0 -max 1 M -o posxy.nrrd
32      unu slice -i $PIIN -a 0 -p 2 | unu sselect -i posxy.nrrd -a 1 -s - -th 0 -o posxy-P.nrrd posxy-N.nrrd      unu dice -i ID-$II.nrrd -a 0 -o ./
33      for X in P N; do      for C in 0 1 2; do
34          unu jhisto -i posxy-$X.nrrd -min $JH_XMIN $JH_YMIN -max $JH_XMAX $JH_YMAX -b $[SZ*OV] $[SZ*OV] |          unu jhisto -i posxy.nrrd -min $JH_XMIN $JH_YMIN -max $JH_XMAX $JH_YMAX -b $SZ $SZ -w $C.nrrd -t float |
35          unu resample -s /$OV /$OV -k bspln3 -t float |          unu resample -s x2 x2 -k box |
36          unu quantize -b 8 -min 0 -max $(echo "0.15 / ($OV * $OV)" | bc -l) -o jh-$X.pgm          unu quantize -b 8 -min 0 -max 255 -o $C.pgm
37      done      done
38      unu join -i jh-{N,P}.pgm -a 0 -o jh-$II.png      unu join -i {0,1,2}.pgm -a 0 -incr -o jh-$II.png
39  done  done
40  junk posxy{,-P,-N}.nrrd jh-{P,N}.pgm  rm -f posxy.nrrd {0,1,2}.{nrrd,pgm}
41    
42    
43    
44    # cleanup:
45    # rm -f ID-????.nrrd jh-????.png pos-????.nrrd
46    # rm -f ID.nrrd pos.nrrd
47    

Legend:
Removed from v.5432  
changed lines
  Added in v.5433

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