Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JFremantle.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 0
12set_variable: WORKDIR ACOUSTICS_WORKDIR ./
13set_variable: THREADS ACOUSTICS_THREADS 5
14
15if do_usage $*; then
16 usage "$script <detector file> (input file)+ <output file>"\
17 "\nAuxiliary script to process acoustic data for dynamic position calibration."\
18 "\nInput files correspond to the output of JAcousticsEventBuilder[.sh]."
19fi
20
21if (( $# < 3 )); then
22 fatal "Wrong number of arguments."
23fi
24
25set_variable DETECTOR $argv[1]
26set_array INPUT_FILES $argv[2,-2]
27set_variable OUTPUT_FILE $argv[-1]
28
29eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
30
31JAcoustics.sh $DETECTOR_ID
32
33CHECK_EXIT_CODE
34
35timer_start
36
37{{ JFremantle \
38 -a $DETECTOR \
39 -f "$INPUT_FILES[*]" \
40 -o $OUTPUT_FILE \
41 -T $WORKDIR/tripod.txt \
42 -Y $WORKDIR/transmitter.txt \
43 -V $WORKDIR/sound_velocity.txt \
44 -M $WORKDIR/mechanics.txt \
45 -@ $WORKDIR/acoustics_fit_parameters.txt \
46 -! $WORKDIR/disable.txt \
47 -N $THREADS \
48 -d $DEBUG 3>&1 1>&4 } | read RESULT } 4>&1
49
50timer_stop
51timer_print
52
53echo "Result <$RESULT>"