Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JSeaBird.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 3
12set_variable DIR $JPP_DIR/examples/JAcoustics/
13set_variable: FORMAT GRAPHICS_FORMAT gif
14set_variable+ BATCH GRAPHICS_BATCH -B
15
16set_variable SOUND_VELOCITY 1541.00 -17e-3 -2000.00
17
18let "v0 = 1541.00"
19let "b = -17e-3"
20let "z0 = -2000.00"
21let "za = -2500.00"
22let "zb = -3450.00"
23
24if do_usage $*; then
25 usage "$script <input file>"\
26 "\nSee https://git.km3net.de/calibration/input_tables/data/sound/ for example files."
27fi
28
29case $# in
30 1) set_variable INPUT_FILE $argv[1];;
31 *) fatal "Wrong number of arguments.";;
32esac
33
34
35$DIR/JSeaBird \
36 -f $INPUT_FILE \
37 -o seabird.root \
38 -V "$SOUND_VELOCITY" \
39 -d $DEBUG --!
40
41$DIR/JSeaBird \
42 -f $INPUT_FILE \
43 -o seabird+.root \
44 -V "$SOUND_VELOCITY" \
45 -O \
46 -d $DEBUG --!
47
48if (( 1 )); then
49
50 JPlot1D \
51 -f seabird.root:hz \
52 -f seabird+.root:hz \
53 -> "#Deltaz [m]" \
54 -\^ "number of entries" \
55 -T "" \
56 -o z.$FORMAT $BATCH
57fi
58if (( 1 )); then
59
60 JPlot1D \
61 -f seabird.root:v1 \
62 -f seabird.root:v2 \
63 -> "#Deltav [m/s]" \
64 -\^ "number of entries" \
65 -T "" \
66 -L TL \
67 -o v.$FORMAT $BATCH
68fi
69if (( 1 )); then
70
71 JLine \
72 -o line.root \
73 -@ "color = 2" \
74 -p "$((-1 * $za)) $(($v0 + $b*($za - $z0))) $((-1 * $zb)) $(($v0 + $b*($zb - $z0)))"
75
76 JPlot1D \
77 -@ "titleOffset = 1.2" \
78 -w 600x600 \
79 -x "2500 3450" \
80 -y "1540 1570" \
81 -f seabird.root:ga \
82 -f line.root:\.\* \
83 -> "depth [m]" \
84 -\^ "v [m/s]" \
85 -N "X 505" \
86 -N "Y 505" \
87 -S 0.6 \
88 -T "" \
89 -o ga.$FORMAT $BATCH
90fi
91if (( 1 )); then
92
93 JPlot1D \
94 -@ "titleOffset = 0.6" \
95 -@ "bottomMargin = 0.2" \
96 -@ "fontSize = 4.5" \
97 -@ "tickLength = 4.5" \
98 -w 600x300 \
99 -f seabird.root:gc \
100 -f seabird.root:gd \
101 -y "-1.0 +1.0" \
102 -> "depth [m]" \
103 -\^ "#Deltav [m/s]" \
104 -N "X 505" \
105 -N "Y 505" \
106 -S 0.4 \
107 -T "" \
108 -o gc.$FORMAT $BATCH
109fi
110if (( 1 )); then
111
112 JFit \
113 -f seabird.root:ga \
114 -o fit.root \
115 -F "[0] + [1]*(x - 2000.0)" \
116 -x "2500 3450" \
117 -@ "p0 = 1540.0" \
118 -@ "p1 = 17e-3"
119
120 JPlot1D \
121 -@ "titleOffset = 1.5" \
122 -f fit.root:\.\* \
123 -x "2500 3450" \
124 -y "1540 1570" \
125 -> "depth [m]" \
126 -\^ "v [m/s]" \
127 -N "X 505" \
128 -N "Y 505" \
129 -S 0.6 \
130 -T "" \
131 -o fit.$FORMAT $BATCH
132fi