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