Jpp  18.4.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pre-calibration_D0ORCA007.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 D0ORCA007 (110) 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 
18 
19 if do_usage $*; then
20  usage "$script <source directory A> <source directory B>" \
21  "\nThe source directory A corresponds to a pre-calibrated D0ORCA010 detector." \
22  "\nThe source directory B corresponds to a pre-calibrated D1ORCA011 detector."
23 fi
24 
25 case $# in
27  set_variable DIR_DETECTOR_B ${2:a};;
28  *) fatal "Wrong number of arguments."
29 esac
30 
31 set_variable DETECTOR_A $DIR_DETECTOR_A/detector.datx
32 set_variable TRIPOD_A $DIR_DETECTOR_A/tripod.txt
33 set_variable DETECTOR_B $DIR_DETECTOR_B/detector.datx
34 set_variable TRIPOD_B $DIR_DETECTOR_B/tripod.txt
35 
36 if [[ ! -f $DETECTOR_A ]]; then
37 
38  fatal "Missing pre-calibrated D0ORCA010 input detector file"
39 fi
40 
41 if [[ ! -f $DETECTOR_B ]]; then
42 
43  fatal "Missing pre-calibrated D1ORCA011 input detector file"
44 fi
45 
46 if [[ ! -f $TRIPOD_B ]]; then
47 
48  fatal "Missing pre-calibrated D1ORCA011 input tripod file"
49 fi
50 
51 # D1ORCA011 detector striped of all the new strings wrt D0ORCA007
52 # and ID of D0ORCA007 assigned
53 JEditDetector \
54  -a $DETECTOR_B \
55  -@ "id=$DETECTOR_ID" \
56  -k "1 2 3 9 10 12" \
57  -o detector.datx
58 
59 # D0ORCA010 detector striped of all strings but the ones in D0ORCA007
60 JEditDetector \
61  -a $DETECTOR_A \
62  -k "1 2 3 9 10 11 12" \
63  -o detector_tmp.datx
64 
65 # JEditTripod \
66 # -f $TRIPOD_EXTRA \
67 # -o tripod_tmp.txt
68 
69 cat >tripod_tmp.txt<<EOF
70 EOF
71 
72 # D0ORCA010 detector aligned with D1ORCA011 at the base level.
73 JAlignDetector \
74  -A \
75  -O \
76  -a detector_tmp.datx \
77  -T tripod_tmp.txt \
78  -b detector.datx \
79  -r 0-0
80 
81 # D0ORCA010 detector striped of all the strings but ORCA.0011
82 JEditDetector \
83  -a detector_tmp.datx \
84  -k "11" \
85  -o detector_tmp.datx
86 
87 # The two detector merged
88 JMergeDetector \
89  -a detector.datx \
90  -a detector_tmp.datx \
91  -o detector.datx
92 
93 JEditTripod \
94  -f $TRIPOD_B \
95  -r "6" \
96  -o tripod.txt
97 
98 rm tripod_tmp.txt
99 rm detector_tmp.datx
100 
101 echo "# $script" > disable.txt
102 egrep -v "^#" $DIR_DETECTOR_A/disable.txt >> disable.txt
103 egrep -v "^#" $DIR_DETECTOR_B/disable.txt >> disable.txt
104 
105 JEditTransmitter \
106  -f $DIR_DETECTOR_A/transmitter.txt \
107  -k "1 2 3 9 10 11 12" \
108  -o transmitter.txt
109 
110 JEditHydrophone \
111  -f $DIR_DETECTOR_A/hydrophone.txt \
112  -k "1 2 3 9 10 11 12" \
113  -o hydrophone.txt
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
static const JGeographicalLocation ORCA(42, 48, 06, 02)
then ls $DIR egrep
Definition: getArchive.sh:75
then JLigier sh continue fi cat
Definition: JDAQDriver.sh:51
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O SUMMARY JPrintDAQHeader f $INPUT_FILE read A DAQ_HEADER set_variable DETECTOR_ID
Definition: JSquid.sh:28
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
exit
Definition: JPizza.sh:36
then usage $script< detector specific pre-calibration script >< option > nAuxiliary script to make scan of pre stretching of detector strings(see JEditDetector)." "\nPossible options
data_type r[M+1]
Definition: JPolint.hh:868
then
Definition: datalogs.sh:31
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR_ID if do_usage *then usage $script< source directory A >< sourcedirectoryB > nThe source directory A corresponds to a pre calibrated D0ORCA010 detector nThe source directory B corresponds to a pre calibrated D1ORCA011 detector fi case set_variable DIR_DETECTOR_A
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then rm
Definition: sftpput.zsh:30
then JCalibrateToT a
Definition: JTuneHV.sh:113
do set_variable OUTPUT_DIRECTORY $WORKDIR T
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
* usage
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:48
do set_variable DETECTOR_TXT $WORKDIR detector
data_type v[N+1][M+1]
Definition: JPolint.hh:866
then echo
Definition: JQAQC.sh:90
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null