Jpp  15.0.1-rc.2-highQE
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
plot-acoustics-fit.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 # --------------------------------------------------------------------------------------------
5 #
6 # Auxiliary script to plot chi2 evolution of acoustics-fit.sh
7 #
8 # --------------------------------------------------------------------------------------------
9 
10 if [ -z $JPP_DIR ]; then
11  echo "Variable JPP_DIR undefined."
12  exit
13 fi
14 
15 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16 
17 set_variable: DEBUG ACOUSTICS_DEBUG 2
18 set_variable: WORKDIR ACOUSTICS_WORKDIR ./
19 set_variable STAGE -1
20 set_variable: FORMAT GRAPHICS_FORMAT gif
21 set_variable+ BATCH GRAPHICS_BATCH -B
22 
23 if do_usage $*; then
24  usage "$script <stage file> <stage> [YMIN YMAX]"
25 fi
26 
27 case $# in
28  4) set_variable YMAX $argv[4];
30  2) set_variable STAGE $argv[2];
32  *) fatal "Wrong number of arguments."
33 esac
34 
35 
36 set_variable GRAPH_TXT /tmp/graph.txt
37 set_variable GRAPH_ROOT /tmp/graph.root
38 
39 if [[ $STAGE == "A" ]] || (( $STAGE > 0 )); then
40 
41  eval awk \'\/Processing stage $STAGE\/,\/Elapsed\/ \{ print \$0 \}\' $INPUT_FILE \
42  | head -n -1 \
43  | tail -n +2 \
44  | grep -v "warning" \
45  | awk '{ printf "%5d %8.3f\n", NR, $(NF) }' > $GRAPH_TXT
46 
47 else
48 
49  let STAGE="-1 * $STAGE"
50 
51  egrep -v "(Processing|Elapsed)" $INPUT_FILE \
52  | awk '{ printf "%5d %8.3f\n", NR, $(NF) }' > $GRAPH_TXT
53 fi
54 
55 JGraph \
56  -f $GRAPH_TXT \
57  -o $GRAPH_ROOT
58 
59 if [[ "$YMIN" != "" && "$YMAX" != "" ]]; then
60  set_variable OPTION -y "$YMIN $YMAX"
61 fi
62 
63 JPlot1D \
64  -f $GRAPH_ROOT:\.\* \
65  $OPTION \
66  -> "step" \
67  -\^ "#chi^{2}/NDF" \
68  -S 0.5 \
69  -T "$STAGE" \
70  -o stage-${STAGE}.$FORMAT $BATCH
71 
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison fi case set_variable RANGE $argv[3]
then usage $script< detector file >< inputfile > nUtility script to create PDF and CDF of transition time distribution fi case set_variable WORKDIR
Definition: JLegolas.sh:31
set_variable INPUT_FILE
exit
Definition: JPizza.sh:36
fatal Invalid number of arguments esac let YMIN
Definition: testToT.sh:39
then echo
*fatal Wrong number of arguments esac set_variable GRAPH_TXT
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:20
* usage
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
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:41
then eval awk Processing stage $STAGE
script
Definition: JAcoustics.sh:2
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null