31 integer(IK) ,
parameter ::
np = 86
34 [
-3.0000000000000000_RK,
4.92000000000000_RK &
35 ,
-2.9000000000000000_RK,
4.92271550938680_RK &
36 ,
-2.8000000000000000_RK,
4.94170723276800_RK &
37 ,
-2.7000000000000000_RK,
4.96223780646120_RK &
38 ,
-2.6000000000000000_RK,
4.98414439011840_RK &
39 ,
-2.5000000000000000_RK,
5.00727609375000_RK &
40 ,
-2.4000000000000000_RK,
5.03149354874880_RK &
41 ,
-2.3000000000000000_RK,
5.05666847891400_RK &
42 ,
-2.2000000000000000_RK,
5.08268327147520_RK &
43 ,
-2.1000000000000000_RK,
5.10943054811640_RK &
44 ,
-2.0000000000000000_RK,
5.13681273600000_RK &
45 ,
-1.9000000000000000_RK,
5.16474163879080_RK &
46 ,
-1.8000000000000000_RK,
5.19313800768000_RK &
47 ,
-1.7000000000000000_RK,
5.22193111240920_RK &
48 ,
-1.6000000000000000_RK,
5.25105831229440_RK &
49 ,
-1.5000000000000000_RK,
5.28046462725000_RK &
50 ,
-1.4000000000000000_RK,
5.31010230881280_RK &
51 ,
-1.3000000000000000_RK,
5.33993041116600_RK &
52 ,
-1.2000000000000000_RK,
5.36991436216320_RK &
53 ,
-1.1000000000000000_RK,
5.40002553435240_RK &
54 ,
-1.0000000000000000_RK,
5.43024081600000_RK &
55 ,
-0.9000000000000000_RK,
5.46054218211480_RK &
56 ,
-0.8000000000000000_RK,
5.49091626547200_RK &
57 ,
-0.7000000000000000_RK,
5.52135392763720_RK &
58 ,
-0.6000000000000000_RK,
5.55184982999040_RK &
59 ,
-0.5000000000000000_RK,
5.58240200475000_RK &
60 ,
-0.4000000000000000_RK,
5.61301142599680_RK &
61 ,
-0.3000000000000000_RK,
5.64368158069800_RK &
62 ,
-0.2000000000000000_RK,
5.67441803973120_RK &
63 ,
-0.0999999999999996_RK,
5.70522802890840_RK &
64 ,
0.00000000000000000_RK,
5.73612000000000_RK &
65 ,
0.10000000000000000_RK,
5.76710320175880_RK &
66 ,
0.20000000000000000_RK,
5.79818725094400_RK &
67 ,
0.30000000000000000_RK,
5.82938170334520_RK &
68 ,
0.40000000000000000_RK,
5.86069562480640_RK &
69 ,
0.50000000000000000_RK,
5.89213716225000_RK &
70 ,
0.60000000000000000_RK,
5.92371311470080_RK &
71 ,
0.70000000000000000_RK,
5.95542850431000_RK &
72 ,
0.80000000000000000_RK,
5.98728614737920_RK &
73 ,
0.90000000000000000_RK,
6.01928622538440_RK &
74 ,
1.00000000000000000_RK,
6.05142585600000_RK &
75 ,
1.10000000000000000_RK,
6.08369866412280_RK &
76 ,
1.20000000000000000_RK,
6.11609435289600_RK &
77 ,
1.30000000000000000_RK,
6.14859827473320_RK &
78 ,
1.40000000000000000_RK,
6.18119100234240_RK &
79 ,
1.50000000000000000_RK,
6.21425921875001_RK &
80 ,
1.60000000000000000_RK,
6.24740828569600_RK &
81 ,
1.70000000000000000_RK,
6.27826369177797_RK &
82 ,
1.80000000000000000_RK,
6.30171825203203_RK &
83 ,
1.90000000000000000_RK,
6.31516935429406_RK &
84 ,
2.00000000000000000_RK,
6.31782000000002_RK &
85 ,
2.10000000000000000_RK,
6.30989986450613_RK &
86 ,
2.20000000000000000_RK,
6.29197575116811_RK &
87 ,
2.30000000000000000_RK,
6.26452081342198_RK &
88 ,
2.40000000000000000_RK,
6.22791191910419_RK &
89 ,
2.50000000000000000_RK,
6.18562562500000_RK &
90 ,
2.60000000000000000_RK,
6.13382209600000_RK &
91 ,
2.70000000000000000_RK,
6.07721678100000_RK &
92 ,
2.80000000000000000_RK,
6.01662553600000_RK &
93 ,
2.90000000000000000_RK,
5.95282848100000_RK &
94 ,
3.00000000000000000_RK,
5.88657000000000_RK &
95 ,
3.10000000000000000_RK,
5.81855874100000_RK &
96 ,
3.20000000000000000_RK,
5.74946761600000_RK &
97 ,
3.30000000000000000_RK,
5.67993380100000_RK &
98 ,
3.40000000000000000_RK,
5.61055873600000_RK &
99 ,
3.50000000000000000_RK,
5.54190812500000_RK &
100 ,
3.60000000000000000_RK,
5.47451193600000_RK &
101 ,
3.70000000000000000_RK,
5.40886440100000_RK &
102 ,
3.80000000000000000_RK,
5.34542401600000_RK &
103 ,
3.90000000000000000_RK,
5.28461354100000_RK &
104 ,
4.00000000000000000_RK,
5.22495000000000_RK &
105 ,
4.10000000000000000_RK,
5.17119063610000_RK &
106 ,
4.20000000000000000_RK,
5.12504318720001_RK &
107 ,
4.30000000000000000_RK,
5.08588032630002_RK &
108 ,
4.40000000000000000_RK,
5.05301458240003_RK &
109 ,
4.50000000000000000_RK,
5.02572031250004_RK &
110 ,
4.60000000000000000_RK,
5.00325567360003_RK &
111 ,
4.70000000000000000_RK,
4.98488459470005_RK &
112 ,
4.80000000000000000_RK,
4.96989874879999_RK &
113 ,
4.90000000000000000_RK,
4.95763952489999_RK &
114 ,
5.00000000000000000_RK,
4.94752000000006_RK &
115 ,
5.10000000000000000_RK,
4.93904691110002_RK &
116 ,
5.20000000000000000_RK,
4.93184262720004_RK &
117 ,
5.30000000000000000_RK,
4.92566712130003_RK &
118 ,
5.40000000000000000_RK,
4.92043994240004_RK &
119 ,
5.50000000000000000_RK,
4.92000000000000_RK ],shape
=shape(
LOG10EPK_LOG10PH))
139 call test%summarize()
147 logical(LK) :: assertion
148 call readDataGRB( inFilePath
= test%dir
%inp
//"/test_pm_batse@batseDataLGRB1366.in" &
149 , outFilePath
= test%dir
%out
//"/test_pm_batse@batseDataLGRB1366.in" &
150 , isLgrb
= .true._LK
&
152 assertion
= .true._LK
159 logical(LK) :: assertion
160 call readDataGRB( inFilePath
= test%dir
%inp
//"/test_pm_batse@batseDataSGRB565.in" &
161 , outFilePath
= test%dir
%out
//"/test_pm_batse@batseDataSGRB565.in" &
162 , isLgrb
= .false._LK
&
164 assertion
= .true._LK
173 logical(
LK) :: assertion
175 real(
RK),
parameter :: tolerance
= 1.e-12_RK
181 if (
test%traceable)
then
182 write(
*,
"(A)")
"The error with respect to reference value is larger than the tolerance.",
new_line(
"a")
&
183 ,
"tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL): " &
195 integer(IK) ,
parameter ::
np = 86
196 logical(LK) :: assertion
198 real(RK),
parameter :: tolerance
= 1.e-12_RK
204 if (
test%traceable)
then
205 write(
*,
"(A)")
"The error with respect to reference value is larger than the tolerance.",
new_line(
"a")
&
206 ,
"tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL): " &
219 integer(IK) ,
parameter ::
np = 86
220 logical(LK) :: assertion
222 real(RK),
parameter :: tolerance
= 1.e-12_RK
224 assertion
= .true._LK
232 if (
test%traceable
.and. .not. assertion)
then
233 write(
*,
"(A)")
"The error with respect to reference value is larger than the tolerance.",
new_line(
"a")
&
234 ,
"tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL): " &
247 logical(
LK) :: assertion
248 real(
RK),
parameter :: tolerance
= sqrt(
epsilon(
1._RK))
250 real(
RK) :: logEffPPF
251 real(
RK) :: difference
253 difference
= abs(logEffPPF
- logEffPPF_ref)
254 assertion
= difference
< tolerance
256 if (
test%traceable
.and. .not. assertion)
then
257 write(
test%disp
%unit,
"(*(g0))")
258 write(
test%disp
%unit,
"(*(g0))")
"logEffPPF_ref = ", logEffPPF_ref
259 write(
test%disp
%unit,
"(*(g0))")
"logEffPPF = ", logEffPPF
260 write(
test%disp
%unit,
"(*(g0))")
"difference = ", difference
261 write(
test%disp
%unit,
"(*(g0))")
271 logical(
LK) :: assertion
272 real(
RK),
parameter :: tolerance
= sqrt(
epsilon(
1._RK))
274 real(
RK) :: logEffPPF
275 real(
RK) :: difference
277 difference
= abs(logEffPPF
- logEffPPF_ref)
278 assertion
= difference
< tolerance
280 if (
test%traceable
.and. .not. assertion)
then
281 write(
test%disp
%unit,
"(*(g0))")
282 write(
test%disp
%unit,
"(*(g0))")
"logEffPPF_ref = ", logEffPPF_ref
283 write(
test%disp
%unit,
"(*(g0))")
"logEffPPF = ", logEffPPF
284 write(
test%disp
%unit,
"(*(g0))")
"difference = ", difference
285 write(
test%disp
%unit,
"(*(g0))")
295 logical(
LK) :: assertion
296 real(
RK),
parameter :: tolerance
= sqrt(
epsilon(
1._RK))
298 real(
RK) :: logEffPPFCorrection
299 real(
RK) :: difference
300 logEffPPFCorrection
= getLogEffectivePeakPhotonFluxCorrection_RK1(
real(
THRESH_ERFC_AVG,
RK))
301 difference
= abs(logEffPPFCorrection
- logEffPPFCorrection_ref)
302 assertion
= difference
< tolerance
304 if (
test%traceable
.and. .not. assertion)
then
305 write(
test%disp
%unit,
"(*(g0))")
306 write(
test%disp
%unit,
"(*(g0))")
"logEffPPFCorrection_ref = ", logEffPPFCorrection_ref
307 write(
test%disp
%unit,
"(*(g0))")
"logEffPPFCorrection = ", logEffPPFCorrection
308 write(
test%disp
%unit,
"(*(g0))")
"difference = ", difference
309 write(
test%disp
%unit,
"(*(g0))")
319 logical(
LK) :: assertion
320 real(
RK),
parameter :: tolerance
= sqrt(
epsilon(
1._RK))
322 real(
RK) :: logEffPPFCorrection
323 real(
RK) :: difference
324 logEffPPFCorrection
= getLogEffectivePeakPhotonFluxCorrection_RK2(
real(
THRESH_ERFC_AVG,
RK))
325 difference
= abs(logEffPPFCorrection
- logEffPPFCorrection_ref)
326 assertion
= difference
< tolerance
328 if (
test%traceable
.and. .not. assertion)
then
329 write(
test%disp
%unit,
"(*(g0))")
330 write(
test%disp
%unit,
"(*(g0))")
"logEffPPFCorrection_ref = ", logEffPPFCorrection_ref
331 write(
test%disp
%unit,
"(*(g0))")
"logEffPPFCorrection = ", logEffPPFCorrection
332 write(
test%disp
%unit,
"(*(g0))")
"difference = ", difference
333 write(
test%disp
%unit,
"(*(g0))")
340end module test_pm_batse
[LEGACY code] This generic interface is identical to the generic interface getLogPF53 with the only ...
Generate and return the conversion of an input natural logarithm of a bolometric ( ) energy flux/flue...
Generate and return the conversion of an input natural logarithm of photon flux/fluence over a given ...
This module contains procedures and generic interfaces for modeling data and detectors of the BATSE G...
real(RKB), parameter THRESH_ERFC_AMP
The scale of the change in BATSE efficiency for different GRB durations.
real(RKB), parameter THRESH_ERFC_AVG
Mean duration in the Error function used to model the connection between the peak fluxes in 64 and 10...
character(*, SK), parameter MODULE_NAME
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
This module contains a simple unit-testing framework for the Fortran libraries, including the ParaMon...
This module contains tests of the module pm_batse.
logical(LK) function test_readDataGRB_2()
logical(LK) function test_getLogPbol()
real(RK), dimension(2, np), parameter LOG10EPK_LOG10PH
logical(LK) function test_getLogEffectivePeakPhotonFlux_RK2_1()
logical(LK) function test_getLogEffectivePeakPhotonFlux_RK1_1()
logical(LK) function test_readDataGRB_1()
real(RK), parameter LOG10PBOL
logical(LK) function test_getLogEffectivePeakPhotonFluxCorrection_RK2_1()
integer(IK), parameter np
logical(LK) function test_getLogPF53()
logical(LK) function test_getLogEffectivePeakPhotonFluxCorrection_RK1_1()
logical(LK) function test_getLog10PF53()
This is the derived type test_type for generating objects that facilitate testing of a series of proc...