示例#1
0
 def determine_detector_offsets(self):
     print "Determing detector offsets..."
     for station_id, station_group in enumerate(self.station_groups):
         process = ProcessEvents(self.data, station_group)
         offsets = process.determine_detector_timing_offsets()
         print "Offsets for station %d: %s" % (station_id, offsets)
         self.detector_offsets.append(offsets)
示例#2
0
 def determine_detector_offsets(self, overwrite=False):
     offsets_group = '/detector_offsets'
     if offsets_group in self.data and not overwrite:
         self.detector_offsets = self.data.root.detector_offsets.read()
     else:
         for station_id, station_group in enumerate(self.station_groups):
             process = ProcessEvents(self.data, station_group)
             offsets = process.determine_detector_timing_offsets()
             print "Offsets for station %d: %s" % (station_id, offsets)
             self.detector_offsets.append(offsets)
         if offsets_group in self.data:
             self.data.remove_node(offsets_group)
         group, node = os.path.split(offsets_group)
         self.data.create_array(group, node, self.detector_offsets)