diff --git a/stingray/tests/test_lombscargle.py b/stingray/tests/test_lombscargle.py index e5a626b60..f8c820565 100644 --- a/stingray/tests/test_lombscargle.py +++ b/stingray/tests/test_lombscargle.py @@ -257,5 +257,8 @@ def test_make_empty_powerspectrum(self): assert ps.method is None def test_ps_real(self): - ps = LombScarglePowerspectrum(self.lc) - assert np.allclose(ps.power.imag, [0], atol=1e-4) + counts = np.random.poisson(10, 1000) + times = np.arange(0, 1000, 1) + lc = Lightcurve(times, counts, dt=1) + ps = LombScarglePowerspectrum(lc) + assert np.allclose(ps.power.imag, np.zeros_like(ps.power.imag), atol=1e-4)