Changeset 13644 for fact/tools/pyscripts


Ignore:
Timestamp:
05/11/12 06:49:17 (13 years ago)
Author:
neise
Message:
RawData.board_times and RawData.start_cells are now numpy array. They were of type ROOT.PyShortBuffer before, which is not so easy to handle.
Since it is not time critical, I decided to create them this way.

RawData.info() is not giving a sufficient amount of info, I think.
should be reworked.

A RawData object has several member, which make no sense in all cases.
E.g. some members related to the baseline correction. 
These members should only exist, in case the user wants to perform baseline correction.
File:
1 edited

Legend:

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

    r13630 r13644  
    143143            self.event_id     = None
    144144            self.trigger_type = None
    145             self.start_cells  = None
    146             self.board_times  = None
     145            #self.start_cells  = None
     146            #self.board_times  = None
     147            self.start_cells = np.zeros( self.npix, np.int16 )
     148            self.board_times = np.zeros( 40, np.int32 )
     149
     150            # data_file             is a CalFactFits object
     151            # data_file.datafile    is one of the two FactFits objects hold by a CalFactFits.
     152            #       sorry for the strange naming ..
     153            data_file.datafile.SetPtrAddress('StartCellData', self.start_cells)
     154            data_file.datafile.SetPtrAddress('BoardTime', self.board_times)
    147155
    148156        else:
     
    225233                self.event_id     = self.data_file.event_id
    226234                self.trigger_type = self.data_file.event_triggertype
    227                 self.start_cells  = self.data_file.event_offset
    228                 self.board_times  = self.data_file.event_boardtimes
     235                #self.start_cells  = self.data_file.event_offset
     236                #self.board_times  = self.data_file.event_boardtimes
    229237                #self.acal_data    = self.data.copy().reshape(self.data_file.npix, self.data_file.nroi)
    230238        else:
     
    319327       
    320328        """
    321        
    322         print 'data file:  ', data_file_name
    323         print 'calib file: ', calib_file_name
    324         print 'calibration file'
    325         print 'N baseline_mean: ', self.Nblm
    326         print 'N gain mean: ', self.Ngm
    327         print 'N TriggeroffsetMean: ', self.Ntom
    328        
     329        print 'data file:  ', self.data_file_name
     330        print 'calib file: ', self.calib_file_name
     331        print '... we need more information printed here ... '
     332
    329333# -----------------------------------------------------------------------------
    330334class RawDataFake( object ):
Note: See TracChangeset for help on using the changeset viewer.