interpolate_profile#
- gammapy.utils.interpolation.interpolate_profile(x, y, interp_scale='sqrt', extrapolate=False)[source]#
Helper function to interpolate one-dimensional profiles.
- Parameters:
- x
ndarray
Array of x values.
- y
ndarray
Array of y values.
- interp_scale{“sqrt”, “lin”}
Interpolation scale applied to the profile. If the profile is of parabolic shape, a “sqrt” scaling is recommended. In other cases or for fine sampled profiles a “lin” can also be used. Default is “sqrt”.
- extrapolatebool
Extrapolate or not if the evaluation value is outside the range of x values. Default is False.
- x
- Returns:
- interp
interp1d
Interpolator.
- interp