1
votes

I want to compare 2 histograms, that are coming from a evaluation board, which is already binning the counted events in a histogram. I am taking data from 2 channels with different number of events (in fact, one is background only, one is background + signal, a pretty usual experimental setting), and with different number of bins, different bin width and different center position of bins.

The datafile looks like this:

HSlice [CH1]
...
  44.660      46.255    6
  46.255      47.850    10
  47.850      49.445    18
  49.445      51.040    8
  51.040      52.635    28
  52.635      54.230    4
  54.230      55.825    18
  55.825      57.421    183
  57.421      59.016    582
  59.016      60.611    1786
...
HSlice [CH2]
...
  52.022      53.880    0
  53.880      55.738    9
  55.738      57.596    213
  57.596      59.454    728
  59.454      61.312    2944
  61.312      63.170    9564
...

The first two columns give the boundaries of the respective bin (that is time) and the last column represents the number of events within this timeframe.

Now I want make a kind of background-reduction, so to say subtract the background-histogram from the "background+signal"-histogram to obtain the time trace of the actual signal. I can not do this line-wise since the histograms are quite different. Is there a simple function in python or an elegant solution how to make the data comparable, (for example by interpolating between two datapoints in one histogram to fit the position of a bin of the other histogram) without messing up the time resolution given by the experiment (neither make it worse than it is, nor pretending a better time resolution).

Thank you,

lepakk

1

1 Answers

1
votes

Channel 2 has a bigger bin size than channel 1 (1.858 vs 1.595). So I would transfer the values from the smaller bins into the bigger bins. That will lead to a loss of resolution, but I think thats more honest than transferring from bigger bins into smaller bin and therefore increase the resolution.

Now my approach would be to take all the values from the bins in channel 1 and assign them the point in the center of their time bin. You don't really know exactly where in the bin they were originally measured, so this is the point where you cheat a little bit.

Now fill the values of channel 1 into the bins of channel 2 according to their new time value.

That would be my first approach.