ywx649999311 / EzTao

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

Plotting function for higher order CARMA #89

Open karandogra987 opened 2 months ago

karandogra987 commented 2 months ago

plot predicted time series

t_pred = np.linspace(0, 365*6, 2000)

get best-fit in CARMA space

best_fit_kernel = DRW_term(*np.log(best_fit)) best_fit_arma = best_fit_kernel.get_carma_parameter()

plot_pred_lc(t, y, yerr, best_fit_arma, 1, t_pred)

Above is the code used to plot best fit for a DRW model as shown in the tutorial. How to use this module to plot higher order CARMA as CARMA_term has no module named get.carma.parameters() unlike DRW_term?

ywx649999311 commented 2 months ago

Hi @karandogra987,

Thanks for the question. You can get the CARMA parameters of your kernel using a_kernel.get_parameter_vector(), which then is used to substitute best_fit_carma argument to the plot_pred_lc function. Nonetheless, I implemented a new function get_carma_parameter() for the CARMA_term. Either method should work for you. To get the new function to work, you need to reinstall EzTao from the github using:

pip install git+https://github.com/ywx649999311/EzTao.git