gp.py - Gaussian Processes

Routines for optimizing the GP hyperparameters for a given light curve.

everest.gp.GP(kernel, kernel_params, white=False)
everest.gp.GetCovariance(kernel, kernel_params, time, errors)

Returns the covariance matrix for a given light curve segment.

Parameters:
  • kernel_params (array_like) – A list of kernel parameters (white noise amplitude, red noise amplitude, and red noise timescale)
  • time (array_like) – The time array (N)
  • errors (array_like) – The data error array (N)
Returns:

The covariance matrix K (N,*N*)

everest.gp.GetKernelParams(time, flux, errors, kernel='Basic', mask=[], giter=3, gmaxf=200, guess=None)

Optimizes the GP by training it on the current de-trended light curve. Returns the white noise amplitude, red noise amplitude, and red noise timescale.

Parameters:
  • time (array_like) – The time array
  • flux (array_like) – The flux array
  • errors (array_like) – The flux errors array
  • mask (array_like) – The indices to be masked when training the GP. Default []
  • giter (int) – The number of iterations. Default 3
  • gmaxf (int) – The maximum number of function evaluations. Default 200
  • guess (tuple) – The guess to initialize the minimization with. Default None
everest.gp.NegLnLike(x, time, flux, errors, kernel)

Returns the negative log-likelihood function and its gradient.