Changeset 12897 for fact/tools/pyscripts
- Timestamp:
- 02/16/12 21:32:52 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/tools/fbsl2.py
r12874 r12897 6 6 import numpy as np 7 7 8 import pyfact 9 from 10 from 8 from pyfact_rename import RawData 9 from myhisto import * 10 from hist import * 11 11 12 12 class baseline_ana( object): 13 13 """ 14 14 """ 15 def __init__( self, rfiles = {}, step = 500, bsl_corr = True, 16 max_events = -1 ): 15 def __init__(self, rfiles={}, step=500, bsl_corr=True, max_events=-1): 17 16 """ 18 17 rfiles : dictionary of strings : run file names … … 31 30 else: 32 31 print "baseline analysing data: " 33 rfiles.info() 32 #rfiles.info() 33 for key in rfiles.names.keys(): 34 print key, rfiles.names[key] 34 35 35 36 self.rfiles = rfiles … … 42 43 print 'no baseline correction' 43 44 44 45 45 # create the object providing the rawdata 46 self.rd = pyfact.rawdata( rfiles.names['data'], rfiles.names['drscal'])47 self.npix = self.rd.NPIX46 self.rd = RawData(rfiles.names['data'], rfiles.names['drscal']) 47 self.npix = self.rd.npix 48 48 49 49 if max_events == -1: … … 93 93 for ev in range( first, last ): 94 94 if ev%100 == 0: print 'Event', ev 95 self.rd.next ()95 self.rd.next_event() 96 96 # rd.CorrectBaseline() 97 hist.fillall( self.rd.acal Data )97 hist.fillall( self.rd.acal_data ) 98 98 99 99 … … 152 152 self.pixhist.SetBinContent() 153 153 154 self.loopPixel( self.rd. NPIX, self.pixhist )154 self.loopPixel( self.rd.npix, self.pixhist ) 155 155 156 156 … … 170 170 171 171 """ 172 runfiles = pyfact.fnames( )172 runfiles = pyfact.fnames(zipped = False) 173 173 174 174 runfiles.info()
Note:
See TracChangeset
for help on using the changeset viewer.