5. numkit.integration
— Numerical integration of data
See also
- numkit.integration.simps_error(dy, x=None, dx=1, axis=-1, even='avg')[source]
Error on integral evaluated with Simpson’s rule from errors of points, dy.
Evaluate the integral with
scipy.integrate.simps()
. For a given vector dy of errors on the function values, the error on the integral is calculated via propagation of errors from the Newton-Cotes formula for the 3rd Lagrange interpolating polynomial. The results are exact for the cases of even spacing dx; for uneven spacing we currently average all spacings (exact solution is in the works…)- Arguments:
- dy
errors for the tabulated values of the integrand f
- x
values of abscissa at which f was tabulated (can be
None
and then dx should be provided)- dx
constant spacing of the abscissa
- axis
axis in dy along which the data lies
- even
see
scipy.integrate.simpson()
(‘avg’, ‘first’, ‘last’)