single_fit

sofia_redux.toolkit.splines.spline_utils.single_fit(coordinate, knots, coefficients, degrees, panel_mapping, panel_steps, knot_steps, nk1, spline_mapping, k1=None, n_spline=None, work_spline=None, lower_bounds=None, upper_bounds=None)[source]

Return a fitted value at the given coordinate.

Parameters:
coordinatenumpy.ndarray (float)

The coordinate at which to return a fit of shape (n_dimensions,).

knotsnumpy.ndarray (float)

The knots in each dimension of shape (n_dimensions, max_knot_estimate). Must be monotonically increasing for each dimension.

coefficientsnumpy.ndarray (float)

The coefficients of shape (n_coefficients,).

degreesnumpy.ndarray (int)

The degrees of the spline in each dimension (n_dimensions,).

panel_mappingnumpy.ndarray (int)

An array containing the panel mapping (flat to n-D) indices. This is created by passing the panel shape (n_knots - (2 * degrees) - 1) into flat_index_mapping(). Should be an array of shape (n_dimensions, n_panels).

panel_stepsnumpy.ndarray (int)

The flat index mapping steps in panel-space of shape (n_dimensions,). These are returned by passing the shape Spline.panel_shape into flat_index_mapping().

knot_stepsnumpy.ndarray (int)

The flat index mapping steps in knot-space of shape (n_dimensions,). These are returned by passing the shape (n_knots - degrees - 1) into flat_index_mapping().

nk1numpy.ndarray (int)

An array of shape (n_dimensions,) containing the values n_knots - k1 where n_knots are the number of knots in each dimension, and k1 are the spline degrees + 1 in each dimension.

spline_mappingnumpy.ndarray (int)

An array containing the spline mapping (flat to n-D) indices. This is created by passing the spline shape (degrees + 1) into flat_index_mapping(). Should be an array of shape (n_dimensions, n_spline_coefficients).

k1numpy.ndarray (int)

An array of shape (n_dimensions,) where k1[dimension] = degree[dimension] + 1.

n_splineint

The total number of spline coefficients that will be used to perform the fit.

work_splinenumpy.ndarray (float)

An optional work array of shape (n_dimensions, max(k1)) that can be supplied in order to skip the overhead involved with array creation.

lower_boundsnumpy.ndarray (float)

Specifies the lower range of valid coordinates for each dimension and is of shape (n_dimensions,).

upper_boundsnumpy.ndarray (float)

Specifies the upper range of valid coordinates for each dimension and is of shape (n_dimensions,).

Returns:
fitted_valuefloat