Jpp  debug
the software that should make you happy
JMakeHDE.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author jseneca
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Utility script to create histogram of particle light pattern
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 INPUT_FILE="J-11_11_22s_example.HDE";
15 
16 while getopts f:h option
17 do case "$option" in
18  f) INPUT_FILE="$OPTARG";;
19  h) exit;;
20  esac
21 done;
22 
23 if [ -z $INPUT_FILE ]; then
24  echo "Please pass data file."
25  exit
26 fi
27 
28 if [ -z $JPP_DIR ]; then
29  echo "Variable JPP_DIR undefined."
30  exit
31 fi
32 
33 OUTPUT_FILE=""
34 PARTICLES_RE="J[-_[:digit:]]*?s"
35 if [[ $INPUT_FILE =~ $PARTICLES_RE ]]
36 then
37  OUTPUT_FILE="${MATCH}"
38 fi
39 
40 OUTPUT_FILE="${OUTPUT_FILE}.dat"
41 
42 source $JPP_DIR/setenv.sh $JPP_DIR
43 
44 JMakeHDE \
45  -f $INPUT_FILE \
46  -o $OUTPUT_FILE