Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JPulsar.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3#
4# \author mbouwhuis
5#
6version=1.0
7script=${0##*/}
8
9# ------------------------------------------------------------------------------------------
10#
11# Utility script to run JPulsar.
12#
13# ------------------------------------------------------------------------------------------
14
15if [ -z $JPP_DIR ]; then
16 echo "Variable JPP_DIR undefined."
17 exit
18fi
19
20
21source $JPP_DIR/setenv.sh $JPP_DIR
22
23if do_usage $*; then
24 usage "$script <detector file> <input file> <output file>"
25fi
26
27if (( $# == 3 )); then
28 set_variable DETECTOR $1
29 set_variable INPUT_FILE $2
30 set_variable OUTPUT_FILE $3
31else
32 fatal "Wrong number of arguments."
33fi
34
35
36if [[ ! -f $DETECTOR ]]; then
37 fatal "Missing detector file $DETECTOR"
38fi
39
40
41if [[ ! -f $INPUT_FILE ]]; then
42 fatal "Missing input file $INPUT_FILE"
43fi
44
45echo "Detector to overwrite: $DETECTOR."
46echo "Input: $INPUT_FILE."
47echo "Output: $OUTPUT_FILE"
48
49#
50# DOM IDs in DU-2, reference channels from elog http://elog.km3net.de/DU+Integration/35
51#
52cat>dom_channel_map_du2<<EOF
53808992603 5
54808974928 5
55808995481 5
56808966287 5
57808467569 5
58808430036 5
59808430571 5
60808996420 5
61808987051 5
62808965918 5
63808447091 5
64808430449 5
65808468365 5
66808987121 0
67808474231 0
68809503299 0
69808972586 0
70808982574 0
71EOF
72
73#
74# DOM IDs in DU-3
75#
76cat>dom_channel_map_du3<<EOF
77808451481 8
78808951763 8
79806487207 8
80808984760 8
81808985313 8
82808467131 8
83808979223 8
84808469410 8
85808982559 8
86809003766 8
87808994625 8
88808961271 8
89806472277 8
90809548782 8
91808987120 8
92808981888 8
93808963072 8
94808976325 8
95EOF
96
97
98#
99# DOM IDs in DU-4
100#
101cat>dom_channel_map_du4<<EOF
102808982550 12
103809006175 12
104808964845 12
105808960476 12
106809547596 30
107808991947 30
108808987098 30
109808991967 30
110808987950 30
111808991955 30
112809503407 30
113809526122 30
114808950076 30
115808982608 12
116808430346 12
117808469399 12
118808984598 12
119808977112 12
120EOF
121
122#
123# DOM IDs in DU-4; top hemisphere
124#
125cat>dom_channel_map_du4_top<<EOF
126808982550 4
127809006175 4
128808964845 4
129808960476 4
130809547596 4
131808991947 4
132808987098 4
133808991967 4
134808987950 4
135808991955 4
136809503407 4
137809526122 4
138808950076 4
139808982608 7
140808430346 7
141808469399 7
142808984598 7
143808977112 7
144EOF
145
146JPulsar \
147 -! "`cat dom_channel_map_du4_top`" \
148 -f $INPUT_FILE \
149 -A \
150 -o $OUTPUT_FILE \
151 -a $DETECTOR
152
153
154
155JPulsar \
156 -! "`cat dom_channel_map_du4_top`" \
157 -f $INPUT_FILE \
158 -a $DETECTOR