This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy | |
import uncertainties | |
from uncertainties import ufloat | |
from wg1template.histogram_plots import create_solo_figure, add_descriptions_to_plot | |
from wg1template.plot_style import TangoColors | |
from wg1template.plot_utilities import export | |
from wg1template.point_plots import DataPoints, DataVariable, DataPointsPlot | |
"""The values are taken from from the PDG reviews of the corresponding year.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy | |
from wg1template.histogram_plots import create_solo_figure, add_descriptions_to_plot | |
from wg1template.plot_style import TangoColors | |
from wg1template.plot_utilities import export | |
from wg1template.point_plots import DataVariable, DataPointsPlot | |
def cpv_and_mixing(k, h_np=1.): | |
# deltaF = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
def cvm_2samp_weigted(data1, data2, wei1, wei2): | |
"""Calculate Cramer-vonMises test statistics with weighted samples.""" | |
# Indices for a sorted array | |
ix1 = numpy.argsort(data1) | |
ix2 = numpy.argsort(data2) | |
# Sorted data | |
data1 = data1[ix1] | |
data2 = data2[ix2] |