https://www.cdslab.org/paramonte/fortran/2
Current view: top level - main - pm_batse@routines.inc.F90 (source / functions) Hit Total Coverage
Test: ParaMonte 2.0.0 :: Serial Fortran - Code Coverage Report Lines: 11 25 44.0 %
Date: 2024-04-08 03:18:57 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             :  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       2             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       3             : !!!!                                                                                                                            !!!!
       4             : !!!!    ParaMonte: Parallel Monte Carlo and Machine Learning Library.                                                           !!!!
       5             : !!!!                                                                                                                            !!!!
       6             : !!!!    Copyright (C) 2012-present, The Computational Data Science Lab                                                          !!!!
       7             : !!!!                                                                                                                            !!!!
       8             : !!!!    This file is part of the ParaMonte library.                                                                             !!!!
       9             : !!!!                                                                                                                            !!!!
      10             : !!!!    LICENSE                                                                                                                 !!!!
      11             : !!!!                                                                                                                            !!!!
      12             : !!!!       https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md                                                          !!!!
      13             : !!!!                                                                                                                            !!!!
      14             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      15             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      16             : 
      17             : !>  \brief
      18             : !>  This include file contains the implementations of procedures of [pm_batse](@ref pm_batse).
      19             : !>
      20             : !>  \finmain
      21             : !>
      22             : !>  \author
      23             : !>  \AmirShahmoradi, Oct 16, 2009, 11:14 AM, Michigan
      24             : 
      25             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      26             : 
      27             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      28             : #if     getCorrectionLogEffPPF_ENABLED
      29             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      30             : 
      31             :         real(RKC), parameter :: THRESH_ERFC_AMP_RKC = real(THRESH_ERFC_AMP, RKC)
      32             :         real(RKC), parameter :: THRESH_ERFC_AVG_RKC = real(THRESH_ERFC_AVG, RKC)
      33             :         real(RKC), parameter :: THRESH_ERFC_STD_INV_RKC = real(THRESH_ERFC_STD_INV, RKC)
      34           0 :         correction = THRESH_ERFC_AMP_RKC * erfc((logT90 - THRESH_ERFC_AVG_RKC) / THRESH_ERFC_STD_INV_RKC)
      35             :         ! + THRESH_ERFC_BASE ! adding this term will make the effective peak flux equivalent to PF1024ms
      36             : 
      37             :         !%%%%%%%%%%%%%%%%%%%
      38             : #elif   getLogEffPPF_ENABLED
      39             :         !%%%%%%%%%%%%%%%%%%%
      40             : 
      41           0 :         logEffPPF  = logPPF64 - getCorrectionLogEffPPF(logT90)
      42             : 
      43             :         !%%%%%%%%%%%%%%%%%%%
      44             : #elif   getLogEffPPF_ENABLED
      45             :         !%%%%%%%%%%%%%%%%%%%
      46             : 
      47             :         logEffPPF  = logPPF64 - getCorrectionLogEffPPF(logT90)
      48             : 
      49             :         !%%%%%%%%%%%%%%%%%
      50             : #elif   getLogPbol_ENABLED
      51             :         !%%%%%%%%%%%%%%%%%
      52             : 
      53        1001 :         logPbol = logPF53 - getLogPF53(logEpk, 0._RKC)
      54             : 
      55             :         !%%%%%%%%%%%%%%%%%
      56             : #elif   getLogPF53_ENABLED
      57             :         !%%%%%%%%%%%%%%%%%
      58             : 
      59             :         real(RKC), parameter :: LOGPF53_MINUS_LOGPBOL_RKC = real(LOGPF53_MINUS_LOGPBOL, RKC)
      60        2002 :         if (logEpk < -6.712165960423344_RKC) then
      61          22 :             logPF53 = logPbol   + LOGPF53_MINUS_LOGPBOL_RKC ! 11.328718657530706
      62        1980 :         elseif (logEpk < 3.453877639491069_RKC) then
      63             :             logPF53 = logPbol   + 13.20790440362500600_RKC + logEpk * &
      64             :                                 ( 0.309360000000000000_RKC + logEpk * &
      65             :                                 ( 0.001980382837478830_RKC + logEpk * &
      66             :                                 ( 0.000299892598248466_RKC + logEpk * &
      67             :                                 ( 1.25602147173493e-05_RKC - logEpk   &
      68        1104 :                                 * 1.27171265917873e-05_RKC ))))
      69         876 :         elseif (logEpk < 5.756462732485115_RKC) then
      70             :             logPF53 = logPbol   + 4.400884836537660000_RKC + logEpk * &
      71             :                                 ( 39.71039000000000000_RKC - logEpk * &
      72             :                                 ( 41.95557432120050000_RKC - logEpk * &
      73             :                                 ( 20.60525451895990000_RKC - logEpk * &
      74             :                                 ( 5.510436247342930000_RKC - logEpk * &
      75             :                                 ( 0.832525333390336000_RKC - logEpk * &
      76             :                                 ( 0.067135977132248900_RKC - logEpk   &
      77         250 :                                 * 0.002254876138523550_RKC ))))))
      78         626 :         elseif (logEpk < 9.210340371976184_RKC) then
      79             :             logPF53 = logPbol   + 6.451981585674900000_RKC + logEpk * &
      80             :                                 ( 4.569070000000000000_RKC - logEpk * &
      81             :                                 ( 0.837198158654537000_RKC - logEpk * &
      82             :                                 ( 0.055416002698982300_RKC - logEpk   &
      83         376 :                                 * 0.001219684856402480_RKC )))
      84         250 :         elseif (logEpk < 12.455573549219071_RKC) then
      85             :             logPF53 = logPbol   - 24.09731285126340000_RKC + logEpk * &
      86             :                                 ( 26.70637000000000000_RKC - logEpk * &
      87             :                                 ( 6.286981551320860000_RKC - logEpk * &
      88             :                                 ( 0.667762738216888000_RKC - logEpk * &
      89             :                                 ( 0.033549115287895400_RKC - logEpk   &
      90         250 :                                 * 0.000651366755890191_RKC ))))
      91             :         else
      92           0 :             logPF53 = logPbol   + LOGPF53_MINUS_LOGPBOL_RKC
      93             :         end if
      94             :         !write(*,"(*(g0.13,:,', '))") "logEpk, logPbol, logPF53<0.0: ", logEpk, logPbol, logPF53
      95             : 
      96             :         !%%%%%%%%%%%%%%%%%%%
      97             : #elif   getLog10PF53_ENABLED
      98             :         !%%%%%%%%%%%%%%%%%%%
      99             : 
     100             :         real(RKC), parameter :: LOG10PF53_MINUS_LOG10PBOL_RKC = real(LOG10PF53_MINUS_LOG10PBOL, RKC)
     101           0 :         if (log10epk < -2.915056638230699_RKC) then
     102           0 :             log10PF53 = log10pbol    + LOG10PF53_MINUS_LOG10PBOL_RKC ! 4.9200000000000000_RKC
     103           0 :         elseif (log10epk < 1.5_RKC) then
     104             :             log10PF53 = log10pbol   + 5.7361200000000000_RKC + log10epk * &
     105             :                                     ( 0.3093600000000000_RKC + log10epk * &
     106             :                                     ( 0.0045600000000000_RKC + log10epk * &
     107             :                                     ( 0.0015900000000000_RKC + log10epk * &
     108             :                                     ( 0.0001533360000000_RKC - log10epk   &
     109           0 :                                     * 0.0003574800000000_RKC ))))
     110           0 :         elseif (log10epk < 2.5_RKC) then
     111             :             log10PF53 = log10pbol   + 1.9112800000000000_RKC + log10epk * &
     112             :                                     ( 39.710390000000000_RKC - log10epk * &
     113             :                                     ( 96.606280000000000_RKC - log10epk * &
     114             :                                     ( 109.24696000000000_RKC - log10epk * &
     115             :                                     ( 67.271800000000000_RKC - log10epk * &
     116             :                                     ( 23.402390000000000_RKC - log10epk * &
     117             :                                     ( 4.3454400000000000_RKC - log10epk   &
     118           0 :                                     * 0.3360600000000000_RKC ))))))
     119           0 :         elseif (log10epk < 4._RKC) then
     120             :             log10PF53 = log10pbol   + 2.8020600000000000_RKC + log10epk * &
     121             :                                     ( 4.5690700000000000_RKC - log10epk * &
     122             :                                     ( 1.9277200000000000_RKC - log10epk * &
     123             :                                     ( 0.2938100000000000_RKC - log10epk   &
     124           0 :                                     * 0.0148900000000000_RKC )))
     125           0 :         elseif (log10epk < 5.4093868613659435_RKC) then
     126             :             log10PF53 = log10pbol   - 10.465330000000000_RKC + log10epk * &
     127             :                                     ( 26.706370000000000_RKC - log10epk * &
     128             :                                     ( 14.476310000000000_RKC - log10epk * &
     129             :                                     ( 3.5404100000000000_RKC - log10epk * &
     130             :                                     ( 0.4095700000000000_RKC - log10epk   &
     131           0 :                                     * 0.0183100000000000_RKC ))))
     132             :         else ! if (log10epk>=5.4093868613659435_RKC) then
     133           0 :             log10PF53 = log10pbol   + LOG10PF53_MINUS_LOG10PBOL_RKC
     134             :         end if
     135             : 
     136             : #else
     137             :         !%%%%%%%%%%%%%%%%%%%%%%%%
     138             : #error  "Unrecognized interface."
     139             :         !%%%%%%%%%%%%%%%%%%%%%%%%
     140             : #endif

ParaMonte: Parallel Monte Carlo and Machine Learning Library 
The Computational Data Science Lab
© Copyright 2012 - 2024