chaosmagpy.data_utils.augment_breaks_shc

chaosmagpy.data_utils.augment_breaks_shc(breaks, order)[source]

Augment a vector of break points and return a vector of timepoints suitable for saving a B-spline representation of order k as an SHC-file.

Parameters:
breaksndarray, shape (n,)

1-D array, containing n break points (without endpoint repeats).

orderint, positive

Order k of B-spline (4 = cubic).

Returns:
timesndarray, shape ((n-1)*max(k-1, 1) + 1,)

1-D array with k-2 equally-spaced timepoints inserted between the points in breaks. The last break point is omitted if order==1.

Examples

>>> augment_breaks_shc([0.0, 10.0], 4)  # cubic B-spline on [0., 10.]
array([ 0., 3.33333333, 6.66666667, 10.])