interpolate_profile#

gammapy.utils.interpolation.interpolate_profile(x, y, interp_scale='sqrt', extrapolate=False)[source]#

Helper function to interpolate one-dimensional profiles.

Parameters:
xndarray

Array of x values.

yndarray

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.

Returns:
interpinterp1d

Interpolator.