Visualization Tools

A few random plotting functions.

eztao.viz.mpl_viz.plot_dho_ll(t, y, yerr, best_params, gp, prob_func, inner_dim=10, outer_dim=4, ranges=[(None, None), (None, None), (None, None), (None, None)], nLevels=10, **kwargs)

Plot DHO/CARMA(2,1) log likelihood lanscape.

Parameters:
  • t (array(float)) – Time stamps of the input time series (the default unit is day).

  • y (array(float)) – y values of the input time series.

  • yerr (array(float)) – Measurement errors for y values.

  • best_params (array(float)) – Best-fit DHO parameters in [a1, a2, b0, b1].

  • gp (object) – celerite GP object with a proper DHO kernel.

  • prob_func (func) – Posterior/Likelihood function with args=(params, y, gp).

  • inner_dim (int, optional) – The number of points to eval likelihood along a1 and a2. Defaults to 10.

  • outer_dim (int, optional) – The number of points to eval likelihood along b0 and b1. Defaults to 4.

  • ranges (list, optional) – Parameters ranges (in natural log) within which to plot the surface. Defaults to [(None, None), (None, None), (None, None), (None, None)].

  • nLevels (int, optional) – The number of levels in the final contour plot. Defaults to 10.

Keyword Arguments:

true_params (array(float)) – The true DHO parameters of the input time series.

eztao.viz.mpl_viz.plot_drw_ll(t, y, yerr, best_params, gp, prob_func, amp_range=None, tau_range=None, nLevels=10, **kwargs)

Plot DRW log likelihood surface.

Parameters:
  • t (array(float)) – Time stamps of the input time series (the default unit is day).

  • y (array(float)) – y values of the input time series.

  • yerr (array(float)) – Measurement errors for y values.

  • best_params (array(float)) – Best-fit DRW parameters, [amp, tau].

  • gp (object) – celerite GP object with a proper DRW kernel.

  • prob_func (func) – Posterior/Likelihood function with args=(params, y, gp)

  • amp_range (tuple, optional) – The range of parameters to evaluate likelihood. Defaults to None.

  • tau_range (tuple, optional) – The range of parameters to evaluate likelihood. Defaults to None.

  • nLevels (int, optional) – The number of levels in the final contour plot. Defaults to 10.

Keyword Arguments:
  • grid_size (int) – The number of points to evaluate likelihood along a given axis.

  • true_params (array(float)) – The true DRW parameters of the input time series.

eztao.viz.mpl_viz.plot_pred_lc(t, y, yerr, params, p, t_pred, plot_input=True)

Plot GP predicted time series given best-fit parameters.

Parameters:
  • t (array(float)) – Time stamps of the input time series.

  • y (array(float)) – y values of the input time series.

  • yerr (array(float)) – Measurement errors for y values.

  • params (array(float)) – Best-fit CARMA parameters

  • p (int) – The AR order (p) of the best-fit model.

  • t_pred (array(float)) – Time stamps at which to generate predictions.

  • plot_input (bool) – Whether to plot the input time series. Defaults to True.