- Timestamp:
- 10/10/12 17:42:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/pyfact.py
r14428 r14469 177 177 #: starting at 1 178 178 self.event_id = None 179 179 180 #: data=4 ; the rest I don't know by heart .. should be documented here :-) 180 181 self.trigger_type = None … … 185 186 #: 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. 186 187 self.board_times = np.zeros( 40, np.int32 ) 188 self._unixtime_tuple = np.zeros( 2, np.int32 ) 189 self.unixtime = None 187 190 188 191 # data_file is a CalFactFits object … … 191 194 data_file.datafile.SetPtrAddress('StartCellData', self.start_cells) 192 195 data_file.datafile.SetPtrAddress('BoardTime', self.board_times) 196 data_file.datafile.SetPtrAddress('UnixTimeUTC', self._unixtime_tuple) 197 193 198 194 199 else: … … 212 217 self.start_cells = np.zeros( self.npix, np.int16 ) 213 218 self.board_times = np.zeros( 40, np.int32 ) 219 self._unixtime_tuple = np.zeros(2, np.int32 ) 214 220 215 221 # set the pointers to the data++ … … 219 225 data_file.SetPtrAddress('Data', self.data) 220 226 data_file.SetPtrAddress('BoardTime', self.board_times) 227 data_file.SetPtrAddress('UnixTimeUTC', self._unixtime_tuple) 221 228 222 229 # open the calibration file … … 271 278 #self.board_times = self.data_file.event_boardtimes 272 279 #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 273 283 else: 274 284 if self.data_file.GetNextRow() == False:
Note:
See TracChangeset
for help on using the changeset viewer.