scikit-hep / uproot5

ROOT I/O in pure Python and NumPy.

Home Page:https://uproot.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent error calculation when reading TProfile

patinkaew opened this issue · 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.

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...

Could it be related to #908 (comment) and #1000 (review)? I'm not 100% convinced that TProfile and a boost-histogram with WeightedMean Storage have the same data model.