ywx649999311 / EzTao

A Python Toolkit for AGN Time Series Analysis using CARMA models
MIT License
18 stars 9 forks source link

Fixed Double light curve #44

Closed ywx649999311 closed 3 years ago

ywx649999311 commented 3 years ago

https://github.com/ywx649999311/EzTao/blob/4ae71174f9b0e6c079cf64fc4ef229e3a2f43114/src/eztao/ts/carma_sim.py#L73

https://github.com/ywx649999311/EzTao/blob/4ae71174f9b0e6c079cf64fc4ef229e3a2f43114/src/eztao/ts/carma_sim.py#L78

ywx649999311 commented 3 years ago

To reproduce based on commit 4ae71174f9b0e6c079cf64fc4ef229e3a2f43114 :

def simulate_DRW(amp, tau):
    DRW_kernel = DRW_term(np.log(amp), np.log(tau))
    t, y, yerr = gpSimFull(DRW_kernel, SNR, duration, npts, log_flux=True)

#     ## Yu: temporary fix for double light curve
#     y = y - yerr

    plt.figure(figsize = (15,3))
    plt.scatter(t,y, s = 1, label = 'amp = {}, tau = {}'.format(amp, tau))
    plt.legend(loc = 'upper right', fontsize = 20)
    plt.xlabel('MJD',fontsize = 20)
    plt.ylabel('Flux',fontsize = 20)
    plt.show()

simulate_DRW(amp = 0.15, tau = 3000)
simulate_DRW(amp = 2.0, tau = 3000)
simulate_DRW(amp = 5.0, tau = 3000)