scientimate.smoothsignal

xSmoothed = scientimate.smoothsignal(x, WindowSize=33, method='moveavg', dispout='no')

Description

Smooth input data using a window function

Inputs

x
Input data
WindowSize=33
Window size (number of adjacent elements)that is used for smoothing, should be equal or larger than 3
method=’moveavg’
Smoothing method
‘moveavg’: moving average
‘lowpass’: Low-Pass filter
‘savgol’: Savitzky-Golay filter
‘butter’: Butterworth filter
dispout=’no’
Define to display outputs or not (‘yes’: display, ‘no’: not display)

Outputs

xSmoothed
Smoothed data

Examples

import scientimate as sm
import numpy as np
from numpy import random

rng = np.random.default_rng()
x=np.sin(np.linspace(0,6*np.pi,200))+rng.random(200)
xSmoothed=sm.smoothsignal(x,33,'moveavg','yes')

References