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