NoiseCCIR670.cc
Go to the documentation of this file.
1 #include <utl/NoiseCCIR670.h>
2 #include <utl/AugerUnits.h>
3 #include <utl/MathConstants.h>
4 #include <utl/RandomEngine.h>
5 #include <CLHEP/Random/RandFlat.h>
6 
7 #include <iostream>
8 
9 using namespace std;
10 using namespace utl;
11 
12 using CLHEP::RandFlat;
13 
14 const double NoiseCCIR670::tempAt0dB = 290.*kelvin; // specify to which temperature 0 dB corresponds
15 const double NoiseCCIR670::noNoisedB = -10000.; // value to characterise absence of noise
16 
17 const double NoiseCCIR670::NoiseGalacticTable[][2] = // Hz, dB re 290 Kelvin
18 {/*{9.255E+03,9.012E+01},
19 {9.869E+03,8.968E+01},
20 {1.086E+04,8.897E+01},
21 {1.202E+04,8.814E+01},
22 {1.324E+04,8.732E+01},
23 {1.442E+04,8.655E+01},
24 {1.571E+04,8.590E+01},
25 {1.739E+04,8.496E+01},
26 {1.924E+04,8.409E+01},
27 {2.119E+04,8.327E+01},
28 {2.320E+04,8.244E+01},
29 {2.554E+04,8.146E+01},
30 {2.782E+04,8.064E+01},
31 {3.080E+04,7.965E+01},
32 {3.427E+04,7.867E+01},
33 {3.793E+04,7.784E+01},
34 {4.199E+04,7.686E+01},
35 {4.598E+04,7.598E+01},
36 {5.089E+04,7.516E+01},
37 {5.755E+04,7.412E+01},
38 {6.508E+04,7.324E+01},
39 {7.282E+04,7.236E+01},
40 {8.191E+04,7.165E+01},
41 {9.116E+04,7.088E+01},
42 {1.041E+05,6.973E+01},
43 {1.190E+05,6.874E+01},
44 {1.325E+05,6.791E+01},
45 {1.498E+05,6.693E+01},
46 {1.667E+05,6.605E+01},
47 {1.855E+05,6.512E+01},
48 {2.043E+05,6.419E+01},
49 {2.310E+05,6.320E+01},
50 {2.584E+05,6.210E+01},
51 {2.860E+05,6.112E+01},
52 {3.235E+05,6.019E+01},
53 {3.599E+05,5.915E+01},
54 {4.048E+05,5.800E+01},
55 {4.505E+05,5.712E+01},
56 {4.960E+05,5.619E+01},
57 {5.345E+05,5.542E+01},
58 {5.948E+05,5.455E+01},
59 {6.409E+05,5.367E+01},
60 {7.056E+05,5.285E+01},
61 {7.728E+05,5.208E+01},
62 {8.463E+05,5.137E+01},
63 {9.317E+05,5.055E+01},
64 {1.053E+06,4.967E+01},
65 {1.160E+06,4.879E+01},
66 {1.284E+06,4.797E+01},
67 {1.428E+06,4.704E+01},
68 {1.556E+06,4.621E+01},
69 {1.704E+06,4.528E+01},
70 {1.856E+06,4.446E+01},
71 {2.054E+06,4.353E+01},
72 {2.262E+06,4.249E+01},
73 {2.463E+06,4.145E+01},
74 {2.683E+06,4.058E+01},
75 {2.922E+06,3.965E+01},
76 {3.132E+06,3.872E+01},
77 {3.467E+06,3.784E+01},
78 {3.817E+06,3.697E+01},
79 {4.135E+06,3.615E+01},
80 {4.529E+06,3.533E+01},
81 {5.067E+06,3.456E+01},
82 {5.760E+06,3.346E+01},
83 {6.376E+06,3.247E+01},
84 {7.019E+06,3.154E+01},
85 {7.728E+06,3.088E+01},
86 {8.418E+06,3.017E+01},*/
87 {9.169E+06,2.924E+01},
88 {1.014E+07,2.809E+01},
89 {1.111E+07,2.727E+01},
90 {1.263E+07,2.601E+01},
91 {1.428E+07,2.503E+01},
92 {1.589E+07,2.366E+01},
93 {1.846E+07,2.240E+01},
94 {2.121E+07,2.108E+01},
95 {2.516E+07,1.939E+01},
96 {2.876E+07,1.813E+01},
97 {3.322E+07,1.692E+01},
98 {3.921E+07,1.571E+01},
99 {4.434E+07,1.467E+01},
100 {5.122E+07,1.352E+01},
101 {5.730E+07,1.237E+01},
102 {6.550E+07,1.127E+01},
103 {7.327E+07,1.013E+01},
104 {8.066E+07,9.037E+00},
105 {9.170E+07,7.886E+00},
106 {1.036E+08,6.899E+00},
107 {1.160E+08,5.804E+00},
108 {1.311E+08,4.708E+00},
109 {1.507E+08,3.394E+00},
110 {1.686E+08,2.516E+00},
111 {1.968E+08,8.757E-01},
112 {2.360E+08,-7.134E-01},
113 {2.727E+08,-2.028E+00},
114 {3.083E+08,-3.232E+00},
115 {3.449E+08,-4.273E+00},
116 {3.921E+08,-5.423E+00},
117 {4.434E+08,-6.627E+00},
118 {5.014E+08,-7.886E+00},
119 {5.579E+08,-8.817E+00},
120 {6.142E+08,-9.857E+00},
121 {6.798E+08,-1.084E+01},
122 {7.565E+08,-1.182E+01},
123 {8.692E+08,-1.319E+01},
124 {1.014E+09,-1.456E+01},
125 {1.135E+09,-1.587E+01},
126 {1.332E+09,-1.735E+01},
127 {1.531E+09,-1.877E+01},
128 {1.816E+09,-2.031E+01},
129 {2.098E+09,-2.162E+01},
130 {2.360E+09,-2.272E+01},
131 {2.654E+09,-2.381E+01},
132 {2.985E+09,-2.502E+01},
133 {3.358E+09,-2.622E+01},
134 {3.776E+09,-2.759E+01},
135 {4.339E+09,-2.874E+01},
136 {4.777E+09,-2.962E+01},
137 {5.203E+09,-3.071E+01},
138 {5.759E+09,-3.153E+01},
139 {6.340E+09,-3.252E+01},
140 {6.942E+09,-3.350E+01},
141 {7.481E+09,-3.438E+01},
142 /*{8.236E+09,-3.536E+01},
143 {9.165E+09,-3.640E+01},
144 {1.009E+10,-3.728E+01},
145 {1.099E+10,-3.826E+01},
146 {1.236E+10,-3.930E+01},
147 {1.353E+10,-4.029E+01}*/};
148 
149 const double NoiseCCIR670::NoiseIndustryRuralTable[][2] = // Hz, dB re 290 Kelvin
150 {/*{9.266E+03,1.201E+02},
151 {1.053E+04,1.194E+02},
152 {1.172E+04,1.183E+02},
153 {1.347E+04,1.171E+02},
154 {1.515E+04,1.160E+02},
155 {1.694E+04,1.149E+02},
156 {1.916E+04,1.138E+02},
157 {2.087E+04,1.129E+02},
158 {2.237E+04,1.119E+02},
159 {2.463E+04,1.109E+02},
160 {2.711E+04,1.098E+02},
161 {2.906E+04,1.088E+02},
162 {3.148E+04,1.078E+02},*/
163 {3.447E+04,1.068E+02},
164 {3.815E+04,1.057E+02},
165 {4.155E+04,1.044E+02},
166 {4.623E+04,1.033E+02},
167 {5.062E+04,1.023E+02},
168 {5.603E+04,1.011E+02},
169 {6.167E+04,9.998E+01},
170 {6.753E+04,9.889E+01},
171 {7.394E+04,9.769E+01},
172 {8.185E+04,9.681E+01},
173 {8.914E+04,9.572E+01},
174 {9.708E+04,9.457E+01},
175 {1.057E+05,9.364E+01},
176 {1.139E+05,9.282E+01},
177 {1.221E+05,9.206E+01},
178 {1.309E+05,9.113E+01},
179 {1.441E+05,9.009E+01},
180 {1.569E+05,8.900E+01},
181 {1.718E+05,8.801E+01},
182 {1.851E+05,8.703E+01},
183 {2.006E+05,8.610E+01},
184 {2.173E+05,8.506E+01},
185 {2.380E+05,8.408E+01},
186 {2.550E+05,8.320E+01},
187 {2.778E+05,8.222E+01},
188 {3.042E+05,8.118E+01},
189 {3.296E+05,8.031E+01},
190 {3.532E+05,7.932E+01},
191 {3.827E+05,7.840E+01},
192 {4.123E+05,7.747E+01},
193 {4.443E+05,7.643E+01},
194 {4.788E+05,7.545E+01},
195 {5.159E+05,7.446E+01},
196 {5.619E+05,7.337E+01},
197 {6.120E+05,7.250E+01},
198 {6.737E+05,7.146E+01},
199 {7.260E+05,7.064E+01},
200 {7.908E+05,6.971E+01},
201 {8.613E+05,6.861E+01},
202 {9.380E+05,6.758E+01},
203 {1.010E+06,6.648E+01},
204 {1.100E+06,6.561E+01},
205 {1.192E+06,6.463E+01},
206 {1.292E+06,6.370E+01},
207 {1.384E+06,6.282E+01},
208 {1.500E+06,6.184E+01},
209 {1.616E+06,6.096E+01},
210 {1.742E+06,6.004E+01},
211 {1.897E+06,5.911E+01},
212 {2.055E+06,5.818E+01},
213 {2.191E+06,5.725E+01},
214 {2.374E+06,5.632E+01},
215 {2.544E+06,5.550E+01},
216 {2.771E+06,5.462E+01},
217 {2.986E+06,5.364E+01},
218 {3.184E+06,5.277E+01},
219 {3.486E+06,5.184E+01},
220 {3.757E+06,5.096E+01},
221 {4.158E+06,4.971E+01},
222 {4.651E+06,4.845E+01},
223 {5.066E+06,4.746E+01},
224 {5.458E+06,4.632E+01},
225 {5.977E+06,4.544E+01},
226 {6.475E+06,4.451E+01},
227 {7.128E+06,4.342E+01},
228 {7.974E+06,4.216E+01},
229 {8.826E+06,4.112E+01},
230 {9.664E+06,4.003E+01},
231 {1.035E+07,3.910E+01},
232 {1.158E+07,3.795E+01},
233 {1.261E+07,3.675E+01},
234 {1.411E+07,3.522E+01},
235 {1.578E+07,3.402E+01},
236 {1.747E+07,3.293E+01},
237 {1.923E+07,3.172E+01},
238 {2.117E+07,3.047E+01},
239 {2.420E+07,2.921E+01},
240 {2.649E+07,2.795E+01},
241 {2.948E+07,2.680E+01},
242 {3.333E+07,2.555E+01},
243 {3.690E+07,2.461E+01},
244 {4.127E+07,2.347E+01},
245 {4.520E+07,2.259E+01},
246 {4.923E+07,2.166E+01},
247 {5.478E+07,2.062E+01},
248 {6.194E+07,1.925E+01},
249 {6.855E+07,1.805E+01},
250 {7.426E+07,1.701E+01},
251 {8.175E+07,1.592E+01},
252 {9.048E+07,1.466E+01},
253 {1.001E+08,1.357E+01},
254 {1.114E+08,1.215E+01},
255 {1.233E+08,1.100E+01},
256 {1.379E+08,9.585E+00},
257 {1.534E+08,8.545E+00},
258 {1.680E+08,7.398E+00},
259 {1.849E+08,6.250E+00},
260 {2.036E+08,4.994E+00},
261 {2.290E+08,3.628E+00},
262 {2.548E+08,2.317E+00},
263 {2.881E+08,1.167E+00},
264 {3.154E+08,-1.970E-01},
265 {3.547E+08,-1.509E+00},
266 {3.947E+08,-2.766E+00},
267 {4.391E+08,-4.023E+00},
268 {4.757E+08,-5.115E+00},
269 {5.293E+08,-6.318E+00},
270 {5.858E+08,-7.574E+00},
271 {6.414E+08,-8.938E+00},
272 {7.137E+08,-1.003E+01},
273 {7.608E+08,-1.112E+01},
274 {8.742E+08,-1.238E+01},
275 {9.469E+08,-1.374E+01},
276 {1.064E+09,-1.505E+01},
277 /*{1.166E+09,-1.598E+01},
278 {1.290E+09,-1.713E+01},
279 {1.428E+09,-1.806E+01},
280 {1.606E+09,-1.905E+01},
281 {1.836E+09,-2.031E+01},
282 {2.098E+09,-2.168E+01},
283 {2.360E+09,-2.294E+01},
284 {2.584E+09,-2.397E+01},
285 {2.891E+09,-2.496E+01},
286 {3.183E+09,-2.595E+01},
287 {3.579E+09,-2.710E+01},
288 {3.899E+09,-2.819E+01},
289 {4.315E+09,-2.923E+01},
290 {4.750E+09,-3.032E+01},
291 {5.286E+09,-3.136E+01},
292 {6.009E+09,-3.267E+01},
293 {6.941E+09,-3.393E+01},
294 {7.601E+09,-3.503E+01},
295 {8.278E+09,-3.612E+01},
296 {9.113E+09,-3.710E+01},
297 {1.003E+10,-3.814E+01},
298 {1.128E+10,-3.935E+01}*/};
299 
300 const double NoiseCCIR670::NoiseIndustryUrbanTable[][2] = // Hz, dB re 290 Kelvin
301 {/*{9.600E+03,1.283E+02},
302 {1.045E+04,1.274E+02},
303 {1.138E+04,1.266E+02},
304 {1.274E+04,1.257E+02},
305 {1.387E+04,1.248E+02},
306 {1.536E+04,1.237E+02},
307 {1.655E+04,1.228E+02},
308 {1.822E+04,1.220E+02},
309 {2.017E+04,1.210E+02},
310 {2.150E+04,1.202E+02},
311 {2.304E+04,1.193E+02},
312 {2.510E+04,1.185E+02},
313 {2.734E+04,1.174E+02},
314 {2.962E+04,1.165E+02},
315 {3.175E+04,1.158E+02},*/
316 {3.495E+04,1.148E+02},
317 {3.766E+04,1.137E+02},
318 {4.146E+04,1.128E+02},
319 {4.516E+04,1.118E+02},
320 {4.919E+04,1.109E+02},
321 {5.300E+04,1.100E+02},
322 {5.742E+04,1.089E+02},
323 {6.220E+04,1.079E+02},
324 {6.775E+04,1.070E+02},
325 {7.379E+04,1.061E+02},
326 {8.037E+04,1.051E+02},
327 {8.614E+04,1.040E+02},
328 {9.433E+04,1.031E+02},
329 {1.027E+05,1.021E+02},
330 {1.107E+05,1.011E+02},
331 {1.205E+05,1.001E+02},
332 {1.292E+05,9.927E+01},
333 {1.438E+05,9.823E+01},
334 {1.557E+05,9.719E+01},
335 {1.678E+05,9.626E+01},
336 {1.838E+05,9.533E+01},
337 {2.002E+05,9.418E+01},
338 {2.192E+05,9.314E+01},
339 {2.413E+05,9.216E+01},
340 {2.614E+05,9.118E+01},
341 {2.832E+05,9.003E+01},
342 {3.035E+05,8.905E+01},
343 {3.359E+05,8.801E+01},
344 {3.659E+05,8.702E+01},
345 {4.006E+05,8.593E+01},
346 {4.387E+05,8.489E+01},
347 {4.804E+05,8.385E+01},
348 {5.232E+05,8.271E+01},
349 {5.698E+05,8.161E+01},
350 {6.239E+05,8.058E+01},
351 {6.868E+05,7.943E+01},
352 {7.602E+05,7.839E+01},
353 {8.279E+05,7.735E+01},
354 {9.065E+05,7.620E+01},
355 {1.003E+06,7.505E+01},
356 {1.104E+06,7.396E+01},
357 {1.196E+06,7.303E+01},
358 {1.296E+06,7.189E+01},
359 {1.419E+06,7.090E+01},
360 {1.554E+06,6.981E+01},
361 {1.701E+06,6.877E+01},
362 {1.873E+06,6.768E+01},
363 {2.029E+06,6.653E+01},
364 {2.246E+06,6.549E+01},
365 {2.420E+06,6.445E+01},
366 {2.636E+06,6.342E+01},
367 {2.949E+06,6.232E+01},
368 {3.229E+06,6.117E+01},
369 {3.573E+06,5.992E+01},
370 {3.913E+06,5.893E+01},
371 {4.284E+06,5.784E+01},
372 {4.742E+06,5.675E+01},
373 {5.082E+06,5.587E+01},
374 {5.536E+06,5.500E+01},
375 {5.997E+06,5.385E+01},
376 {6.637E+06,5.292E+01},
377 {7.425E+06,5.166E+01},
378 {8.044E+06,5.062E+01},
379 {8.761E+06,4.958E+01},
380 {9.490E+06,4.855E+01},
381 {1.050E+07,4.751E+01},
382 {1.150E+07,4.647E+01},
383 {1.239E+07,4.543E+01},
384 {1.379E+07,4.434E+01},
385 {1.502E+07,4.330E+01},
386 {1.662E+07,4.231E+01},
387 {1.830E+07,4.111E+01},
388 {2.014E+07,4.007E+01},
389 {2.170E+07,3.893E+01},
390 {2.377E+07,3.800E+01},
391 {2.630E+07,3.696E+01},
392 {2.896E+07,3.597E+01},
393 {3.154E+07,3.493E+01},
394 {3.491E+07,3.384E+01},
395 {3.906E+07,3.296E+01},
396 {4.346E+07,3.192E+01},
397 {4.785E+07,3.088E+01},
398 {5.239E+07,2.990E+01},
399 {5.737E+07,2.886E+01},
400 {6.282E+07,2.777E+01},
401 {6.916E+07,2.689E+01},
402 {7.573E+07,2.596E+01},
403 {8.293E+07,2.487E+01},
404 {9.080E+07,2.377E+01},
405 {9.943E+07,2.279E+01},
406 {1.094E+08,2.170E+01},
407 {1.198E+08,2.050E+01},
408 {1.312E+08,1.946E+01},
409 {1.444E+08,1.842E+01},
410 {1.598E+08,1.727E+01},
411 {1.741E+08,1.629E+01},
412 {1.896E+08,1.525E+01},
413 {2.099E+08,1.410E+01},
414 {2.310E+08,1.295E+01},
415 {2.543E+08,1.180E+01},
416 {2.800E+08,1.076E+01},
417 {3.050E+08,9.840E+00},
418 {3.375E+08,8.637E+00},
419 {3.637E+08,7.708E+00},
420 {3.940E+08,6.671E+00},
421 {4.292E+08,5.795E+00},
422 {4.649E+08,4.757E+00},
423 {5.091E+08,3.610E+00},
424 {5.634E+08,2.516E+00},
425 {6.170E+08,1.424E+00},
426 {6.828E+08,1.132E-01},
427 {7.476E+08,-1.196E+00},
428 {8.274E+08,-2.127E+00},
429 {9.109E+08,-3.221E+00},
430 {9.868E+08,-4.258E+00},
431 {1.098E+09,-5.299E+00},
432 {1.189E+09,-6.390E+00},
433 {1.281E+09,-7.319E+00},
434 {1.403E+09,-8.466E+00},
435 {1.578E+09,-9.670E+00},
436 {1.737E+09,-1.081E+01},
437 {1.892E+09,-1.169E+01},
438 {2.094E+09,-1.262E+01},
439 /*{2.269E+09,-1.349E+01},
440 {2.458E+09,-1.453E+01},
441 {2.706E+09,-1.557E+01},
442 {3.060E+09,-1.656E+01},
443 {3.387E+09,-1.760E+01},
444 {3.729E+09,-1.869E+01},
445 {4.083E+09,-1.957E+01},
446 {4.617E+09,-2.083E+01},
447 {5.137E+09,-2.192E+01},
448 {5.872E+09,-2.323E+01},
449 {6.534E+09,-2.411E+01},
450 {7.232E+09,-2.515E+01},
451 {7.961E+09,-2.630E+01},
452 {9.146E+09,-2.794E+01},
453 {1.034E+10,-2.893E+01},
454 {1.182E+10,-3.040E+01},
455 {1.365E+10,-3.172E+01},
456 {1.569E+10,-3.276E+01},
457 {1.841E+10,-3.418E+01}*/};
458 
459 const double NoiseCCIR670::NoiseAtmosphereDayTable[][2] = // Hz, dB re 290 Kelvin
460 {/*{9.164E+03,1.464E+02},
461 {9.768E+03,1.451E+02},*/
462 {1.041E+04,1.438E+02},
463 {1.109E+04,1.422E+02},
464 {1.145E+04,1.409E+02},
465 {1.181E+04,1.389E+02},
466 {1.259E+04,1.376E+02},
467 {1.300E+04,1.363E+02},
468 {1.342E+04,1.350E+02},
469 {1.430E+04,1.334E+02},
470 {1.476E+04,1.321E+02},
471 {1.523E+04,1.308E+02},
472 {1.573E+04,1.298E+02},
473 {1.623E+04,1.285E+02},
474 {1.676E+04,1.275E+02},
475 {1.729E+04,1.259E+02},
476 {1.785E+04,1.246E+02},
477 {1.842E+04,1.233E+02},
478 {1.902E+04,1.223E+02},
479 {2.027E+04,1.210E+02},
480 {2.093E+04,1.197E+02},
481 {2.160E+04,1.184E+02},
482 {2.229E+04,1.171E+02},
483 {2.301E+04,1.158E+02},
484 {2.375E+04,1.141E+02},
485 {2.451E+04,1.128E+02},
486 {2.530E+04,1.115E+02},
487 {2.697E+04,1.099E+02},
488 {2.783E+04,1.086E+02},
489 {2.966E+04,1.069E+02},
490 {3.062E+04,1.056E+02},
491 {3.160E+04,1.040E+02},
492 {3.368E+04,1.024E+02},
493 {3.476E+04,1.011E+02},
494 {3.588E+04,9.982E+01},
495 {3.824E+04,9.818E+01},
496 {3.947E+04,9.655E+01},
497 {4.206E+04,9.492E+01},
498 {4.483E+04,9.329E+01},
499 {4.626E+04,9.166E+01},
500 {4.775E+04,9.035E+01},
501 {5.089E+04,8.872E+01},
502 {5.252E+04,8.709E+01},
503 {5.597E+04,8.513E+01},
504 {5.776E+04,8.350E+01},
505 {6.156E+04,8.187E+01},
506 {6.354E+04,8.024E+01},
507 {6.557E+04,7.861E+01},
508 {6.988E+04,7.665E+01},
509 {7.447E+04,7.502E+01},
510 {7.686E+04,7.339E+01},
511 {8.191E+04,7.175E+01},
512 {8.729E+04,6.980E+01},
513 {9.009E+04,6.817E+01},
514 {9.298E+04,6.686E+01},
515 {9.598E+04,6.556E+01},
516 {1.023E+05,6.457E+01},
517 {1.055E+05,6.294E+01},
518 {1.089E+05,6.164E+01},
519 {1.124E+05,6.034E+01},
520 {1.161E+05,5.871E+01},
521 {1.237E+05,5.707E+01},
522 {1.277E+05,5.577E+01},
523 {1.318E+05,5.414E+01},
524 {1.404E+05,5.283E+01},
525 {1.450E+05,5.153E+01},
526 {1.496E+05,5.022E+01},
527 {1.544E+05,4.892E+01},
528 {1.594E+05,4.729E+01},
529 {1.699E+05,4.598E+01},
530 {1.754E+05,4.467E+01},
531 {1.810E+05,4.337E+01},
532 {1.868E+05,4.174E+01},
533 {1.928E+05,4.076E+01},
534 {1.991E+05,3.978E+01},
535 {2.122E+05,3.815E+01},
536 {2.190E+05,3.684E+01},
537 {2.260E+05,3.554E+01},
538 {2.333E+05,3.424E+01},
539 {2.408E+05,3.293E+01},
540 {2.567E+05,3.162E+01},
541 {2.650E+05,3.032E+01},
542 {2.734E+05,2.869E+01},
543 {2.822E+05,2.738E+01},
544 {3.008E+05,2.575E+01},
545 {3.105E+05,2.445E+01},
546 {3.204E+05,2.282E+01},
547 {3.308E+05,2.184E+01},
548 {3.526E+05,2.053E+01},
549 {3.639E+05,1.923E+01},
550 {3.756E+05,1.760E+01},
551 {4.003E+05,1.629E+01},
552 {4.132E+05,1.498E+01},
553 {4.404E+05,1.335E+01},
554 {4.546E+05,1.237E+01},
555 {4.693E+05,1.107E+01},
556 {5.002E+05,9.764E+00},
557 {5.163E+05,8.460E+00},
558 {5.682E+05,6.824E+00},
559 {6.057E+05,5.517E+00},
560 {6.457E+05,4.535E+00},
561 {6.883E+05,3.553E+00},
562 {7.578E+05,2.568E+00},
563 {8.343E+05,1.583E+00},
564 {9.185E+05,5.983E-01},
565 {1.044E+06,2.613E-01},
566 {1.150E+06,2.526E-01},
567 {1.267E+06,8.948E-01},
568 {1.396E+06,1.537E+00},
569 {1.538E+06,2.504E+00},
570 {1.640E+06,3.475E+00},
571 {1.750E+06,4.445E+00},
572 {1.867E+06,5.741E+00},
573 {1.992E+06,6.711E+00},
574 {2.126E+06,8.007E+00},
575 {2.268E+06,8.978E+00},
576 {2.420E+06,1.027E+01},
577 {2.500E+06,1.157E+01},
578 {2.668E+06,1.254E+01},
579 {2.756E+06,1.384E+01},
580 {2.941E+06,1.513E+01},
581 {3.039E+06,1.643E+01},
582 {3.242E+06,1.773E+01},
583 {3.350E+06,1.870E+01},
584 {3.691E+06,1.999E+01},
585 {3.938E+06,2.096E+01},
586 {4.202E+06,2.226E+01},
587 {4.629E+06,2.323E+01},
588 {5.100E+06,2.387E+01},
589 {5.440E+06,2.452E+01},
590 {6.188E+06,2.483E+01},
591 {7.038E+06,2.482E+01},
592 {7.504E+06,2.416E+01},
593 {8.262E+06,2.350E+01},
594 {8.809E+06,2.284E+01},
595 {9.391E+06,2.186E+01},
596 {1.001E+07,2.088E+01},
597 {1.067E+07,1.957E+01},
598 {1.101E+07,1.859E+01},
599 {1.137E+07,1.729E+01},
600 {1.173E+07,1.631E+01},
601 {1.251E+07,1.533E+01},
602 {1.333E+07,1.435E+01},
603 {1.333E+07,1.337E+01},
604 {1.421E+07,1.206E+01},
605 {1.515E+07,1.076E+01},
606 {1.614E+07,9.452E+00},
607 {1.666E+07,8.148E+00},
608 {1.776E+07,6.840E+00},
609 {1.834E+07,5.861E+00},
610 {1.955E+07,4.879E+00},
611 {2.018E+07,3.900E+00},
612 {2.082E+07,2.270E+00},
613 {2.220E+07,9.632E-01},
614 {2.291E+07,-3.413E-01},
615 {2.365E+07,-1.320E+00},
616 {2.521E+07,-2.627E+00},
617 {2.687E+07,-3.935E+00},
618 {2.773E+07,-5.565E+00},
619 {2.956E+07,-6.872E+00},
620 {3.151E+07,-8.505E+00},
621 {3.358E+07,-9.813E+00},
622 {3.580E+07,-1.112E+01},
623 {3.816E+07,-1.242E+01},
624 {4.067E+07,-1.406E+01},
625 /*{4.335E+07,-1.536E+01},
626 {4.621E+07,-1.667E+01},
627 {4.925E+07,-1.798E+01},
628 {5.250E+07,-1.929E+01},
629 {5.596E+07,-2.059E+01},
630 {5.965E+07,-2.190E+01},
631 {6.358E+07,-2.321E+01},
632 {6.777E+07,-2.452E+01},
633 {7.224E+07,-2.582E+01},
634 {7.700E+07,-2.713E+01},
635 {8.207E+07,-2.844E+01},
636 {8.748E+07,-2.975E+01},
637 {9.630E+07,-3.106E+01},
638 {1.026E+08,-3.236E+01},
639 {1.094E+08,-3.367E+01},
640 {1.166E+08,-3.498E+01},
641 {1.243E+08,-3.596E+01},
642 {1.368E+08,-3.727E+01},
643 {1.506E+08,-3.858E+01},
644 {1.605E+08,-3.989E+01},
645 {1.767E+08,-4.120E+01},
646 {1.884E+08,-4.251E+01},
647 {2.073E+08,-4.382E+01},
648 {2.210E+08,-4.480E+01},
649 {2.433E+08,-4.611E+01},
650 {2.678E+08,-4.774E+01},
651 {2.855E+08,-4.873E+01},
652 {3.044E+08,-4.971E+01},
653 {3.244E+08,-5.102E+01},
654 {3.458E+08,-5.232E+01},
655 {3.807E+08,-5.331E+01},
656 {4.058E+08,-5.462E+01},
657 {4.467E+08,-5.593E+01},
658 {4.918E+08,-5.691E+01},
659 {5.242E+08,-5.789E+01},
660 {5.772E+08,-5.888E+01},
661 {6.153E+08,-5.986E+01},
662 {6.559E+08,-6.084E+01},
663 {7.222E+08,-6.150E+01}*/};
664 
665 
666 const double NoiseCCIR670::NoiseAtmosphereNightTable[][2] = // Hz, dB re 290 Kelvin
667 {/*{8.021E+03,1.757E+02},
668 {8.642E+03,1.749E+02},
669 {9.412E+03,1.741E+02},*/
670 {1.003E+04,1.732E+02},
671 {1.104E+04,1.720E+02},
672 {1.196E+04,1.710E+02},
673 {1.295E+04,1.699E+02},
674 {1.395E+04,1.688E+02},
675 {1.511E+04,1.676E+02},
676 {1.654E+04,1.662E+02},
677 {1.801E+04,1.650E+02},
678 {1.992E+04,1.634E+02},
679 {2.135E+04,1.623E+02},
680 {2.349E+04,1.610E+02},
681 {2.504E+04,1.601E+02},
682 {2.698E+04,1.591E+02},
683 {2.891E+04,1.579E+02},
684 {3.098E+04,1.569E+02},
685 {3.319E+04,1.557E+02},
686 {3.557E+04,1.547E+02},
687 {3.832E+04,1.537E+02},
688 {4.107E+04,1.527E+02},
689 {4.377E+04,1.516E+02},
690 {4.715E+04,1.505E+02},
691 {5.053E+04,1.495E+02},
692 {5.386E+04,1.485E+02},
693 {5.710E+04,1.476E+02},
694 {6.119E+04,1.465E+02},
695 {6.487E+04,1.455E+02},
696 {6.914E+04,1.443E+02},
697 {7.369E+04,1.432E+02},
698 {7.896E+04,1.423E+02},
699 {8.416E+04,1.412E+02},
700 {9.018E+04,1.401E+02},
701 {9.561E+04,1.392E+02},
702 {1.019E+05,1.382E+02},
703 {1.086E+05,1.373E+02},
704 {1.151E+05,1.362E+02},
705 {1.220E+05,1.351E+02},
706 {1.315E+05,1.341E+02},
707 {1.401E+05,1.328E+02},
708 {1.502E+05,1.318E+02},
709 {1.626E+05,1.305E+02},
710 {1.715E+05,1.295E+02},
711 {1.818E+05,1.284E+02},
712 {1.928E+05,1.275E+02},
713 {2.065E+05,1.263E+02},
714 {2.201E+05,1.251E+02},
715 {2.334E+05,1.242E+02},
716 {2.501E+05,1.230E+02},
717 {2.679E+05,1.217E+02},
718 {2.871E+05,1.204E+02},
719 {3.093E+05,1.192E+02},
720 {3.261E+05,1.180E+02},
721 {3.513E+05,1.169E+02},
722 {3.685E+05,1.159E+02},
723 {3.886E+05,1.150E+02},
724 {4.098E+05,1.140E+02},
725 {4.321E+05,1.129E+02},
726 {4.556E+05,1.119E+02},
727 {4.830E+05,1.109E+02},
728 {5.067E+05,1.099E+02},
729 {5.343E+05,1.089E+02},
730 {5.634E+05,1.080E+02},
731 {5.942E+05,1.071E+02},
732 {6.232E+05,1.060E+02},
733 {6.642E+05,1.048E+02},
734 {7.041E+05,1.037E+02},
735 {7.545E+05,1.026E+02},
736 {7.913E+05,1.014E+02},
737 {8.255E+05,1.004E+02},
738 {8.799E+05,9.941E+01},
739 {9.378E+05,9.832E+01},
740 {9.836E+05,9.728E+01},
741 {1.031E+06,9.620E+01},
742 {1.093E+06,9.511E+01},
743 {1.140E+06,9.391E+01},
744 {1.209E+06,9.255E+01},
745 {1.288E+06,9.146E+01},
746 {1.344E+06,9.027E+01},
747 {1.417E+06,8.907E+01},
748 {1.494E+06,8.793E+01},
749 {1.584E+06,8.684E+01},
750 {1.644E+06,8.575E+01},
751 {1.734E+06,8.455E+01},
752 {1.818E+06,8.363E+01},
753 {1.897E+06,8.254E+01},
754 {1.990E+06,8.156E+01},
755 {2.076E+06,8.031E+01},
756 {2.177E+06,7.933E+01},
757 {2.283E+06,7.830E+01},
758 {2.382E+06,7.721E+01},
759 {2.472E+06,7.607E+01},
760 {2.607E+06,7.509E+01},
761 {2.705E+06,7.395E+01},
762 {2.837E+06,7.270E+01},
763 {3.007E+06,7.134E+01},
764 {3.153E+06,7.009E+01},
765 {3.290E+06,6.900E+01},
766 {3.468E+06,6.764E+01},
767 {3.657E+06,6.617E+01},
768 {3.855E+06,6.492E+01},
769 {4.022E+06,6.389E+01},
770 {4.196E+06,6.275E+01},
771 {4.424E+06,6.139E+01},
772 {4.689E+06,5.987E+01},
773 {4.970E+06,5.840E+01},
774 {5.212E+06,5.698E+01},
775 {5.466E+06,5.584E+01},
776 {5.733E+06,5.470E+01},
777 {5.981E+06,5.367E+01},
778 {6.307E+06,5.263E+01},
779 {6.508E+06,5.117E+01},
780 {6.862E+06,4.997E+01},
781 {7.274E+06,4.850E+01},
782 {7.668E+06,4.698E+01},
783 {8.127E+06,4.540E+01},
784 {8.388E+06,4.426E+01},
785 {8.797E+06,4.290E+01},
786 {9.176E+06,4.160E+01},
787 {9.571E+06,4.024E+01},
788 {1.003E+07,3.894E+01},
789 {1.069E+07,3.747E+01},
790 {1.121E+07,3.611E+01},
791 {1.163E+07,3.475E+01},
792 {1.227E+07,3.334E+01},
793 {1.293E+07,3.198E+01},
794 {1.342E+07,3.046E+01},
795 {1.414E+07,2.904E+01},
796 {1.475E+07,2.747E+01},
797 {1.555E+07,2.584E+01},
798 {1.631E+07,2.410E+01},
799 {1.719E+07,2.231E+01},
800 {1.822E+07,2.068E+01},
801 {1.931E+07,1.894E+01},
802 {2.014E+07,1.747E+01},
803 {2.100E+07,1.579E+01},
804 {2.203E+07,1.437E+01},
805 {2.297E+07,1.296E+01},
806 {2.383E+07,1.139E+01},
807 {2.486E+07,9.816E+00},
808 {2.593E+07,8.620E+00},
809 {2.662E+07,7.263E+00},
810 {2.777E+07,6.067E+00},
811 {2.866E+07,4.818E+00},
812 {2.989E+07,3.622E+00},
813 {3.119E+07,2.534E+00},
814 {3.236E+07,1.122E+00},
815 {3.375E+07,-1.815E-01},
816 {3.501E+07,-1.702E+00},
817 {3.652E+07,-3.114E+00},
818 {3.809E+07,-4.635E+00},
819 {4.059E+07,-6.429E+00},
820 {4.348E+07,-8.115E+00},
821 {4.559E+07,-9.691E+00},
822 {4.910E+07,-1.132E+01},
823 {5.232E+07,-1.284E+01},
824 {5.696E+07,-1.453E+01},
825 /*{5.972E+07,-1.610E+01},
826 {6.433E+07,-1.763E+01},
827 {6.928E+07,-1.926E+01},
828 {7.461E+07,-2.100E+01},
829 {8.079E+07,-2.274E+01},
830 {8.608E+07,-2.443E+01},
831 {9.320E+07,-2.622E+01},
832 {1.020E+08,-2.785E+01},
833 {1.086E+08,-2.949E+01},
834 {1.183E+08,-3.106E+01},
835 {1.288E+08,-3.259E+01},
836 {1.417E+08,-3.411E+01},
837 {1.551E+08,-3.564E+01},
838 {1.716E+08,-3.717E+01},
839 {1.888E+08,-3.869E+01},
840 {2.089E+08,-4.027E+01},
841 {2.226E+08,-4.179E+01},
842 {2.450E+08,-4.332E+01},
843 {2.653E+08,-4.484E+01},
844 {2.873E+08,-4.615E+01},
845 {3.178E+08,-4.757E+01},
846 {3.516E+08,-4.915E+01},
847 {3.890E+08,-5.067E+01},
848 {4.213E+08,-5.214E+01},
849 {4.636E+08,-5.351E+01},
850 {5.074E+08,-5.492E+01},
851 {5.555E+08,-5.623E+01},
852 {5.858E+08,-5.716E+01},
853 {6.378E+08,-5.830E+01},
854 {6.871E+08,-5.950E+01},
855 {7.323E+08,-6.070E+01}*/};
856 
857 const long NoiseCCIR670::LengthOfNoiseGalacticTable = sizeof(NoiseCCIR670::NoiseGalacticTable) / (2 * sizeof(double));
858 const long NoiseCCIR670::LengthOfNoiseIndustryRuralTable = sizeof(NoiseCCIR670::NoiseIndustryRuralTable) / (2 * sizeof(double));
859 const long NoiseCCIR670::LengthOfNoiseIndustryUrbanTable = sizeof(NoiseCCIR670::NoiseIndustryUrbanTable) / (2 * sizeof(double));
860 const long NoiseCCIR670::LengthOfNoiseAtmosphereDayTable = sizeof(NoiseCCIR670::NoiseAtmosphereDayTable) / (2 * sizeof(double));
861 const long NoiseCCIR670::LengthOfNoiseAtmosphereNightTable = sizeof(NoiseCCIR670::NoiseAtmosphereNightTable) / (2 * sizeof(double));
862 
863 NoiseCCIR670::NoiseCCIR670(AtmosphereNoise AtmoScenario, IndustryNoise IndustryScenario, RandomEngine* parRandomEngine)
864 : Noise(parRandomEngine)
865 {
866  // initialize atmospheric noise profile
867  switch (AtmoScenario)
868  {
871  break;
872 
874  fAtmosphereNoise.PushBack(2*NoiseAtmosphereDayTable[0][0]*hertz-NoiseAtmosphereDayTable[1][0]*hertz,noNoisedB); // frame table with "no noise" data
875  for (long i=0; i<LengthOfNoiseAtmosphereDayTable; ++i)
877  fAtmosphereNoise.PushBack(2*NoiseAtmosphereDayTable[LengthOfNoiseAtmosphereDayTable-1][0]*hertz-NoiseAtmosphereDayTable[LengthOfNoiseAtmosphereDayTable-2][0]*hertz,noNoisedB); // frame table with "no noise" data
879  break;
880 
882  fAtmosphereNoise.PushBack(2*NoiseAtmosphereNightTable[0][0]-NoiseAtmosphereNightTable[1][0],noNoisedB); // frame table with "no noise" data
883  for (long i=0; i<LengthOfNoiseAtmosphereNightTable; ++i)
885  fAtmosphereNoise.PushBack(2*NoiseAtmosphereNightTable[LengthOfNoiseAtmosphereNightTable-1][0]*hertz-NoiseAtmosphereNightTable[LengthOfNoiseAtmosphereNightTable-2][0]*hertz,noNoisedB); // frame table with "no noise" data
887  break;
888 
889  default: throw DoesNotComputeException("Requested unkown atmospheric noise profile in NoiseCCIR670 class!");
890  }
891 
892  // initialize industry noise profile
893  switch (IndustryScenario)
894  {
897  break;
898 
900  fIndustryNoise.PushBack(2*NoiseIndustryRuralTable[0][0]*hertz-NoiseIndustryRuralTable[1][0]*hertz,noNoisedB); // frame table with "no noise" data
901  for (long i=0; i<LengthOfNoiseIndustryRuralTable; ++i)
903  fIndustryNoise.PushBack(2*NoiseIndustryRuralTable[LengthOfNoiseIndustryRuralTable-1][0]*hertz-NoiseIndustryRuralTable[LengthOfNoiseIndustryRuralTable-2][0]*hertz,noNoisedB); // frame table with "no noise" data
905  break;
906 
908  fIndustryNoise.PushBack(2*NoiseIndustryUrbanTable[0][0]-NoiseIndustryUrbanTable[1][0],noNoisedB); // frame table with "no noise" data
909  for (long i=0; i<LengthOfNoiseIndustryUrbanTable; ++i)
911  fIndustryNoise.PushBack(2*NoiseIndustryUrbanTable[LengthOfNoiseIndustryUrbanTable-1][0]-NoiseIndustryUrbanTable[LengthOfNoiseIndustryUrbanTable-2][0],noNoisedB); // frame table with "no noise" data
913  break;
914 
915  default: throw utl::DoesNotComputeException("Requested unkown industry noise profile in NoiseCCIR670 class!");
916  }
917 
918  // initialize galactic noise profile
920  fGalacticNoise.PushBack(2*NoiseGalacticTable[0][0]*hertz-NoiseGalacticTable[1][0]*hertz,noNoisedB); // frame table with "no noise" data
921  for (long i=0; i<LengthOfNoiseGalacticTable; ++i)
923  fGalacticNoise.PushBack(2*NoiseGalacticTable[LengthOfNoiseGalacticTable-1][0]*hertz-NoiseGalacticTable[LengthOfNoiseGalacticTable-2][0]*hertz,noNoisedB); // frame table with "no noise" data
925 }
926 
928 {
929 }
930 
931 complex<double> NoiseCCIR670::GetSpectralFieldNoiseAtFrequency(double parFrequency, double parBandwidth) const
932 {
933  double phase = RandFlat::shoot(&fRandomEngine->GetEngine(), 0, 2*kPi); // random phase
934  double noisetemp = tempAt0dB*pow(10.0,fAtmosphereNoise.Y(parFrequency)/10.0) // calculate temperature from dB values
935  + tempAt0dB*pow(10.0,fIndustryNoise.Y(parFrequency)/10.0)
936  + tempAt0dB*pow(10.0,fGalacticNoise.Y(parFrequency)/10.0);
937  double amp = SpectralFieldAmplitudeOfNoiseTemperature(noisetemp, parFrequency, parBandwidth);
938  return amp*exp(complex<double>(0,1)*phase);
939 }
Abstract base class for noise profiles.
Definition: Noise.h:26
utl::TabulatedFunction fGalacticNoise
Definition: NoiseCCIR670.h:59
virtual ~NoiseCCIR670()
RandomEngineType & GetEngine()
Definition: RandomEngine.h:32
static const double NoiseIndustryRuralTable[][2]
Definition: NoiseCCIR670.h:46
void PushBack(const double x, const double y)
double pow(const double x, const unsigned int i)
constexpr double giga
Definition: AugerUnits.h:73
static const double NoiseIndustryUrbanTable[][2]
Definition: NoiseCCIR670.h:47
static const double NoiseAtmosphereNightTable[][2]
Definition: NoiseCCIR670.h:49
static const double tempAt0dB
Definition: NoiseCCIR670.h:42
AtmosphereNoise
Definition: NoiseCCIR670.h:29
static const long LengthOfNoiseGalacticTable
Definition: NoiseCCIR670.h:51
Wraps the random number engine used to generate distributions.
Definition: RandomEngine.h:27
RandomEngine * fRandomEngine
Definition: Noise.h:37
static const long LengthOfNoiseAtmosphereNightTable
Definition: NoiseCCIR670.h:55
constexpr double kPi
Definition: MathConstants.h:24
utl::TabulatedFunction fAtmosphereNoise
Definition: NoiseCCIR670.h:57
static const double NoiseGalacticTable[][2]
Definition: NoiseCCIR670.h:45
utl::TabulatedFunction fIndustryNoise
Definition: NoiseCCIR670.h:58
constexpr double hertz
Definition: AugerUnits.h:153
Base class for inconsistency/illogicality exceptions.
constexpr double kelvin
Definition: AugerUnits.h:259
static const long LengthOfNoiseAtmosphereDayTable
Definition: NoiseCCIR670.h:54
static const double NoiseAtmosphereDayTable[][2]
Definition: NoiseCCIR670.h:48
static const long LengthOfNoiseIndustryRuralTable
Definition: NoiseCCIR670.h:52
virtual std::complex< double > GetSpectralFieldNoiseAtFrequency(double parFrequency, double parBandwidth) const
Returns the noise (complex value representing amplitude and phase) at a given frequency.
double Y(const double x) const
Get or interpolate the Y value that corresponds to parameter x.
virtual double SpectralFieldAmplitudeOfNoiseTemperature(double parTemperature, double parFrequency, double parBandwidth) const
Definition: Noise.cc:20
static const double noNoisedB
Definition: NoiseCCIR670.h:43
static const long LengthOfNoiseIndustryUrbanTable
Definition: NoiseCCIR670.h:53
IndustryNoise
Definition: NoiseCCIR670.h:30

, generated on Tue Sep 26 2023.