Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add moving window RMS etc #89

Open
kwinkunks opened this issue Jan 3, 2022 · 1 comment
Open

Add moving window RMS etc #89

kwinkunks opened this issue Jan 3, 2022 · 1 comment

Comments

@kwinkunks
Copy link
Member

Various attributes in a 3D window. Using ndimage I guess.

@EvanBianco
Copy link
Collaborator

EvanBianco commented Jan 12, 2022

Would this work for the moving window RMS attribute?

This would only be relevant for a 1-D signal, i.e. on a trace by trace basis. Do we need 2-D and 3-D equivalents?

import numpy as np
def window_rms(d, window_size):
    d2 = np.power(d, 2)
    window = np.ones(window_size) / float(window_size)
    return np.sqrt(np.convolve(d2, window, 'valid'))

Found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants