quick fixes
This commit is contained in:
@@ -56,6 +56,8 @@ def test_rk43_soliton(plot=False):
|
||||
op.constant_quantity(np.zeros(n)),
|
||||
op.envelope_spm(0),
|
||||
no_op,
|
||||
np.fft.fft,
|
||||
np.fft.ifft,
|
||||
)
|
||||
|
||||
res = sc.integrate(spec0, end, lin, non_lin, targets=targets, atol=1e-10, rtol=1e-9)
|
||||
|
||||
@@ -17,14 +17,14 @@ def test_normalisation():
|
||||
def test_time_and_back():
|
||||
"""
|
||||
sampling a time series from a spectrum and transforming
|
||||
it back should yield the same spectrum
|
||||
it back yields the same spectrum
|
||||
"""
|
||||
rng = np.random.default_rng(57)
|
||||
t = np.linspace(-10, 10, 512)
|
||||
signal = np.exp(-((t / 2.568) ** 2)) + rng.random(len(t)) / 15
|
||||
|
||||
noise = sc.noise.NoiseMeasurement.from_time_series(signal, 1, "boxcar", detrend=False)
|
||||
_, new_signal = noise.time_series(len(t))
|
||||
_, new_signal = noise.time_series(len(noise.freq))
|
||||
new_noise = sc.noise.NoiseMeasurement.from_time_series(new_signal, 1, "boxcar", detrend=False)
|
||||
assert new_noise.psd == pytest.approx(noise.psd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user