Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
archive-get-calibration.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 ARCHIVE_DEBUG 2
12set_variable: WORKDIR ARCHIVE_WORKDIR ${TMPDIR:-/tmp}/
13
14if do_usage $*; then
15 usage "$script <archive> <detector identifier> [run [version]]"\
16 "\nAuxiliary script to retrieve pre-calibration results from archive."
17fi
18
19set_variable RUN 1
20set_variable VERSION \*
21
22case $# in
23 4) set_variable VERSION $argv[4];&
24 3) set_variable RUN $argv[3];&
25 2) set_variable ID $argv[2];
26 set_variable ARCHIVE $argv[1];;
27 *) fatal "Wrong number of arguments."
28esac
29
30source JAcousticsToolkit.sh
31
32if [[ ! -f $ACOUSTICS_DETECTOR ]]; then
33
34 archive-get-Detector.sh $ARCHIVE $ID $RUN detector $ACOUSTICS_DETECTOR $VERSION
35
36 CHECK_EXIT_CODE
37fi
38
39eval `JPrintDetector -a $ACOUSTICS_DETECTOR -O IDENTIFIER`
40
41if (( $DETECTOR_ID != $ID )); then
42 fatal "Inconsistent detector identifiers $DETECTOR_ID != $ID"
43fi
44
45for KEY in $ACOUSTICS_AUXS[*]; do
46
47 if [[ ! -f $KEY.txt ]]; then
48
49 getFile.sh $ARCHIVE $ID $RUN $KEY $VERSION $KEY
50
51 CHECK_EXIT_CODE
52 fi
53done