sox.utils¶

Module Contents¶

Functions¶

derivative_interp1d(x, y[, deriv, window_length, ...])

Calculates the derivative of a function using Savitzky-Golay filter and interpolation.

quick_plot(time, data[, legends, x_labels, y_labels, ...])

Plots a list of data series

handle_vector(x)

Converts a scalar or 1D array or a 2D row vector to 2D column vector.

handle_matrix(x)

Converts a scalar or a row vector to diagonal matrix.

Attributes¶

sox.utils.colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f',...¶
sox.utils.derivative_interp1d(x, y, deriv=1, window_length=5, polyorder=2, delta_x=None)¶

Calculates the derivative of a function using Savitzky-Golay filter and interpolation.

sox.utils.quick_plot(time: list, data: list, legends=None, x_labels=None, y_labels=None, titles=None, n_cols=2)¶

Plots a list of data series

Parameters:
  • time (list) – List of time series.

  • data (list) – List of data series.

  • legends (list) – List of legend labels.

  • x_labels (str or list) – X-axis label.

  • y_labels (str or list) – Y-axis label.

  • titles (list) – List of subplot titles.

  • n_cols (int) – Number of columns in the figure.

sox.utils.handle_vector(x)¶

Converts a scalar or 1D array or a 2D row vector to 2D column vector.

sox.utils.handle_matrix(x)¶

Converts a scalar or a row vector to diagonal matrix.