def psdf_1(**kwargs): """input powerlaw psd; no gaps, no alias, noleak, gauss noise, fit with pl, no extended frequency, NFQ=8""" # fqlag parameters # n = 2**8 dt = 1.0 fql = np.array([1. / (dt * n), 0.5 / dt]) lc, extra = simulate_light_curves(n=n, dt=dt, nsim=100) model = ['pl', [-5, -2]] inP = extra['input_psd'][1] inP[0] = np.log(inP[0]) fit_psdf(fql, model, lc, extra, '1', input_pars=inP)
def psdf_5(**kwargs): """input bpl psd; no gaps, no alias, noleak, gauss noise, fit with bpl, EXTEND frequency""" # fqlag parameters # n = 2**8 dt = 1.0 fql = np.array([.5 / (dt * n), 1. / dt]) lc, extra = simulate_light_curves( n=n, dt=dt, nsim=100, input_psd=['bending_powerlaw', [1e-4, -2, 3e-3]]) model = ['bpl', [-5, -2, -5]] inP = extra['input_psd'][1] inP = [np.log(inP[0]), inP[1], np.log(inP[2])] fit_psdf(fql, model, lc, extra, '5', input_pars=inP)