uproot5 icon indicating copy to clipboard operation
uproot5 copied to clipboard

Inconsistent error calculation when reading TProfile

Open patinkaew opened this issue 1 year ago • 2 comments

Dear Experts,

I'm getting different errors when trying to extract errors from TProfile saved in a root file. I tried two ways:

  1. pd_tp.errors(): this seems to get the correct error compared to error produced with ROOT (C++) script.
  2. np.sqrt(pd_tp.to_hist().variances()): this gives smaller errors which is incorrect.

Do you know what might be the issue here? It seems there are problems when converting to boost/hist.

I'm using uproot 4.7.3.

patinkaew avatar Feb 24 '24 00:02 patinkaew

I just tried with uproot 5.2.2.

The problem with error calculation still persist. However, now if I do pd_tp.values() and pd_tp.to_hist().values(), I also got different values...

patinkaew avatar Feb 24 '24 00:02 patinkaew

Could it be related to https://github.com/scikit-hep/uproot5/issues/908#issuecomment-1898711688 and https://github.com/scikit-hep/uproot5/pull/1000#pullrequestreview-1700690262? I'm not 100% convinced that TProfile and a boost-histogram with WeightedMean Storage have the same data model.

jpivarski avatar Feb 24 '24 00:02 jpivarski