RNO-G / mattak

RNO-G dataformats
1 stars 1 forks source link

Sampling rate is hard-coded in pyroot backend and potentially hard-coded in uproot backend #15

Closed fschlueter closed 1 year ago

fschlueter commented 1 year ago

The two code blocks of concern are:

        sampleRate = 3.2  #if ( ROOT.AddressOf(self.ds.info()) ==0 or self.ds.info().radiant_sample_rate == 0)  else self.ds.info().radiant_sample_rate/1000.

and

        sampleRate = 3.2 if ( self.run_info is None  or 'radiant-samplerate' not in self.run_info)  else float(self.run_info['radiant-samplerate'])/1000 
cozzyd commented 1 year ago

yeah, I had some trouble with some runs for this, and I just punted rather than trying so solve the problem :)

fschlueter commented 1 year ago

Solved with #14. It should be mentioned that when the sampling rate can not be read from the run info it is set to None now