def genLSP(t, y, s=None): nyquist = 1/(2*(t[1]-t[0])) res = (t[1]-t[0])/t.shape[0] if not s: s = int(1/res) f = 2*np.pi*np.linspace(res/10, 0.5, s) pgram = lombscargle(t, y, f, normalize=True) return f, pgram