noise fix

This commit is contained in:
Benoît Sierro
2023-11-08 09:53:16 +01:00
parent 3511139585
commit 891e12e7fd
2 changed files with 3 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ def test_time_and_back():
def test_nyquist():
"""
generating a time series and tranforming it back yields the same spectrum.
Using segements, the nyquist frequency at least is the same
Using segements, the nyquist frequency is exactly spread out over the frequency bin width
"""
signal = np.cos(np.arange(1024) * np.pi)
@@ -66,7 +66,7 @@ def test_nyquist():
n3 = sc.noise.NoiseMeasurement.from_time_series(signal, 1, None, 3)
n15 = sc.noise.NoiseMeasurement.from_time_series(signal, 1, None, 15)
assert n1.psd[-1] == n3.psd[-1] == n15.psd[-1]
assert n1.psd[-1] == n3.psd[-1] * 2 == n15.psd[-1] * 8
def test_sampling():