Changeset 14469 for fact/tools


Ignore:
Timestamp:
10/10/12 17:42:29 (12 years ago)
Author:
neise
Message:
added UnixTimeUTC member to RawData class - called unixtime - seconds since 01.01.1970 
File:
1 edited

Legend:

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

    r14428 r14469  
    177177            #:  starting at 1
    178178            self.event_id     = None
     179           
    179180            #: data=4 ; the rest I don't know by heart .. should be documented here :-)
    180181            self.trigger_type = None
     
    185186            #: each FAD has an onboard clock running from startup time. Currently I don't know the time unit. However this is an array of 40 times, since we have 40 boards.
    186187            self.board_times = np.zeros( 40, np.int32 )
     188            self._unixtime_tuple = np.zeros( 2, np.int32 )
     189            self.unixtime = None
    187190
    188191            # data_file             is a CalFactFits object
     
    191194            data_file.datafile.SetPtrAddress('StartCellData', self.start_cells)
    192195            data_file.datafile.SetPtrAddress('BoardTime', self.board_times)
     196            data_file.datafile.SetPtrAddress('UnixTimeUTC', self._unixtime_tuple)
     197           
    193198
    194199        else:
     
    212217            self.start_cells = np.zeros( self.npix, np.int16 )
    213218            self.board_times = np.zeros( 40, np.int32 )
     219            self._unixtime_tuple = np.zeros(2, np.int32 )
    214220
    215221            # set the pointers to the data++
     
    219225            data_file.SetPtrAddress('Data', self.data)
    220226            data_file.SetPtrAddress('BoardTime', self.board_times)
     227            data_file.SetPtrAddress('UnixTimeUTC', self._unixtime_tuple)
    221228                   
    222229            # open the calibration file
     
    271278                #self.board_times  = self.data_file.event_boardtimes
    272279                #self.acal_data    = self.data.copy().reshape(self.data_file.npix, self.data_file.nroi)
     280
     281                self.unixtime = self._unixtime_tuple[0] + self._unixtime_tuple[1]/1.e6
     282
    273283        else:
    274284            if self.data_file.GetNextRow() == False:
Note: See TracChangeset for help on using the changeset viewer.