NonuniformFiniteDifferencer#

class NonuniformFiniteDifferencer(time_domain)[source]#

Time derivative estimation with finite differences for state snapshots that are not spaced uniformly in time.

This class essentially wraps numpy.gradient(), which uses second-order finite differences.

Parameters:
time_domain(k,) ndarray

Time domain corresponding to the snapshot data. This class is for time domains that are not uniformly spaced, see UniformFiniteDifferencer for uniformly spaced time domains.

Properties:
time_domain#

Time domain of the snapshot data, a (k,) ndarray.

Methods:

estimate

Estimate the first time derivatives of the states using second-order finite differences.

verify

Verify that estimate() is consistent in the sense that the all outputs have the same number of columns and test the accuracy of the results on a few test problems.

verify_shapes

Verify that estimate() is consistent in the sense that the all outputs have the same number of columns.