Jpp  16.0.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
acoustics-fit.sh File Reference

Go to the source code of this file.

Functions

then usage $script< detector
file >< tripodfile >< stage >
input file nInput files
correspond to the output of
JAcousticsEventBuilder[.sh]
nFirst stage 
is (or A) and last stage is 3." fi if (( $ fatal "Wrong number of arguments." fi set_variable DETECTOR $argv[1] set_variable TRIPOD_FILE $argv[2] set_variable STAGE $argv[3] set_array INPUT_FILES $argv[4
 
do for ((N=0;$N< $NUMBER_OF_ITERATIONS;++N))
 
do fitPositionOfTripod $TRIPOD
X $DX_M fitPositionOfTripod
$TRIPOD Y $DX_M
fitPositionOfTripod $TRIPOD Z
$DX_M done 
if (($CHI2[3]-$CHI2[1]< $EPSILON))
 
do for ((FLOOR=1;$FLOOR<=18;FLOOR+=1))
 
then break fi done
JConvertDetectorFormat a
$DETECTOR o $DETECTOR r d &dev
null 
if (($N >=$NUMBER_OF_ITERATIONS))
 
then warning reached maximum
number of iterations $N 
converenge (($CHI2[3]-$CHI2[1]))" fi done set_variable NUMBER_OF_ITERATIONS 2000 set_variable EPSILON 5.0E-4 for DX_M in 0.10
 
*fatal invalid stage $STAGE (possible stages:1, 2, 3, A, D)"
 

Variables

 script
 
then echo Variable JPP_DIR
undefined exit fi source
$JPP_DIR setenv sh $JPP_DIR
&dev null 
set_variable
 
then usage $script< detector
file >< tripodfile >< stage >
input file nInput files
correspond to the output of
JAcousticsEventBuilder[.sh]
nFirst stage eval
JPrintDetector a $DETECTOR O
IDENTIFIER eval JPrintDetector
a $DETECTOR O SUMMARY eval
JPrintDetector a $DETECTOR O
CAN source JAcoustics sh
$DETECTOR_ID typeset A
CONFIGURATION for key in 
Tmax_s
 
do CONFIGURATION [$key]
 
do unset TRIPODS[${ID}] done
fi set_variable TMPDIR
$WORKDIR mkdir p $TMPDIR
set_variable OUTPUT_FILE
$TMPDIR katoomba root typeset
a CHI2 
CHI2
 
 sigma_s = 250.0e-6
 
 stdev = 10.0
 
 mestimator = 2
 
 fixStrings = 1
 
EOF for DX_M in {(k)TRIPODS}
 
then break fi done getCenter
read X Y Z let 
X
 
then printf warning
 
set_variable
NUMBER_OF_ITERATIONS
set_variable EPSILON cat
acoustics_fit_parameters txt
<< EOF $CONFIGURATION[*]Nmin=3;sigma_s=100.0e-6;stdev=10.0;mestimator=0;fixStrings=0;EOF for STRING in $STRINGS[*];do#fit stretching and(z) position of given string set_variable DETECTOR_TMP ${TMPDIR:-/tmp}/detector_A.datx JEditDetector-a $DETECTOR-o $DETECTOR_TMP-r $STRING JEditDetector-a $DETECTOR-o $DETECTOR-k $STRING for MUL in 0.005 0.001;do DX_M=0.2 for((N=0;$N< $NUMBER_OF_ITERATIONS;++N));do CHI2[3]=$CHI2[1] fitPositionOfString $STRING Z $DX_M fitStretchingOfString $STRING $MUL if(($CHI2[3]-$CHI2[1]< $EPSILON));then break fi done if(($N >=$NUMBER_OF_ITERATIONS));then printf"warning: reached maximum number of iterations %d - converenge %7.3f\n"$N $(($CHI2[3]-$CHI2[1])) fi done JMergeDetector-a $DETECTOR-a $DETECTOR_TMP-o $DETECTOR rm-f $DETECTOR_TMP JConvertDetectorFormat-a $DETECTOR-o $DETECTOR-r-d 0 > &dev null 
done
 

Function Documentation

then usage $script<detector file><tripodfile><stage> input file nInput files correspond to the output of JAcousticsEventBuilder [.sh] nFirst stage is ( or  A)
do for ( (N=0;$N< $NUMBER_OF_ITERATIONS;++N )
do fitPositionOfTripod $TRIPOD X $DX_M fitPositionOfTripod $TRIPOD Y $DX_M fitPositionOfTripod $TRIPOD Z $DX_M done if ( ($CHI2[3]-$CHI2[1]< $EPSILON)  )
do for ( (FLOOR=1;$FLOOR<=18;FLOOR+=1)  )
then break fi done JConvertDetectorFormat a $DETECTOR o $DETECTOR r d& dev null if ( ($N >=$NUMBER_OF_ITERATIONS)  )
then warning reached maximum number of iterations $N converenge ( ($CHI2[3]-$CHI2[1])  )
* fatal invalid stage $STAGE ( possible stages:1  ,
,
,
A  ,
D   
)

Variable Documentation

script
Initial value:
=${0##*/}
if [ -z $JPP_DIR ]

Definition at line 2 of file acoustics-fit.sh.

then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR& dev null set_variable

Definition at line 25 of file acoustics-fit.sh.

then usage $script<detector file><tripodfile><stage> input file nInput files correspond to the output of JAcousticsEventBuilder [.sh] nFirst stage eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY eval JPrintDetector a $DETECTOR O CAN source JAcoustics sh $DETECTOR_ID typeset A CONFIGURATION for key in Tmax_s

Definition at line 52 of file acoustics-fit.sh.

do CONFIGURATION[$key]
Initial value:
=`egrep $key acoustics_fit_parameters.txt`
typeset -A TRIPODS
get_tripods $TRIPOD_FILE TRIPODS
if [[ -n "ACOUSTICS_STRINGS" ]] then
ACOUSTICS_STRINGS=(`echo $ACOUSTICS_STRINGS`)
STRINGS=(${STRINGS:|ACOUSTICS_STRINGS})
fi
if [[ -n "ACOUSTICS_TRIPODS" ]] then
for ID in `echo $ACOUSTICS_TRIPODS`
then echo
const int n
Definition: JPolint.hh:676
set_variable NUMBER_OF_ITERATIONS set_variable EPSILON cat acoustics_fit_parameters txt<< EOF $CONFIGURATION[*]Nmin=3;sigma_s=100.0e-6;stdev=10.0;mestimator=0;fixStrings=0;EOF for STRING in $STRINGS[*];do#fit stretching and(z) position of given string set_variable DETECTOR_TMP ${TMPDIR:-/tmp}/detector_A.datx JEditDetector-a $DETECTOR-o $DETECTOR_TMP-r $STRING JEditDetector-a $DETECTOR-o $DETECTOR-k $STRING for MUL in 0.005 0.001;do DX_M=0.2 for((N=0;$N< $NUMBER_OF_ITERATIONS;++N));do CHI2[3]=$CHI2[1] fitPositionOfString $STRING Z $DX_M fitStretchingOfString $STRING $MUL if(($CHI2[3]-$CHI2[1]< $EPSILON));then break fi done if(($N >=$NUMBER_OF_ITERATIONS));then printf"warning: reached maximum number of iterations %d - converenge %7.3f\n"$N $(($CHI2[3]-$CHI2[1])) fi done JMergeDetector-a $DETECTOR-a $DETECTOR_TMP-o $DETECTOR rm-f $DETECTOR_TMP JConvertDetectorFormat-a $DETECTOR-o $DETECTOR-r-d 0 > &dev null done
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 CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:42
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A

Definition at line 53 of file acoustics-fit.sh.

do CHI2

Definition at line 81 of file acoustics-fit.sh.

sigma_s = 250.0e-6

Definition at line 492 of file acoustics-fit.sh.

stdev = 10.0

Definition at line 493 of file acoustics-fit.sh.

mestimator = 2

Definition at line 494 of file acoustics-fit.sh.

fixStrings = 1

Definition at line 495 of file acoustics-fit.sh.

do fitPositionOfString $STRING X $DX_M fitPositionOfString $STRING Y $DX_M fitPositionOfString $STRING Z $DX_M fitPositionOfHydrophone $STRING Z $DX_M done for TRIPOD in {(k)TRIPODS}

Definition at line 498 of file acoustics-fit.sh.

then break fi done getCenter read X Y Z let X
Initial value:
="$X - $X_CENTER"
let Y="$Y - $Y_CENTER"
let Z="$Z - $Z_CENTER"
JEditTripod -f $TRIPOD_FILE -T "-1 sub $X $Y $Z" -r -d 0 >& /dev/null
JEditDetector -a $DETECTOR -S "-1 sub $X $Y $Z" -o $DETECTOR -d 0 >& /dev/null
JConvertDetectorFormat -a $DETECTOR -o $DETECTOR -r -d 0 >& /dev/null
if (( $N >= $NUMBER_OF_ITERATIONS ))
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
data_type r[M+1]
Definition: JPolint.hh:758
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
do set_variable OUTPUT_DIRECTORY $WORKDIR T
then JConvertDetectorFormat a $DETECTOR[1] o
do set_variable SIGMA_NS set_variable OUTLIERS set_variable OUTPUT_FILE matrix[${ALPHA_DEG}\deg\] root $JPP JMatrixNZ a $DETECTOR f $INPUT_FILE o $OUTPUT_FILE S
Definition: JMatrixNZ.sh:58
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then JCalibrateToT a
Definition: JTuneHV.sh:116
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null

Definition at line 523 of file acoustics-fit.sh.

then printf warning

Definition at line 540 of file acoustics-fit.sh.

set_variable NUMBER_OF_ITERATIONS set_variable EPSILON cat acoustics_fit_parameters txt<<EOF$CONFIGURATION[*]Nmin = 3;sigma_s = 100.0e-6;stdev = 10.0;mestimator = 0;fixStrings = 0;EOF for STRING in $STRINGS[*]; do # fit stretching and (z) position of given string set_variable DETECTOR_TMP ${TMPDIR:-/tmp}/detector_A.datx JEditDetector -a $DETECTOR -o $DETECTOR_TMP -r $STRING JEditDetector -a $DETECTOR -o $DETECTOR -k $STRING for MUL in 0.005 0.001; do DX_M=0.2 for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++N )); do CHI2[3]=$CHI2[1] fitPositionOfString $STRING Z $DX_M fitStretchingOfString $STRING $MUL if (( $CHI2[3] - $CHI2[1] < $EPSILON )); then break fi done if (( $N >= $NUMBER_OF_ITERATIONS )); then printf "warning: reached maximum number of iterations %d - converenge %7.3f\n" $N $(($CHI2[3] - $CHI2[1])) fi done JMergeDetector -a $DETECTOR -a $DETECTOR_TMP -o $DETECTOR rm -f $DETECTOR_TMP JConvertDetectorFormat -a $DETECTOR -o $DETECTOR -r -d 0 >& dev null done

Definition at line 563 of file acoustics-fit.sh.