Changeset 12897 for fact/tools/pyscripts


Ignore:
Timestamp:
02/16/12 21:32:52 (13 years ago)
Author:
lusterma
Message:
updated fbsl2.py to work with pyfact_rename instead of pyfact
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/tools/fbsl2.py

    r12874 r12897  
    66import numpy as np
    77
    8 import pyfact
    9 from   myhisto import *
    10 from   hist    import *
     8from pyfact_rename import RawData
     9from myhisto import *
     10from hist    import *
    1111
    1212class  baseline_ana( object):
    1313    """
    1414    """
    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):
    1716        """
    1817        rfiles   : dictionary of strings : run file names
     
    3130        else:
    3231            print "baseline analysing data: "
    33             rfiles.info()
     32            #rfiles.info()
     33            for key in rfiles.names.keys():
     34                print key, rfiles.names[key]
    3435
    3536        self.rfiles   = rfiles
     
    4243            print 'no baseline correction'
    4344
    44 
    4545        # create the object providing the rawdata
    46         self.rd = pyfact.rawdata( rfiles.names['data'], rfiles.names['drscal'] )
    47         self.npix    = self.rd.NPIX
     46        self.rd = RawData(rfiles.names['data'], rfiles.names['drscal'])
     47        self.npix = self.rd.npix
    4848       
    4949        if max_events == -1:
     
    9393        for ev in range( first, last ):
    9494            if ev%100 == 0: print 'Event', ev
    95             self.rd.next()
     95            self.rd.next_event()
    9696            # rd.CorrectBaseline()
    97             hist.fillall( self.rd.acalData )
     97            hist.fillall( self.rd.acal_data )
    9898               
    9999               
     
    152152        self.pixhist.SetBinContent()
    153153
    154         self.loopPixel( self.rd.NPIX, self.pixhist )
     154        self.loopPixel( self.rd.npix, self.pixhist )
    155155
    156156
     
    170170
    171171    """
    172     runfiles = pyfact.fnames()
     172    runfiles = pyfact.fnames(zipped = False)
    173173
    174174    runfiles.info()
Note: See TracChangeset for help on using the changeset viewer.