diff --git a/plots/data/resonance_search_pvals.txt b/plots/data/resonance_search_pvals.txt new file mode 100644 index 0000000..9b1c94c --- /dev/null +++ b/plots/data/resonance_search_pvals.txt @@ -0,0 +1,205 @@ +# Calibration of the Higgs-inspired resonance search test statistic +# Columns: 1 | TS values +# 2-3 | MC results for log10(p), lower PC interval, upper PC interval +# 4-5 | PCh results for log10(p), uncertainty +# 6-7 | MN results for log10(p), uncertainty +0.000000e+00 -2.110893e-06 -2.132521e-06 -2.089484e-06 nan nan nan nan +2.512563e-01 -7.308201e-04 -7.312189e-04 -7.304216e-04 nan nan nan nan +5.025126e-01 -4.009262e-03 -4.010197e-03 -4.008326e-03 -1.376888e-03 7.880268e-04 nan nan +7.537688e-01 -1.140427e-02 -1.140586e-02 -1.140269e-02 -7.097425e-03 2.728124e-03 -3.261339e-03 3.261339e-03 +1.005025e+00 -2.376203e-02 -2.376433e-02 -2.375973e-02 -2.519738e-02 5.226068e-03 -2.321472e-02 1.003125e-02 +1.256281e+00 -4.128627e-02 -4.128934e-02 -4.128321e-02 -4.624803e-02 7.084620e-03 -3.448163e-02 1.223586e-02 +1.507538e+00 -6.377082e-02 -6.377468e-02 -6.376696e-02 -6.894975e-02 8.651590e-03 -5.849803e-02 1.593633e-02 +1.758794e+00 -9.079844e-02 -9.080312e-02 -9.079375e-02 -1.102039e-01 1.093821e-02 -6.810664e-02 1.719644e-02 +2.010050e+00 -1.218490e-01 -1.218546e-01 -1.218435e-01 -1.481387e-01 1.268202e-02 -1.038385e-01 2.123555e-02 +2.261307e+00 -1.564115e-01 -1.564179e-01 -1.564051e-01 -1.821370e-01 1.406226e-02 -1.439758e-01 2.500521e-02 +2.512563e+00 -1.940027e-01 -1.940099e-01 -1.939954e-01 -2.243238e-01 1.560621e-02 -1.860640e-01 2.842624e-02 +2.763819e+00 -2.341816e-01 -2.341898e-01 -2.341734e-01 -2.604608e-01 1.681633e-02 -2.311186e-01 3.168155e-02 +3.015075e+00 -2.765543e-01 -2.765634e-01 -2.765451e-01 -3.188179e-01 1.860508e-02 -2.789994e-01 3.480899e-02 +3.266332e+00 -3.208116e-01 -3.208217e-01 -3.208014e-01 -3.600755e-01 1.977232e-02 -3.282077e-01 3.775411e-02 +3.517588e+00 -3.666467e-01 -3.666579e-01 -3.666355e-01 -4.072686e-01 2.102817e-02 -3.598079e-01 3.952997e-02 +3.768844e+00 -4.138340e-01 -4.138463e-01 -4.138218e-01 -4.674637e-01 2.252866e-02 -4.163959e-01 4.252504e-02 +4.020101e+00 -4.621637e-01 -4.621771e-01 -4.621503e-01 -5.201041e-01 2.376329e-02 -4.429565e-01 4.386041e-02 +4.271357e+00 -5.114686e-01 -5.114832e-01 -5.114541e-01 -5.690084e-01 2.485542e-02 -4.753427e-01 4.543541e-02 +4.522613e+00 -5.615930e-01 -5.616088e-01 -5.615772e-01 -6.100506e-01 2.573622e-02 -5.189214e-01 4.747249e-02 +4.773869e+00 -6.124108e-01 -6.124279e-01 -6.123937e-01 -6.646352e-01 2.686294e-02 -5.491096e-01 4.883383e-02 +5.025126e+00 -6.638204e-01 -6.638389e-01 -6.638020e-01 -7.205369e-01 2.796984e-02 -6.229843e-01 5.201518e-02 +5.276382e+00 -7.157297e-01 -7.157496e-01 -7.157098e-01 -7.639495e-01 2.880011e-02 -6.687933e-01 5.389371e-02 +5.527638e+00 -7.680567e-01 -7.680781e-01 -7.680353e-01 -8.182110e-01 2.980537e-02 -7.348373e-01 5.649207e-02 +5.778894e+00 -8.207457e-01 -8.207687e-01 -8.207227e-01 -8.705628e-01 3.074411e-02 -7.999565e-01 5.894203e-02 +6.030151e+00 -8.737457e-01 -8.737704e-01 -8.737210e-01 -9.214812e-01 3.163044e-02 -8.919373e-01 6.223848e-02 +6.281407e+00 -9.270086e-01 -9.270351e-01 -9.269821e-01 -9.935784e-01 3.284453e-02 -9.495121e-01 6.421584e-02 +6.532663e+00 -9.804998e-01 -9.805283e-01 -9.804714e-01 -1.040873e+00 3.361715e-02 -9.920393e-01 6.563815e-02 +6.783920e+00 -1.034188e+00 -1.034218e+00 -1.034157e+00 -1.090873e+00 3.441511e-02 -1.063830e+00 6.797172e-02 +7.035176e+00 -1.088032e+00 -1.088064e+00 -1.087999e+00 -1.129415e+00 3.501780e-02 -1.112051e+00 6.949516e-02 +7.286432e+00 -1.142026e+00 -1.142061e+00 -1.141992e+00 -1.168683e+00 3.562135e-02 -1.176124e+00 7.146915e-02 +7.537688e+00 -1.196138e+00 -1.196175e+00 -1.196101e+00 -1.215141e+00 3.632248e-02 -1.212407e+00 7.256318e-02 +7.788945e+00 -1.250354e+00 -1.250393e+00 -1.250314e+00 -1.263872e+00 3.704364e-02 -1.253151e+00 7.377237e-02 +8.040201e+00 -1.304643e+00 -1.304686e+00 -1.304601e+00 -1.298533e+00 3.754815e-02 -1.310788e+00 7.544984e-02 +8.291457e+00 -1.359011e+00 -1.359057e+00 -1.358966e+00 -1.353280e+00 3.833150e-02 -1.338601e+00 7.624610e-02 +8.542714e+00 -1.413441e+00 -1.413489e+00 -1.413392e+00 -1.408456e+00 3.910513e-02 -1.416929e+00 7.844515e-02 +8.793970e+00 -1.467894e+00 -1.467946e+00 -1.467843e+00 -1.468418e+00 3.992886e-02 -1.469202e+00 7.987904e-02 +9.045226e+00 -1.522366e+00 -1.522422e+00 -1.522311e+00 -1.539151e+00 4.087923e-02 -1.526334e+00 8.141732e-02 +9.296482e+00 -1.576894e+00 -1.576953e+00 -1.576836e+00 -1.594587e+00 4.160890e-02 -1.590106e+00 8.310080e-02 +9.547739e+00 -1.631467e+00 -1.631530e+00 -1.631405e+00 -1.643343e+00 4.224022e-02 -1.642810e+00 8.446673e-02 +9.798995e+00 -1.686079e+00 -1.686146e+00 -1.686012e+00 -1.706039e+00 4.303845e-02 -1.729548e+00 8.666793e-02 +1.005025e+01 -1.740709e+00 -1.740781e+00 -1.740638e+00 -1.783340e+00 4.400268e-02 -1.769880e+00 8.767262e-02 +1.030151e+01 -1.795368e+00 -1.795444e+00 -1.795292e+00 -1.844973e+00 4.475660e-02 -1.833134e+00 8.922555e-02 +1.055276e+01 -1.850033e+00 -1.850114e+00 -1.849952e+00 -1.913678e+00 4.558233e-02 -1.860902e+00 8.989878e-02 +1.080402e+01 -1.904705e+00 -1.904792e+00 -1.904619e+00 -1.968288e+00 4.622814e-02 -1.902992e+00 9.090977e-02 +1.105528e+01 -1.959441e+00 -1.959534e+00 -1.959349e+00 -2.039750e+00 4.705986e-02 -1.941025e+00 9.181374e-02 +1.130653e+01 -2.014152e+00 -2.014250e+00 -2.014054e+00 -2.086525e+00 4.759638e-02 -2.027751e+00 9.384248e-02 +1.155779e+01 -2.068864e+00 -2.068969e+00 -2.068759e+00 -2.142831e+00 4.823431e-02 -2.087746e+00 9.522059e-02 +1.180905e+01 -2.123559e+00 -2.123671e+00 -2.123448e+00 -2.202282e+00 4.889884e-02 -2.150755e+00 9.664683e-02 +1.206030e+01 -2.178204e+00 -2.178322e+00 -2.178085e+00 -2.250213e+00 4.942811e-02 -2.181543e+00 9.733611e-02 +1.231156e+01 -2.232920e+00 -2.233047e+00 -2.232794e+00 -2.318018e+00 5.016728e-02 -2.223002e+00 9.825668e-02 +1.256281e+01 -2.287676e+00 -2.287811e+00 -2.287541e+00 -2.373247e+00 5.076140e-02 -2.267128e+00 9.922708e-02 +1.281407e+01 -2.342396e+00 -2.342540e+00 -2.342252e+00 -2.427759e+00 5.134107e-02 -2.356912e+00 1.011728e-01 +1.306533e+01 -2.397128e+00 -2.397281e+00 -2.396975e+00 -2.498633e+00 5.208509e-02 -2.407284e+00 1.022482e-01 +1.331658e+01 -2.451866e+00 -2.452029e+00 -2.451703e+00 -2.551413e+00 5.263232e-02 -2.445525e+00 1.030572e-01 +1.356784e+01 -2.506625e+00 -2.506798e+00 -2.506451e+00 -2.602597e+00 5.315763e-02 -2.482356e+00 1.038303e-01 +1.381910e+01 -2.561447e+00 -2.561632e+00 -2.561262e+00 -2.657333e+00 5.371371e-02 -2.529847e+00 1.048188e-01 +1.407035e+01 -2.616152e+00 -2.616349e+00 -2.615955e+00 -2.705881e+00 5.420215e-02 -2.605816e+00 1.063810e-01 +1.432161e+01 -2.670792e+00 -2.671003e+00 -2.670582e+00 -2.756118e+00 5.470299e-02 -2.677186e+00 1.078280e-01 +1.457286e+01 -2.725620e+00 -2.725843e+00 -2.725396e+00 -2.799489e+00 5.513171e-02 -2.738773e+00 1.090612e-01 +1.482412e+01 -2.780327e+00 -2.780565e+00 -2.780089e+00 -2.852842e+00 5.565459e-02 -2.788947e+00 1.100556e-01 +1.507538e+01 -2.835337e+00 -2.835591e+00 -2.835083e+00 -2.910022e+00 5.620957e-02 -2.826536e+00 1.107948e-01 +1.532663e+01 -2.889986e+00 -2.890256e+00 -2.889715e+00 -2.966201e+00 5.674955e-02 -2.911500e+00 1.124477e-01 +1.557789e+01 -2.944797e+00 -2.945085e+00 -2.944509e+00 -3.022015e+00 5.728098e-02 -2.962849e+00 1.134350e-01 +1.582915e+01 -2.999487e+00 -2.999794e+00 -2.999180e+00 -3.071166e+00 5.774492e-02 -2.986768e+00 1.138919e-01 +1.608040e+01 -3.054002e+00 -3.054329e+00 -3.053675e+00 -3.129515e+00 5.829088e-02 -3.029205e+00 1.146982e-01 +1.633166e+01 -3.108749e+00 -3.109098e+00 -3.108401e+00 -3.183423e+00 5.879079e-02 -3.104311e+00 1.161114e-01 +1.658291e+01 -3.163576e+00 -3.163947e+00 -3.163205e+00 -3.241448e+00 5.932417e-02 -3.149950e+00 1.169618e-01 +1.683417e+01 -3.218075e+00 -3.218470e+00 -3.217680e+00 -3.290765e+00 5.977376e-02 -3.216600e+00 1.181927e-01 +1.708543e+01 -3.272932e+00 -3.273352e+00 -3.272511e+00 -3.338404e+00 6.020487e-02 -3.286434e+00 1.194688e-01 +1.733668e+01 -3.327398e+00 -3.327846e+00 -3.326950e+00 -3.376690e+00 6.054911e-02 -3.344430e+00 1.205184e-01 +1.758794e+01 -3.382283e+00 -3.382760e+00 -3.381806e+00 -3.413976e+00 6.088248e-02 -3.386453e+00 1.212731e-01 +1.783920e+01 -3.437082e+00 -3.437590e+00 -3.436574e+00 -3.465129e+00 6.133691e-02 -3.434102e+00 1.221234e-01 +1.809045e+01 -3.491810e+00 -3.492351e+00 -3.491269e+00 -3.518682e+00 6.180906e-02 -3.514988e+00 1.235532e-01 +1.834171e+01 -3.546328e+00 -3.546904e+00 -3.545751e+00 -3.563952e+00 6.220539e-02 -3.559877e+00 1.243397e-01 +1.859296e+01 -3.601197e+00 -3.601811e+00 -3.600584e+00 -3.617184e+00 6.266823e-02 -3.614397e+00 1.252882e-01 +1.884422e+01 -3.656026e+00 -3.656679e+00 -3.655372e+00 -3.672401e+00 6.314474e-02 -3.662624e+00 1.261213e-01 +1.909548e+01 -3.710644e+00 -3.711341e+00 -3.709948e+00 -3.733936e+00 6.367158e-02 -3.698169e+00 1.267318e-01 +1.934673e+01 -3.765301e+00 -3.766042e+00 -3.764559e+00 -3.807874e+00 6.429888e-02 -3.772011e+00 1.279908e-01 +1.959799e+01 -3.819759e+00 -3.820549e+00 -3.818970e+00 -3.872151e+00 6.483930e-02 -3.846611e+00 1.292502e-01 +1.984925e+01 -3.874603e+00 -3.875445e+00 -3.873762e+00 -3.919119e+00 6.523135e-02 -3.895185e+00 1.300637e-01 +2.010050e+01 -3.929475e+00 -3.930371e+00 -3.928578e+00 -3.968852e+00 6.564394e-02 -3.965465e+00 1.312318e-01 +2.035176e+01 -3.984215e+00 -3.985170e+00 -3.983260e+00 -4.019156e+00 6.605863e-02 -3.997762e+00 1.317652e-01 +2.060302e+01 -4.038888e+00 -4.039904e+00 -4.037871e+00 -4.077572e+00 6.653696e-02 -4.043753e+00 1.325209e-01 +2.085427e+01 -4.093943e+00 -4.095026e+00 -4.092859e+00 -4.132624e+00 6.698462e-02 -4.096435e+00 1.333814e-01 +2.110553e+01 -4.148659e+00 -4.149813e+00 -4.147505e+00 -4.196858e+00 6.750319e-02 -4.172270e+00 1.346103e-01 +2.135678e+01 -4.203422e+00 -4.204651e+00 -4.202193e+00 -4.257782e+00 6.799138e-02 -4.211041e+00 1.352343e-01 +2.160804e+01 -4.257609e+00 -4.258917e+00 -4.256300e+00 -4.307656e+00 6.838843e-02 -4.258302e+00 1.359911e-01 +2.185930e+01 -4.312904e+00 -4.314298e+00 -4.311509e+00 -4.350379e+00 6.872673e-02 -4.294331e+00 1.365652e-01 +2.211055e+01 -4.367447e+00 -4.368932e+00 -4.365962e+00 -4.404826e+00 6.915547e-02 -4.332251e+00 1.371668e-01 +2.236181e+01 -4.422273e+00 -4.423855e+00 -4.420691e+00 -4.466772e+00 6.964004e-02 -4.392829e+00 1.381225e-01 +2.261307e+01 -4.478280e+00 -4.479968e+00 -4.476593e+00 -4.523461e+00 7.008056e-02 -4.437761e+00 1.388270e-01 +2.286432e+01 -4.532621e+00 -4.534418e+00 -4.530825e+00 -4.577126e+00 7.049504e-02 -4.497501e+00 1.397583e-01 +2.311558e+01 -4.586851e+00 -4.588764e+00 -4.584939e+00 -4.637444e+00 7.095802e-02 -4.570275e+00 1.408845e-01 +2.336683e+01 -4.641485e+00 -4.643522e+00 -4.639447e+00 -4.699342e+00 7.143000e-02 -4.642326e+00 1.419907e-01 +2.361809e+01 -4.696523e+00 -4.698694e+00 -4.694352e+00 -4.749830e+00 7.181269e-02 -4.713597e+00 1.430765e-01 +2.386935e+01 -4.751291e+00 -4.753604e+00 -4.748979e+00 -4.796174e+00 7.216217e-02 -4.768196e+00 1.439028e-01 +2.412060e+01 -4.806277e+00 -4.808741e+00 -4.803813e+00 -4.867108e+00 7.269385e-02 -4.837820e+00 1.449496e-01 +2.437186e+01 -4.861098e+00 -4.863723e+00 -4.858473e+00 -4.921610e+00 7.309972e-02 -4.878928e+00 1.455641e-01 +2.462312e+01 -4.916229e+00 -4.919026e+00 -4.913431e+00 -4.971182e+00 7.346695e-02 -4.920325e+00 1.461804e-01 +2.487437e+01 -4.972385e+00 -4.975370e+00 -4.969400e+00 -5.022429e+00 7.384465e-02 -4.956661e+00 1.467191e-01 +2.512563e+01 -5.025580e+00 -5.028755e+00 -5.022406e+00 -5.083511e+00 7.429234e-02 -5.010030e+00 1.475069e-01 +2.537688e+01 -5.081393e+00 -5.084779e+00 -5.078007e+00 -5.133914e+00 7.465973e-02 -5.059351e+00 1.482312e-01 +2.562814e+01 -5.137392e+00 -5.141004e+00 -5.133780e+00 -5.175107e+00 7.495866e-02 -5.106977e+00 1.489272e-01 +2.587940e+01 -5.193786e+00 -5.197642e+00 -5.189931e+00 -5.232462e+00 7.537289e-02 -5.152272e+00 1.495862e-01 +2.613065e+01 -5.250264e+00 -5.254379e+00 -5.246148e+00 -5.285069e+00 7.575085e-02 -5.209793e+00 1.504189e-01 +2.638191e+01 -5.301986e+00 -5.306356e+00 -5.297617e+00 -5.337061e+00 7.612253e-02 -5.265064e+00 1.512147e-01 +2.663317e+01 -5.360165e+00 -5.364839e+00 -5.355491e+00 -5.386753e+00 7.647609e-02 -5.344318e+00 1.523485e-01 +2.688442e+01 -5.411448e+00 -5.416408e+00 -5.406489e+00 -5.446929e+00 7.690207e-02 -5.412624e+00 1.533190e-01 +2.713568e+01 -5.466291e+00 -5.471576e+00 -5.461007e+00 -5.492080e+00 7.722014e-02 -5.456416e+00 1.539380e-01 +2.738693e+01 -5.522951e+00 -5.528595e+00 -5.517308e+00 -5.548599e+00 7.761646e-02 -5.505755e+00 1.546324e-01 +2.763819e+01 -5.580457e+00 -5.586490e+00 -5.574425e+00 -5.607968e+00 7.803059e-02 -5.552613e+00 1.552891e-01 +2.788945e+01 -5.637800e+00 -5.644248e+00 -5.631354e+00 -5.661141e+00 7.839965e-02 -5.599639e+00 1.559453e-01 +2.814070e+01 -5.690689e+00 -5.697544e+00 -5.683835e+00 -5.718800e+00 7.879789e-02 -5.649618e+00 1.566396e-01 +2.839196e+01 -5.748119e+00 -5.755446e+00 -5.740792e+00 -5.768854e+00 7.914198e-02 -5.726580e+00 1.577030e-01 +2.864322e+01 -5.803409e+00 -5.811223e+00 -5.795597e+00 -5.824033e+00 7.951958e-02 -5.776873e+00 1.583939e-01 +2.889447e+01 -5.858864e+00 -5.867198e+00 -5.850532e+00 -5.876516e+00 7.987707e-02 -5.805315e+00 1.587834e-01 +2.914573e+01 -5.913462e+00 -5.922342e+00 -5.904584e+00 -5.926169e+00 8.021382e-02 -5.864178e+00 1.595863e-01 +2.939698e+01 -5.966979e+00 -5.976429e+00 -5.957531e+00 -5.975031e+00 8.054382e-02 -5.939096e+00 1.606025e-01 +2.964824e+01 -6.022963e+00 -6.033049e+00 -6.012879e+00 -6.033148e+00 8.093459e-02 -5.992064e+00 1.613171e-01 +2.989950e+01 -6.073658e+00 -6.084358e+00 -6.062960e+00 -6.090731e+00 8.131991e-02 -6.041836e+00 1.619857e-01 +3.015075e+01 -6.124649e+00 -6.136005e+00 -6.113297e+00 -6.142978e+00 8.166795e-02 -6.082528e+00 1.625302e-01 +3.040201e+01 -6.175224e+00 -6.187269e+00 -6.163182e+00 -6.187511e+00 8.196344e-02 -6.142546e+00 1.633302e-01 +3.065327e+01 -6.231362e+00 -6.244224e+00 -6.218505e+00 -6.247199e+00 8.235781e-02 -6.203956e+00 1.641446e-01 +3.090452e+01 -6.291154e+00 -6.304947e+00 -6.277368e+00 -6.296551e+00 8.268248e-02 -6.235268e+00 1.645583e-01 +3.115578e+01 -6.345823e+00 -6.360527e+00 -6.331128e+00 -6.348777e+00 8.302468e-02 -6.276250e+00 1.650982e-01 +3.140704e+01 -6.401757e+00 -6.417456e+00 -6.386067e+00 -6.410278e+00 8.342584e-02 -6.334657e+00 1.658646e-01 +3.165829e+01 -6.471083e+00 -6.488112e+00 -6.454067e+00 -6.462509e+00 8.376503e-02 -6.417096e+00 1.669404e-01 +3.190955e+01 -6.527244e+00 -6.545434e+00 -6.509069e+00 -6.528262e+00 8.419008e-02 -6.474521e+00 1.676857e-01 +3.216080e+01 -6.583359e+00 -6.602790e+00 -6.563947e+00 -6.573454e+00 8.448098e-02 -6.530272e+00 1.684061e-01 +3.241206e+01 -6.631713e+00 -6.652282e+00 -6.611166e+00 -6.627909e+00 8.483019e-02 -6.608623e+00 1.694134e-01 +3.266332e+01 -6.697886e+00 -6.720124e+00 -6.675675e+00 -6.695605e+00 8.526230e-02 -6.645454e+00 1.698848e-01 +3.291457e+01 -6.770830e+00 -6.795070e+00 -6.746626e+00 -6.755492e+00 8.564276e-02 -6.707890e+00 1.706810e-01 +3.316583e+01 -6.823909e+00 -6.849721e+00 -6.798139e+00 -6.810000e+00 8.598758e-02 -6.768819e+00 1.714544e-01 +3.341709e+01 -6.887730e+00 -6.915572e+00 -6.859941e+00 -6.868629e+00 8.635693e-02 -6.828523e+00 1.722089e-01 +3.366834e+01 -6.937418e+00 -6.966954e+00 -6.907945e+00 -6.909089e+00 8.661090e-02 -6.867709e+00 1.727023e-01 +3.391960e+01 -7.004365e+00 -7.036352e+00 -6.972457e+00 -6.959336e+00 8.692527e-02 -6.897645e+00 1.730783e-01 +3.417085e+01 -7.065502e+00 -7.099912e+00 -7.031190e+00 -7.016262e+00 8.728007e-02 -6.941673e+00 1.736298e-01 +3.442211e+01 -7.119186e+00 -7.155881e+00 -7.082610e+00 -7.067605e+00 8.759883e-02 -6.977245e+00 1.740741e-01 +3.467337e+01 -7.183759e+00 -7.223411e+00 -7.144255e+00 -7.139684e+00 8.804438e-02 -7.065054e+00 1.751660e-01 +3.492462e+01 -7.259637e+00 -7.303085e+00 -7.216383e+00 -7.182658e+00 8.830896e-02 -7.100586e+00 1.756060e-01 +3.517588e+01 -7.314258e+00 -7.360672e+00 -7.268078e+00 -7.230395e+00 8.860193e-02 -7.166355e+00 1.764174e-01 +3.542714e+01 -7.337242e+00 -7.384967e+00 -7.289771e+00 -7.294387e+00 8.899315e-02 -7.218696e+00 1.770604e-01 +3.567839e+01 -7.403403e+00 -7.455122e+00 -7.352003e+00 -7.346962e+00 8.931328e-02 -7.268380e+00 1.776687e-01 +3.592965e+01 -7.449772e+00 -7.504499e+00 -7.395419e+00 -7.392131e+00 8.958741e-02 -7.322860e+00 1.783333e-01 +3.618090e+01 -7.494850e+00 -7.552679e+00 -7.437459e+00 -7.442115e+00 8.988979e-02 -7.360547e+00 1.787916e-01 +3.643216e+01 -7.560667e+00 -7.623364e+00 -7.498522e+00 -7.478103e+00 9.010686e-02 -7.431407e+00 1.796502e-01 +3.668342e+01 -7.628932e+00 -7.697141e+00 -7.561424e+00 -7.541406e+00 9.048744e-02 -7.469543e+00 1.801106e-01 +3.693467e+01 -7.709965e+00 -7.785396e+00 -7.635464e+00 -7.582896e+00 9.073602e-02 -7.530703e+00 1.808464e-01 +3.718593e+01 -7.782516e+00 -7.865111e+00 -7.701119e+00 -7.632845e+00 9.103437e-02 -7.585737e+00 1.815060e-01 +3.743719e+01 -7.869666e+00 -7.961852e+00 -7.779105e+00 -7.674438e+00 9.128206e-02 -7.644405e+00 1.822065e-01 +3.768844e+01 -7.978811e+00 -8.084753e+00 -7.875248e+00 -7.729445e+00 9.160862e-02 -7.706032e+00 1.829395e-01 +3.793970e+01 -8.022276e+00 -8.134310e+00 -7.913014e+00 -7.774001e+00 9.187227e-02 -7.754684e+00 1.835161e-01 +3.819095e+01 -8.070581e+00 -8.189841e+00 -7.954604e+00 -7.821035e+00 9.214977e-02 -7.799202e+00 1.840421e-01 +3.844221e+01 -8.124939e+00 -8.252953e+00 -8.000897e+00 -7.869433e+00 9.243445e-02 -7.821596e+00 1.843062e-01 +3.869347e+01 -8.346787e+00 -8.518805e+00 -8.183421e+00 -7.914599e+00 9.269933e-02 -7.888669e+00 1.850947e-01 +3.894472e+01 -8.346787e+00 -8.518805e+00 -8.183421e+00 -7.973785e+00 9.304529e-02 -7.946464e+00 1.857715e-01 +3.919598e+01 -8.397940e+00 -8.582394e+00 -8.223839e+00 -8.018345e+00 9.330492e-02 -7.991085e+00 1.862924e-01 +3.944724e+01 -8.397940e+00 -8.582394e+00 -8.223839e+00 -8.068758e+00 9.359777e-02 -8.038967e+00 1.868496e-01 +3.969849e+01 -8.698970e+00 -8.981786e+00 -8.445950e+00 -8.116029e+00 9.387154e-02 -8.112407e+00 1.877012e-01 +3.994975e+01 -8.698970e+00 -8.981786e+00 -8.445950e+00 -8.172707e+00 9.419875e-02 -8.157806e+00 1.882257e-01 +4.020101e+01 -8.698970e+00 -8.981786e+00 -8.445950e+00 -8.226240e+00 9.450675e-02 -8.212407e+00 1.888545e-01 +4.045226e+01 -8.823909e+00 -9.165168e+00 -8.528841e+00 -8.275761e+00 9.479079e-02 -8.249410e+00 1.892795e-01 +4.070352e+01 -9.000000e+00 -9.450883e+00 -8.634712e+00 -8.331512e+00 9.510954e-02 -8.325274e+00 1.901479e-01 +4.095477e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.384360e+00 9.541071e-02 -8.376478e+00 1.907317e-01 +4.120603e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.439857e+00 9.572595e-02 -8.440463e+00 1.914588e-01 +4.145729e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.484865e+00 9.598086e-02 -8.491328e+00 1.920348e-01 +4.170854e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.537910e+00 9.628041e-02 -8.519404e+00 1.923520e-01 +4.195980e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.599119e+00 9.662492e-02 -8.575506e+00 1.929843e-01 +4.221106e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.642882e+00 9.687048e-02 -8.629968e+00 1.935962e-01 +4.246231e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.680393e+00 9.708046e-02 -8.698045e+00 1.943583e-01 +4.271357e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.722640e+00 9.731642e-02 -8.768285e+00 1.951414e-01 +4.296482e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.770546e+00 9.758330e-02 -8.812061e+00 1.956279e-01 +4.321608e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.828336e+00 9.790426e-02 -8.866126e+00 1.962271e-01 +4.346734e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.878582e+00 9.818247e-02 -8.941303e+00 1.970573e-01 +4.371859e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.930728e+00 9.847038e-02 -8.991229e+00 1.976067e-01 +4.396985e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -8.988038e+00 9.878582e-02 -9.068893e+00 1.984583e-01 +4.422111e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.059101e+00 9.917557e-02 -9.108788e+00 1.988944e-01 +4.447236e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.113533e+00 9.947308e-02 -9.167987e+00 1.995396e-01 +4.472362e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.174440e+00 9.980492e-02 -9.217719e+00 2.000801e-01 +4.497487e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.223116e+00 1.000693e-01 -9.297373e+00 2.009427e-01 +4.522613e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.275458e+00 1.003529e-01 -9.363467e+00 2.016557e-01 +4.547739e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.323074e+00 1.006101e-01 -9.449496e+00 2.025800e-01 +4.572864e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.383355e+00 1.009349e-01 -9.478038e+00 2.028857e-01 +4.597990e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.438014e+00 1.012284e-01 -9.514338e+00 2.032738e-01 +4.623116e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.486164e+00 1.014863e-01 -9.553348e+00 2.036901e-01 +4.648241e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.544788e+00 1.017994e-01 -9.604897e+00 2.042389e-01 +4.673367e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.584586e+00 1.020114e-01 -9.658741e+00 2.048106e-01 +4.698492e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.625663e+00 1.022298e-01 -9.708294e+00 2.053353e-01 +4.723618e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.685900e+00 1.025492e-01 -9.727122e+00 2.055343e-01 +4.748744e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.719122e+00 1.027249e-01 -9.778745e+00 2.060790e-01 +4.773869e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.776097e+00 1.030255e-01 -9.835787e+00 2.066792e-01 +4.798995e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.830368e+00 1.033111e-01 -9.877319e+00 2.071151e-01 +4.824121e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.887314e+00 1.036099e-01 -9.907007e+00 2.074261e-01 +4.849246e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.940571e+00 1.038886e-01 -9.954404e+00 2.079217e-01 +4.874372e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -9.991075e+00 1.041522e-01 -1.003003e+01 2.087100e-01 +4.899497e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -1.003860e+01 1.043996e-01 -1.007373e+01 2.091642e-01 +4.924623e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -1.009609e+01 1.046981e-01 -1.013336e+01 2.097823e-01 +4.949749e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -1.014944e+01 1.049743e-01 -1.017059e+01 2.101673e-01 +4.974874e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 -1.021245e+01 1.052997e-01 -1.023122e+01 2.107928e-01 +5.000000e+01 -9.301030e+00 -1.006360e+01 -8.782578e+00 nan nan nan nan diff --git a/plots/definitions.py b/plots/definitions.py index 79c789b..635f05c 100644 --- a/plots/definitions.py +++ b/plots/definitions.py @@ -24,6 +24,14 @@ def log10_special_formatter(x, pos): res = "$%g$" % (10.0**x) return res +def log10_special_formatter_every_n(x, pos, n=2): + res = "" + if x%n == 0: + res = "$10^{%g}$" % (x) + if np.abs(x) < 3: + res = "$%g$" % (10.0**x) + return res + def pow10_formatter(x, pos): lgx = int(np.log10(x)) if np.abs(lgx) < 3: diff --git a/plots/illustration.py b/plots/illustration.py index 50d3fdf..52b6b47 100644 --- a/plots/illustration.py +++ b/plots/illustration.py @@ -98,7 +98,6 @@ def outline(lw=2): t = compression**(1. / n) nlive = -1. / np.log(t) chi2_threshold = [model.isf(x_start * t**i) for i in range(0, n + 1)] -print(nlive) for i, (t, a) in enumerate(zip(chi2_threshold, alpha)): ax[1].vlines(t, 0, model.pdf(t), color="goldenrod", lw=3, alpha=a) # , label="Threshold $\chi^2$" if not i else None) diff --git a/plots/plot_higgs_ns.py b/plots/plot_higgs_ns.py deleted file mode 100644 index 2d17ebb..0000000 --- a/plots/plot_higgs_ns.py +++ /dev/null @@ -1,78 +0,0 @@ -""" -Illustration of method on Higgs resonance search like problem -============================================================= -""" - -import sys -import numpy as np -import matplotlib.pyplot as plt -from scipy.special import logsumexp - -sys.path.append("./..") -from p_value.ns import pc, ns_result - -def get_line(file, label): - with open(file) as res_file: - for line in res_file: - if line.strip() == label: - next_line = res_file.readline() - return np.array([float(e) for e in next_line.split()]) - else: - raise RuntimeError("didn't find {}".format(label)) - -def req_n_mc(p, log10err): - return 1.0 / ((log10err*np.log(10))**2 * p) - -# Analyse MC results -higgs_ts_samples = np.genfromtxt("all_tsvals_higgs.dat") - -hts_sorted = np.sort(higgs_ts_samples) -lhtss = float(len(higgs_ts_samples)) -pvals_range = [] -i = 1 -ts_vals = np.linspace(0,50,250) -for ts in np.flip(ts_vals): - while (hts_sorted[-i] > ts) and (i < len(hts_sorted)): - i += 1 - pvals_range.append((i-1)/lhtss) - -pvals_range = np.flip(pvals_range) -log10pval_errs_range = np.array([np.sqrt(1/(p*lhtss))/np.log(10.) for p in pvals_range]) - -# Analyse PCh results -n_live = 100 -root = "pc_higgs" -label1 = "=== local volume -- log() ===" -label2 = "=== Number of likelihood calls ===" - -log_xp = get_line("chains/"+root+".resume", label1) -log_x = logsumexp(log_xp) -n_iter = -log_x * n_live - -ev_name = "chains/"+root+"_dead.txt" -ev_data = np.genfromtxt(ev_name) -test_statistic = ev_data[:, 0] -log_x = -np.arange(0, len(test_statistic), 1.) / n_live -log_x_delta = np.sqrt(-log_x / n_live) - -pch_calls = int(get_line("chains/"+root+".resume", label2)[0]) - -res = ns_result(n_iter, n_live, pch_calls) - -print(res.log10_pvalue, res.error_log10_pvalue, pch_calls, round(req_n_mc(10**res.log10_pvalue, res.error_log10_pvalue)), 1/10**res.log10_pvalue) - - -fig, ax = plt.subplots() - -ax.plot(test_statistic, np.log10(np.exp(log_x)), c='grey', label='Polychord') -ax.fill_between(test_statistic, log_x*np.log10(np.e)-log_x_delta/np.log(10), log_x*np.log10(np.e)+log_x_delta/np.log(10), fc='grey', alpha=0.6) -ax.plot(ts_vals, np.log10(pvals_range), c='k', ls=':', label='MC') -ax.fill_between(ts_vals, np.log10(pvals_range)-log10pval_errs_range, np.log10(pvals_range)+log10pval_errs_range, fc='k', alpha=0.6) - -plt.xlabel('TS') -plt.ylabel('$\mathrm{log}_{10}(p)$') -plt.legend(title='Higgs example') -plt.xlim([0,50]) -plt.ylim([-6,0]) -plt.savefig('pch_vs_mc.pdf') -plt.show() diff --git a/plots/resonance_search.py b/plots/resonance_search.py new file mode 100644 index 0000000..b60b5bd --- /dev/null +++ b/plots/resonance_search.py @@ -0,0 +1,63 @@ +""" +============================================================= +Calibration of the TS for Higgs resonance search like problem +============================================================= +""" + +import numpy as np +import matplotlib.pyplot as plt + +from scipy.stats import norm + +from definitions import set_style, log10_special_formatter_every_n + +def log10p_to_significance(lgp): + return norm.isf(np.minimum(10**lgp,0.5))-0.055 # Include a fudge factor for plotting artefact + +def significance_to_log10p(z): + return np.log10(norm.sf(z)) + +set_style() + +ts_vals, mc_lgpval, mc_lgpval_err_lo, mc_lgpval_err_hi, pch_lgpvals, pch_lgpvals_err,\ +mn_lgpvals, mn_lgpvals_err = np.genfromtxt('data/resonance_search_pvals.txt', unpack=True) + +fig, ax = plt.subplots(figsize=(3.375,2.1)) + +# Plot the Monte Carlo results with Clopper-Pearson error bands +ax.plot(ts_vals, mc_lgpval, c='grey', ls='-', label='Monte Carlo') +ax.fill_between(ts_vals, mc_lgpval_err_lo, mc_lgpval_err_hi, fc='grey', alpha=0.25) + +# Plot the Nested Sampling results with error bands +ax.plot(ts_vals, pch_lgpvals, c='red', label=r'\textsc{PolyChord}') +ax.fill_between(ts_vals, pch_lgpvals-pch_lgpvals_err, pch_lgpvals+pch_lgpvals_err, fc='red', alpha=0.25) +ax.plot(ts_vals, mn_lgpvals, c='blue', label=r'\textsc{MultiNest}') +ax.fill_between(ts_vals, mn_lgpvals-mn_lgpvals_err, mn_lgpvals+mn_lgpvals_err, fc='blue', alpha=0.25) + +# The 5sigma line +p_5sigma = norm.sf(5) +ax.axhline(y=np.log10(p_5sigma), c='k', ls=':', lw=1) + +ax.legend(loc=1, frameon=False, handlelength=2.7) +ax.tick_params(which='both', direction='in', bottom=True, top=True, left=True, right=False) +ax.set_xlabel(r'Test statistic $\lambda$') +ax.set_ylabel(r'$P$-value') +ax.set_xlim([0,50]) +ax.set_ylim([-10.5,0]) + +formatter = plt.FuncFormatter(log10_special_formatter_every_n) +major_locator = plt.FixedLocator(range(-10,1)) +minor_locator = plt.FixedLocator([i+j for i in np.log10(range(2,11)) for j in range(-11,1)]) +ax.yaxis.set_major_locator(major_locator) +ax.yaxis.set_minor_locator(minor_locator) +ax.yaxis.set_major_formatter(formatter) +secax = ax.secondary_yaxis('right', functions=(log10p_to_significance, significance_to_log10p)) +secax.tick_params(which='both', direction='in', right=True) +formatter = plt.FormatStrFormatter('%.1d$\sigma$') +major_locator = plt.FixedLocator(range(1,8)) +secax.yaxis.set_major_locator(major_locator) +secax.yaxis.set_major_formatter(formatter) +secax.set_ylabel("Significance $Z$", rotation=270, labelpad=15) + +plt.tight_layout(pad=0.2) +plt.savefig('higgs_nested_vs_mc.pdf', backend='pgf')