scientimate.movingwindow#

moving_statistics = scientimate.movingwindow(x, WindowSize=3, StatisticalMethod='mean', dispout='no')

Description#

Calculate statistics of moving window through 1-d x data

Inputs#

x

Input data

WindowSize=3
Window size (number of adjacent elements) that is used for moving window, should be equal or larger than 3
Window size should be an odd integer
StatisticalMethod=’mean’
Statistical value of moving window to be reported:
‘mean’: Moving mean
‘std’: Moving standard deviation
‘min’: Moving minimum
‘max’: Moving maximum
‘sum’: Moving sum
dispout=’no’

Define to display outputs or not (‘yes’: display, ‘no’: not display)

Outputs#

moving_statistics

Statistical value of moving window

Examples#

import scientimate as sm
import numpy as np

fs=128
t=np.linspace(0,9.5,10*fs)
x=np.sin(2*np.pi*0.3*t)+0.1*np.sin(2*np.pi*4*t)
moving_statistics=sm.movingwindow(x,37,'mean','yes')

References#