cwitools.kinematics.second_moment_err

cwitools.kinematics.second_moment_err(x, y, m1=None, y_var=[])

Calculate propagated error on the second moment.

Args:
x (np.array): Input coordinate values (e.g. wavelength). y (np.array): Input weights (i.e. intensity) m1 (float): The value of the first moment y_var (np.array): Variance on y. Taken as var(y) if not provided.
Returns:
float: The error on the second moment