ShotNoiseKernel#

class gadfly.ShotNoiseKernel(*args, name=None, **kwargs)[source]#

Bases: celerite2.terms.SHOTerm

A subclass of SHOTerm which approximates shot noise in Kepler observations, for example.

Parameters
  • args (dict) – Hyperparameters for the SHO kernel, \(S_0, \omega_0, Q\).

  • name (str) – Name to store for the target/instrument.

  • kwargs (dict) – Extra keyword arguments to pass to the SHOTerm constructor.

Attributes Summary

Q

terms

w0

Methods Summary

dot(x, diag, y)

Apply a matrix-vector or matrix-matrix product

from_kepler_light_curve(light_curve)

Estimate Kepler shot noise from the light curve.

get_celerite_matrices(x, diag, *[, c, a, U, V])

Get the matrices needed to solve the celerite system

get_coefficients()

Compute and return the coefficients for the celerite model

get_psd(omega)

Compute the value of the power spectral density for this process

get_test_parameters()

get_value(tau)

Compute the value of the kernel as a function of lag

kepler_mag_to_noise_amplitude(kepler_mag)

Kepler noise in 6 hour bins, from Jenkins et al. (2010) [1].

overdamped()

to_dense(x, diag)

Evaluate the dense covariance matrix for this term

underdamped()

Attributes Documentation

Q = 0.5#
terms#
w0 = 10000000.0#

Methods Documentation

dot(x, diag, y)#

Apply a matrix-vector or matrix-matrix product

Parameters
  • x (shape[N]) – The independent coordinates of the data.

  • diag (shape[N]) – The diagonal variance of the system.

  • y (shape[N] or shape[N, K]) – The target of vector or matrix for this operation.

classmethod from_kepler_light_curve(light_curve)[source]#

Estimate Kepler shot noise from the light curve.

The light curve must have a Kepler magnitude in the metadata. Assumes the noise relation in Jenkins et al. (2010) [1].

Parameters

light_curve (LightCurve) – Kepler light curve.

References

1

Jenkins et al. (2010)

get_celerite_matrices(x, diag, *, c=None, a=None, U=None, V=None)#

Get the matrices needed to solve the celerite system

Pre-allocated arrays can be provided to the Python interface to be re-used for multiple evaluations.

Note

In-place operations are not supported by the modeling extensions.

Parameters
  • x (shape[N]) – The independent coordinates of the data.

  • diag (shape[N]) – The diagonal variance of the system.

  • a (shape[N], optional) – The diagonal of the A matrix.

  • U (shape[N, J], optional) – The first low-rank matrix.

  • V (shape[N, J], optional) – The second low-rank matrix.

  • P (shape[N-1, J], optional) – The regularization matrix used for numerical stability.

Raises

ValueError – When the inputs are not valid.

get_coefficients()#

Compute and return the coefficients for the celerite model

This should return a 6 element tuple with the following entries:

(ar, cr, ac, bc, cc, dc)

Note

All of the returned objects must be arrays, even if they only have one element.

get_psd(omega)#

Compute the value of the power spectral density for this process

Parameters

omega (shape[...]) – The (angular) frequencies where the power should be evaluated.

static get_test_parameters()#
get_value(tau)#

Compute the value of the kernel as a function of lag

Parameters

tau (shape[...]) – The lags where the kernel should be evaluated.

static kepler_mag_to_noise_amplitude(kepler_mag)[source]#

Kepler noise in 6 hour bins, from Jenkins et al. (2010) [1].

Parameters

kepler_mag (float) – Kepler magnitude (\(K_p\)) of the star.

References

1(1,2)

Jenkins et al. (2010)

overdamped()#
to_dense(x, diag)#

Evaluate the dense covariance matrix for this term

Parameters
  • x (shape[N]) – The independent coordinates of the data.

  • diag (shape[N]) – The diagonal variance of the system.

underdamped()#