Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
pre-calibration_D0ARCA020.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4# --------------------------------------------------------------------------------------------
5#
6# Auxiliary script to derive the geometry of the D0ARCA020 (116) detector from other detectors.
7#
8# --------------------------------------------------------------------------------------------
9
10if [ -z $JPP_DIR ]; then
11 echo "Variable JPP_DIR undefined."
12 exit
13fi
14
15source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16
17set_variable DETECTOR_ID 116
18
19if do_usage $*; then
20 usage "$script <source directory>" \
21 "\nThe source directory corresponds to a pre-calibrated D0ARCA021 detector."
22fi
23
24case $# in
25 1) set_variable DIR ${1:a};;
26 *) fatal "Wrong number of arguments."
27esac
28
29set_variable DETECTOR $DIR/detector.datx
30set_variable TRIPOD $DIR/tripod.txt
31
32if [[ ! -f $DETECTOR ]]; then
33 fatal "Missing pre-calibrated D0ARCA021 input detector file"
34fi
35
36if [[ ! -f $TRIPOD ]]; then
37 fatal "Missing pre-calibrated D0ARCA021 input tripod file"
38fi
39
40# Apply modifications.
41
42JEditDetector \
43 -a $DETECTOR \
44 -@ "id=$DETECTOR_ID" \
45 -r "5 32" \
46 -o detector.datx
47
48JEditTripod \
49 -f $TRIPOD \
50 -r "12 13" \
51 -o tripod.txt
52
53JEditTransmitter \
54 -f $DIR_DETECTOR_A/transmitter.txt \
55 -r "5 32" \
56 -o transmitter.txt
57
58JEditHydrophone \
59 -f $DIR_DETECTOR_A/hydrophone.txt \
60 -r "5 32" \
61 -o hydrophone.txt
62
63
64cat>waveform.txt<<EOF
65# waveform identifier; emitter identifier
66 16 3
67-17 3
68 14 7
69-15 7
70 12 8
71-13 8
72 28 9
73-29 9
74 25 10
75-26 10
76 27 11
77-28 11
78EOF