generic.py

changeset 32
022f6f2bc09c
parent 27
74f7617f5356
child 33
2984158468e6
equal deleted inserted replaced
31:b243f896e5f4 32:022f6f2bc09c
417 self.z = np.arange(len(channel_parameters['data'])) * self.resolution + self.resolution/2.0 # Change: add half bin in the z 417 self.z = np.arange(len(channel_parameters['data'])) * self.resolution + self.resolution/2.0 # Change: add half bin in the z
418 self.points = len(channel_parameters['data']) 418 self.points = len(channel_parameters['data'])
419 self.rc = [] 419 self.rc = []
420 self.duration = 60 420 self.duration = 60
421 421
422 def calculate_rc(self): 422 def calculate_rc(self, idx_min = 4000, idx_max = 5000):
423 background = np.mean(self.matrix[:,4000:], axis = 1) # Calculate the background from 30000m and above 423 background = np.mean(self.matrix[:,idx_min:idx_max], axis = 1) # Calculate the background from 30000m and above
424 self.rc = (self.matrix.transpose()- background).transpose() * (self.z **2) 424 self.rc = (self.matrix.transpose()- background).transpose() * (self.z **2)
425 425
426 426
427 def update(self): 427 def update(self):
428 self.start_time = min(self.data.keys()) 428 self.start_time = min(self.data.keys())

mercurial