#!/usr/bin/python # # Dominik Neise # TU Dortmund # # test for freshly implemented methods in pyfact. # subject to frequent change! from pyfact import * dfname = '/data03/fact-construction/raw/2011/11/24/20111124_121.fits' calfname = '/data03/fact-construction/raw/2011/11/24/20111124_111.drs.fits' # access the data rd = rawdata( dfname, calfname ) print 'dfname: ', dfname print 'calfname:', calfname print 'NEvents: ', rd.NEvents def loop_acal( Neve = 1000 ): """ bla """ if rd.NEvents < Neve: print 'data file contains not enough events' exit( 0 ) else: for i in range( Neve ): #if np.mod(i,1000): # print 'Event: ', i rd.next() rd.filterSlidingAverage() print rd.smoothData rd.filterCFD() print rd.cfdData rd.findPeak() print rd.maxPos print rd.maxAmp rd.sumAroundPeak() print rd.integral #print len(rd.maxPos) #print len(rd.maxAmp) print 'Trigger Type', rd.trigType print (rd.filterSlidingAverage.__doc__) print (rd.filterCFD.__doc__) print (rd.findPeak.__doc__) print (rd.sumAroundPeak.__doc__) loop_acal(2)