electricpy.sinfilt

electricpy.sinfilt(arr, Srate, domain=False)[source]

Sine Filter Function.

Sine Filter function for filtering a dataset representing a sinusoidal function with or without harmonics to evaluate the fundamental value.

Parameters:
arr : numpy.ndarray

The input data array.

Srate : int

Sampling rate for dataset, specified in number of values per fundamental cycle.

domain : bool, optional

Control argument to force return of x-axis array for the filtered data.

Returns:

  • sinf (numpy.ndarray) – Sine-filtered data

  • xarray (numpy.ndarray) – X-axis array for the filtered data.