splinebox.basis_functions#

This module provides a collection of basis function classes, each designed for constructing a specific type of spline. The modular design enables users to easily explore different spline types, by swapping the basis function object when creating a spline.

All basis function classes inherit from the base class splinebox.basis_functions.BasisFunction. The base class defines methods such as __call__, filter_periodic, and filter_symmetric. The latter two methods should be overridden as appropriate in any subclass to ensure they align with the behavior of the specific basis function. To enable the __call__ method, subclasses must implement _func(t), _derivative_1(t), and _derivative_2(t), which correspond to the function itself and its first and second derivatives, respectively.

For more information on implementing a new basis function, see splinebox.basis_functions.BasisFunction.

Classes

B1()

Basis function for a linear (\(1^{\text{st}}\) order) polynomial basis spline.

B2()

Basis function for a quadratic (\(2^{\text{nd}}\) order) polynomial basis spline.

B3()

Basis function for a cubic (\(3^{\text{rd}}\) order) polynomial basis spline.

BasisFunction(multigenerator, support)

Base class for all basis functions.

CatmullRom()

Basis function for a Catmull Rom spline.

CubicHermite()

Basis function for a cubic Hermite spline.

Exponential(M)

Basis function for an exponential spline.

ExponentialHermite(M)

Basis function for an exponential Hermite spline.

Functions

basis_function_from_name(name, **kwargs)

Returns a basis function object based on the name of the basis function.

inventory()

This function returns a dictionary with all implemented basis function.