Jpp  18.0.1-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hydrophone-XY:plot.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 zmodload zsh/mathfunc
12 
14 set_variable: WORKDIR ACOUSTICS_WORKDIR ./
15 set_variable: FORMAT GRAPHICS_FORMAT gif
16 set_variable+ BATCH GRAPHICS_BATCH -B
17 
18 if do_usage $*; then
19  usage "$script <string identifier>"
20 fi
21 
22 if (( $# != 1 )); then
23  fatal "Wrong number of arguments."
24 fi
25 
27 
28 set_variable HYDROPHONE_TXT $WORKDIR/hydrophonexy_${STRING}.txt
29 set_variable HYDROPHONE_ROOT $WORKDIR/hydrophonexy_${STRING}.root
30 
31 if [[ ! -f $HYDROPHONE_TXT ]] then
32  fatal "No hydrophone data file $HYDROPHONE_TXT."
33 fi
34 
35 JGraph2D \
36  -f $HYDROPHONE_TXT \
37  -o $HYDROPHONE_ROOT
38 
39 JPrintHydrophone -f $WORKDIR/hydrophone.txt -S $STRING | read DUMMY FLOOR X Y Z
40 
41 JEllipse -o ${TMPDIR:-/tmp}/ellipse.root -p "0.0 0.0 $((sqrt($X*$X + $Y*$Y)))"
42 
43 echo $X $Y > ${TMPDIR:-/tmp}/graph.txt
44 
45 JGraph \
46  -f ${TMPDIR:-/tmp}/graph.txt \
47  -o ${TMPDIR:-/tmp}/graph.root
48 
49 typeset -Z 4 STRING
50 
51 JPlot2D \
52  -f ${HYDROPHONE_ROOT}:\.\* \
53  -f ${TMPDIR:-/tmp}/ellipse.root:\.\* \
54  -f ${TMPDIR:-/tmp}/graph.root:\.\* \
55  -\> "#Deltax [m]" \
56  -\< "#Deltay [m]" \
57  -\^ "RMS [ms]" \
58  -N "X 505" \
59  -N "Y 505" \
60  -Z \
61  -O COLZ \
62  -T "[$STRING]" \
63  -o $WORKDIR/hydrophonexy_${STRING}.$FORMAT $BATCH
64 
65 rm -f $HYDROPHONE_ROOT
66 rm -f ${TMPDIR:-/tmp}/ellipse.root
67 rm -f ${TMPDIR:-/tmp}/graph.{txt,root}
68 
69 
then usage $script< detector identifier >< startdate\"YYYY-MM-DDHH:MM:SS\"><finaldate\"YYYY-MM-DDHH:MM:SS\"><QA/QCfile> fi case set_variable QAQC_TXT $argv[4]
Definition: JDataMonitor.sh:24
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
then usage $script< directory A >< directoryB > nIn each there should be a file detector datx and tripod txt
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
then usage $script(input file)+< QA/QC file >" "\nAuxiliary script to produce the following QA/QC data then fatal Wrong number of arguments fi set_array INPUT_FILES $argv[1,-2] set_variable QAQC_FILE $argv[-1] mkdir p $WORKDIR set_variable ACOUSTICS_DEBUG
Definition: JQAQC.sh:80
usr share Modules init zsh export TMPDIR
exit
Definition: JPizza.sh:36
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
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then rm
Definition: sftpput.zsh:30
then fatal Invalid string $STRING
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Auxiliary data structure for ellipse.
Definition: JEllipse.cc:17
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
do JPlot2D f $WORKDIR detector root
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Definition: JMuonPostfit.sh:40
then display $WORKDIR
Definition: plot-Domino.sh:128
no fit printf nominal n $STRING awk v X
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
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable HYDROPHONE_TXT $WORKDIR hydrophonexy_
then echo
Definition: JQAQC.sh:90
static JNullStream null
Null I/O stream.
Definition: JNullStream.hh:51
script
Definition: JAcoustics.sh:2
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62