new: center of gravity
This commit is contained in:
@@ -125,8 +125,7 @@ class Spectrum(np.ndarray):
|
||||
|
||||
@property
|
||||
def center_of_gravity(self):
|
||||
intensity = self.time_int
|
||||
return np.sum(intensity * self.t) / np.sum(intensity)
|
||||
return pulse.center_of_gravity(self.t, self.time_int)
|
||||
|
||||
def mask_wl(self, pos: float, width: float) -> Spectrum:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user