MoAly98 / Pythium

ROOT Killa'
2 stars 5 forks source link

Bug in observable binning attribute #54

Open jkwinter opened 2 years ago

jkwinter commented 2 years ago

Context:

trying to build 2D observables from existing 1D observables as such

Observable([obs1.name,obs2.name],f'{obs1.name}_{obs2.name}', binning = [obs1.binning,obs2.binning], dataset = 'thj_observables', label = f'{obs1.name} vs {obs2.name}')

returns error because obs1.binning returns a list instead of object of pythium binning class type

List index 0 item [<pythium.histogramming.binning.RegBin object at 0x7f5b55220bd0>] not instance of <class "pythium.histogramming.binning._Binning">.

In pythium.histogramming.objects.py -> self.binning converted to list if not provided as such

Temporary solution: use binnin = [obs1.binning[0], obs2.binning[0]]

jkwinter commented 2 years ago

This also affects self.var, self.labels