@@ -19,7 +19,7 @@ def _slide_function(func, x, dt, args, window_size, step_size, kernel_name):
1919 """Slide a smoothing derivative function across a timeseries with specified window size.
2020
2121 :param callable func: name of the function to slide
22- :param np.array[float] x: time series to differentiate
22+ :param np.array[float] x: data to differentiate
2323 :param float dt: time step
2424 :param dict args: see func for requirements
2525 :param int window_size: size of the sliding window
@@ -97,8 +97,8 @@ def _slide_function(func, x, dt, args, window_size, step_size, kernel_name):
9797def savgoldiff (x , dt , params = None , options = None , polynomial_order = None , window_size = None , smoothing_win = None ):
9898 """Use the Savitzky-Golay to smooth the data and calculate the first derivative. It wses scipy.signal.savgol_filter. The Savitzky-Golay is very similar to the sliding polynomial fit, but slightly noisier, and much faster
9999
100- :param np.array[float] x: array of time series to differentiate
101- :param float dt: time step size
100+ :param np.array[float] x: data to differentiate
101+ :param float dt: step size
102102 :param list params: (**deprecated**, prefer :code:`polynomial_order`, :code:`window_size`, and :code:`smoothing_win`)
103103 :param dict options: (**deprecated**)
104104 :param int polynomial_order: order of the polynomial
@@ -146,7 +146,7 @@ def savgoldiff(x, dt, params=None, options=None, polynomial_order=None, window_s
146146def _polydiff (x , dt , polynomial_order , weights = None ):
147147 """Fit polynomials to the timeseries, and differentiate the polynomials.
148148
149- :param np.array[float] x: time series to differentiate
149+ :param np.array[float] x: data to differentiate
150150 :param float dt: time step
151151 :param int polynomial_order: order of the polynomial
152152 :param np.array[float] weights: weights applied to each point in calculating the polynomial fit.
@@ -172,10 +172,10 @@ def _polydiff(x, dt, polynomial_order, weights=None):
172172
173173def polydiff (x , dt , params = None , options = None , polynomial_order = None , window_size = None ,
174174 sliding = True , step_size = 1 , kernel = 'friedrichs' ):
175- """Fit polynomials to the time series , and differentiate the polynomials.
175+ """Fit polynomials to the data , and differentiate the polynomials.
176176
177- :param np.array[float] x: array of time series to differentiate
178- :param float dt: time step size
177+ :param np.array[float] x: data to differentiate
178+ :param float dt: step size
179179 :param list[int] params: (**deprecated**, prefer :code:`polynomial_order` and :code:`window_size`)
180180 :param dict options: (**deprecated**, prefer :code:`sliding`, :code:`step_size`, and :code:`kernel`)
181181 a dictionary consisting of {'sliding': (bool), 'step_size': (int), 'kernel_name': (str)}
@@ -219,7 +219,7 @@ def polydiff(x, dt, params=None, options=None, polynomial_order=None, window_siz
219219# """
220220# Fit the timeseries with chebyshev polynomials, and differentiate this model.
221221
222- # :param x: (np.array of floats, 1xN) time series to differentiate
222+ # :param x: (np.array of floats, 1xN) data to differentiate
223223# :param dt: (float) time step
224224# :param params: (list) [N] : (int) order of the polynomial
225225# :param options:
@@ -253,10 +253,10 @@ def polydiff(x, dt, params=None, options=None, polynomial_order=None, window_siz
253253# """
254254# Slide a smoothing derivative function across a times eries with specified window size.
255255
256- # :param x: array of time series to differentiate
256+ # :param x: data to differentiate
257257# :type x: np.array (float)
258258
259- # :param dt: time step size
259+ # :param dt: step size
260260# :type dt: float
261261
262262# :param params: a list of 2 elements:
@@ -356,7 +356,7 @@ def __integrate_dxdt_hat_matrix__(dxdt_hat, dt):
356356def _lineardiff (x , dt , N , gamma , solver = None , weights = None ):
357357 """Estimate the parameters for a system xdot = Ax, and use that to calculate the derivative
358358
359- :param np.array[float] x: time series to differentiate
359+ :param np.array[float] x: data to differentiate
360360 :param float dt: time step
361361 :param int > 1 N: order (e.g. 2: velocity; 3: acceleration)
362362 :param float gamma: regularization term
@@ -404,10 +404,10 @@ def _lineardiff(x, dt, N, gamma, solver=None, weights=None):
404404
405405def lineardiff (x , dt , params = None , options = None , order = None , gamma = None , window_size = None ,
406406 sliding = True , step_size = 10 , kernel = 'friedrichs' , solver = None ):
407- """Slide a smoothing derivative function across a time series with specified window size.
407+ """Slide a smoothing derivative function across data, with specified window size.
408408
409- :param np.array[float] x: array of time series to differentiate
410- :param float dt: time step size
409+ :param np.array[float] x: data to differentiate
410+ :param float dt: step size
411411 :param list[int, float, int] params: (**deprecated**, prefer :code:`order`, :code:`gamma`, and :code:`window_size`)
412412 :param dict options: (**deprecated**, prefer :code:`sliding`, :code:`step_size`, :code:`kernel`, and :code:`solver`
413413 a dictionary consisting of {'sliding': (bool), 'step_size': (int), 'kernel_name': (str), 'solver': (str)}
@@ -466,14 +466,14 @@ def lineardiff(x, dt, params=None, options=None, order=None, gamma=None, window_
466466def spectraldiff (x , dt , params = None , options = None , high_freq_cutoff = None , even_extension = True , pad_to_zero_dxdt = True ):
467467 """Take a derivative in the fourier domain, with high frequency attentuation.
468468
469- :param np.array[float] x: array of time series to differentiate
470- :param float dt: time step size
469+ :param np.array[float] x: data to differentiate
470+ :param float dt: step size
471471 :param list[float] or float params: (**deprecated**, prefer :code:`high_freq_cutoff`)
472472 :param dict options: (**deprecated**, prefer :code:`even_extension`
473473 and :code:`pad_to_zero_dxdt`) a dictionary consisting of {'even_extension': (bool), 'pad_to_zero_dxdt': (bool)}
474474 :param float high_freq_cutoff: The high frequency cutoff. Frequencies below this threshold will be kept, and above will be zeroed.
475- :param bool even_extension: if True, extend the time series with an even extension so signal starts and ends at the same value.
476- :param bool pad_to_zero_dxdt: if True, extend the time series with extensions that smoothly force the derivative to zero. This
475+ :param bool even_extension: if True, extend the data with an even extension so signal starts and ends at the same value.
476+ :param bool pad_to_zero_dxdt: if True, extend the data with extensions that smoothly force the derivative to zero. This
477477 allows the spectral derivative to fit data which does not start and end with derivatives equal to zero.
478478
479479 :return: tuple[np.array, np.array] of\n
0 commit comments