yt.visualization.volume_rendering.create_spline module

Create a Catmull-Rom spline.

yt.visualization.volume_rendering.create_spline.create_spline(old_x, old_y, new_x, tension=0.5, sorted=False)[source]
Inputs:
old_x: array of floats
Original x-data to be fit with a Catmull-Rom spline
old_y: array of floats
Original y-data to be fit with a Catmull-Rom spline
new_x: array of floats
interpolate to these x-coordinates
tension: float, optional
controls the tension at the specified coordinates
sorted: boolean, optional
If True, then the old_x and old_y arrays are sorted, and then this routine does not try to sort the coordinates
Outputs:
result: array of floats
interpolated y-coordinates