def processNumericalHistogramData()

in lib/analysis.py [0:0]


  def processNumericalHistogramData(self, hist, data, branch, segment):
    hist_name = hist.split('.')[-1]
    print(f"      processing numerical histogram: {hist}")

    # Calculate stats
    bins = data[branch][segment]["histograms"][hist]["bins"]
    counts = data[branch][segment]["histograms"][hist]["counts"]

    desc = self.config["histograms"][hist]["desc"]
    self.results[branch][segment]["histograms"][hist_name]["desc"] = desc

    calculate_histogram_stats(bins, counts, self.results[branch][segment]["histograms"][hist_name])

    # Calculate statistical tests
    if branch != self.control:
      control_data = data[self.control][segment]["histograms"][hist]
      branch_data = data[branch][segment]["histograms"][hist]
      result = self.results[branch][segment]["histograms"][hist_name]
      calculate_histogram_tests_subsampling(control_data, branch_data, result)