pwtools.num.norm_int¶
- pwtools.num.norm_int(y, x, area=1.0, scale=True, func=<function simpson>)[source]¶
Normalize integral area of y(x) to area.
- Parameters:
x (numpy 1d arrays)
y (numpy 1d arrays)
area (float)
scale (bool, optional) – Scale x and y to the same order of magnitude before integration. This may be necessary to avoid numerical trouble if x and y have very different scales.
func (callable) – Function to do integration (like scipy.integrate.{simps,trapz,…} Called as
func(y,x=x)
. Default: simps
- Return type:
scaled y
Notes
The argument order y,x might be confusing. x,y would be more natural but we stick to the order used in the scipy.integrate routines.