grapa.datatypes.curveTRPL.spline
- grapa.datatypes.curveTRPL.spline(x, y, transform='semilogx', numknots=30, minspacingnpts=4, maxspacingrange=0.1)
Fits the data with a spline and returns x_spline, y_spline. The generation of the knots can be adjusted with the optional parameters.
- Parameters:
x
y
transform – (str, optional): Transformation to apply to the data. Options are “semilogx”, “semilogy”, “loglog”, “linlin”, or “”. Defaults to “semilogx”
numknots – (int, optional): Target number of knots for spline interpolation. Defaults to 30.
minspacingnpts – (int, optional): Minimum spacing between knots, in number of data points. Defaults to 4.
maxspacingrange – (float, optional): Maximum spacing between knots, as a fraction of the x range. Defaults to 0.1.
- Returns:
x_new, y_new