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