Skip to content
Snippets Groups Projects
Commit 30edc7b9 authored by many's avatar many
Browse files

add test for integral_scales

parent 9b87beb8
No related branches found
No related tags found
1 merge request!10Merge recent changes in master to we_ahrens
import numpy as np
from ntrfc.timeseries.integral_scales import integralscales
def test_integralscales():
time = np.linspace(0,100,100000)
freq = 1
signal = np.sin(time*freq)+1
ts,ls=integralscales(signal,time)
assert np.isclose(ts,1,rtol=4e-3),"time scale not computed accurately"
assert np.isclose(ls,1,rtol=4e-3), "length scale not computed accurately"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment