Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
file-Tuna.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4# ------------------------------------------------------------------------------------------
5#
6# Auxiliary script to file test-Tuna.sh input parameters.
7#
8# ------------------------------------------------------------------------------------------
9
10if [ -z $JPP_DIR ]; then
11 echo "Variable JPP_DIR undefined."
12 exit
13fi
14
15source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16
17set_variable: DEBUG DATABASE_DEBUG 2
18set_variable: WORKDIR DATABASE_WORKDIR ${TMPDIR:-/tmp}/
19set_variable: NUMBER_OF_ENTRIES DATABASE_NUMBER_OF_ENTRIES 1000
20set_variable: NUMBER_OF_OUTLIERS DATABASE_NUMBER_OF_OUTLIERS 5
21
22if do_usage $*; then
23 usage "$script <input file> <parameters file> [working directory]"
24fi
25
26case $# in
27 3) set_variable WORKDIR $3;&
28 2) set_variable PARAMETERS_FILE $2;
29 set_variable INPUT_FILE $1;;
30 *) fatal "Wrong number of arguments."
31esac
32
33if [[ ! -f $PARAMETERS_FILE ]]; then
34
35 JFileTuna \
36 -f $INPUT_FILE:\.\* \
37 -P $PARAMETERS_FILE \
38 -N $NUMBER_OF_ENTRIES \
39 -O $NUMBER_OF_OUTLIERS \
40 \
41 -Y ".* 0.1" \
42 \
43 -D "Power_Measurement_TEMP_LVL 200.0" \
44 -D "Power_Measurement 2.0" \
45 -D "TEMP 20.0" \
46 -D "temp 20.0" \
47 -D "HUMID 20.0" \
48 -D "humid 20.0" \
49 -D "run_number 1.0e6" \
50 -D "pmt_highvolt@ 1.0" \
51 -D "pmt_threshold@ 0.01" \
52 -D "pwr_meas\[9\] 100.0" \
53 -D "pwr_meas\[10\] 200.0" \
54 -D "pwr_meas\[12\] 10.0" \
55 -D "pwr_meas 5.0" \
56 -D "ahrs 3.0" \
57 -D "acdc_volt 3.0" \
58 -D "edfa_pumpdc 5.0e3" \
59 -D "bps_iback 2.5" \
60 -D "wr_mu 1.0e3" \
61 -D "rx_input_power 5.0" \
62 -D ".* 0.0" \
63 \
64 -d $DEBUG --!
65else
66 notice "File $PARAMETERS_FILE exists; remove to overwrite."
67fi