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