Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JCompareKatoomba.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4if [ -z $JPP_DIR ]; then
5 echo "Variable JPP_DIR undefined."
6 exit
7fi
8
9source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10
11set_variable: DEBUG ACOUSTICS_DEBUG 2
12set_variable: WORKDIR ACOUSTICS_WORKDIR ./
13set_variable: FORMAT GRAPHICS_FORMAT gif
14set_variable+ BATCH GRAPHICS_BATCH -B
15
16if do_usage $*; then
17 usage "$script <input file> <input file>"\
18 "\nInput files correspond to the output of JKatoomba[.sh]."
19fi
20
21if (( $# != 2 )); then
22 fatal "Wrong number of arguments."
23fi
24
25set_array INPUT_FILES $argv[1] $argv[2]
26
27JCompareKatoomba \
28 -f $INPUT_FILES[1] \
29 -f $INPUT_FILES[2] \
30 -o $WORKDIR/comparison.root \
31 -d $DEBUG --!
32
33echo "Creating graphics output in directory $WORKDIR"
34
35typeset -Z4 STRING
36
37for H2 in `JPrintName -f "$WORKDIR/comparison.root:string\[[0-9][0-9]*\]"`; do
38
39 set_variable STRING `echo $H2 | sed 's/.*\[\‍([0-9]*\‍)\].*/\1/'`
40
41 H2=${H2/\[/\\\[}
42 H2=${H2/\]/\\\]}
43
44 JPlot2D \
45 -f "$WORKDIR/comparison.root:${H2}" \
46 -O COLZ \
47 -> "#DeltaTx [mrad]" \
48 -< "#DeltaTy [mrad]" \
49 -N "X 505" \
50 -N "Y 505" \
51 -s 101010 \
52 -T "$STRING" \
53 -o $WORKDIR/tilt_${STRING}.$FORMAT $BATCH
54done