cwitools.kinematics.first_moment_err

cwitools.kinematics.first_moment_err(x, y, y_var=[])

Calculate propagated error on the first moment.

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