4 # ------------------------------------------------------------------------------------------
6 # Auxiliary script for configuration of acoustics scripts.
8 # ------------------------------------------------------------------------------------------
10 if [ -z $JPP_DIR ];
then
11 echo "Variable JPP_DIR undefined."
15 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null
20 if ( do_usage $* );
then
21 usage "$script [<detector identifier>]"
25 fatal
"Wrong number of arguments."
28 if (( $# == 1 )) && [[
"$1" !=
"--" ]] ;
then
32 # Install input files.
34 for KEY
in tripod hydrophone;
do
35 if [[ ! -
f $ACOUSTICS_WORKDIR/${KEY}.txt && -
f $JPP_LIB/${KEY}_${(l:8::0::0:)ID}.txt ]];
then
36 cp $JPP_LIB/${KEY}_${(l:8::0::0:)ID}.txt $ACOUSTICS_WORKDIR/${KEY}.txt
45 49)
VELOCITY=
"1538.0 -17e-3 -2000.0"; # Sound velocity [m/s], depth dependence [s^-1] and depth [m].
60 42)
VELOCITY=
"1481.0 -17e-3 -3000.0"; # Sound velocity [m/s], depth dependence [s^-1] and depth [m].
74 *) fatal
"Invalid argument $*."
79 # Print sound velocity conform command line option.
87 # Print tripod data conform command line option.
91 awk
'BEGIN { printf "\"" } END { printf "\"\n" } $1 !~ /^#/ { print $0 }' $ACOUSTICS_WORKDIR/tripod.txt
97 # \param 1 tripod file
98 # \param 2 associative array
102 set_local_variable __FILE__ $1
103 set_local_variable __ARRAY__ $2
105 while read __line__;
do
107 if [[ -
n "$__line__" &&
"$__line__" != \#* ]];
then
109 echo $__line__ |
read __id__ __x__ __y__ __z__
111 eval ${__ARRAY__}\[${__id__}\]=\
"$__x__ $__y__ $__z__\"
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
bool read(Vec &v, std::istream &is)
Read a Vec(tor) from a stream.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
do set_array DAQHEADER JPrintDAQHeader f
*fatal Invalid argument *esac fi function print_velocity()
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable ACOUSTICS_DEBUG
then $DIR JKatoomba a $DETECTOR o $WORKDIR katoomba root T $TRIPOD n sigma_s
alias put_queue eval echo n
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 source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
then echo Monitoring data echo Detector