def draw_x(self, off=0, start=0, end=None, **dkw): x, y = self.get_data(off, start, end)[0].T h = self.Draw.histo_2d( x, y, Bins.get_pixel_x() * 2, **prep_kw(dkw, x_tit=f'Column Plane {self.DUTPlane - self.NTelPlanes}', y_tit=f'Column DUT {self.TelPlane}')) Draw.info(f'Correlation Coefficent: {h.GetCorrelationFactor():.2f}', size=.03)
def find_mask_(self, plane=1, _redo=False): self.Tree.SetEstimate( sum(self.get_tree_vec('n_hits_tot', dtype='u1', nentries=50000))) x, y = self.get_tree_vec(self.get_hit_vars( arange(self.Run.NTelPlanes)[::-1][plane]), nentries=50000, dtype='u2') histos = [ self.Draw.distribution(x, Bins.get_pixel_x(), show=False), self.Draw.distribution(y, Bins.get_pixel_y(), show=False) ] return array([ h.GetBinCenter(i) for h in histos for i in [ h.FindFirstBinAbove(h.GetMaximum() * .01), h.FindLastBinAbove(h.GetMaximum() * .01) ] ], 'i')[[0, 2, 1, 3]].tolist()