Jpp  master_rocky
the software that should make you happy
JAcoustics/JEvD.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 set_variable: DEBUG ACOUSTICS_DEBUG 2
12 set_variable: WORKDIR ACOUSTICS_WORKDIR ./
13 set_variable: RATIO ACOUSTICS_RATIO 0.1
14 set_variable: PRESCALE ACOUSTICS_PRESCALE 1
15 set_variable DIR $JPP_DIR/examples/JAcoustics
16 set_variable: FORMAT GRAPHICS_FORMAT gif
17 set_variable+ BATCH GRAPHICS_BATCH -B
18 
19 if do_usage $*; then
20  usage "$script <detector file> (input file)+"\
21  "\nInput file corresponds to the output of JKatoomba[.sh]."
22 fi
23 
24 if (( $# < 2 )); then
25  fatal "Wrong number of arguments."
26 fi
27 
28 set_variable DETECTOR $argv[1]
29 set_array INPUT_FILES $argv[2,-1]
30 
31 eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
32 
33 
34 JAcoustics.sh $DETECTOR_ID
35 
36 for INPUT_FILE in $INPUT_FILES[*]; do
37 
38  $DIR/JEvD \
39  -a $DETECTOR \
40  -f $INPUT_FILE \
41  -o A_%.$FORMAT \
42  -V $WORKDIR/sound_velocity.txt \
43  -M $WORKDIR/mechanics.txt \
44  -R $RATIO \
45  -P $PRESCALE \
46  -N 1 \
47  -d $DEBUG $BATCH
48 done
49 
50 if [[ "$BATCH" != "" ]]; then
51  make_movie.sh A_[0-9]*.gif
52 fi