SolarOscillatorKernel#
- class gadfly.SolarOscillatorKernel(texp=None, delta=None, bandpass=None, name=None)[source]#
Bases:
StellarOscillatorKernelLike a
StellarOscillatorKernel, but initialized with the default solar SOHO VIRGO/PMO6 kernel hyperparameters. The hyperparameters are initialized with theHyperparametersclass methodfor_star()assuming exactly solar mass, radius, temperature, and luminosity.The primary difference with
StellarOscillatorKernelis that the user need not provideHyperparameters().SolarOscillatorKernelinherits fromTermConvolutionandStellarOscillatorKernel.- Parameters:
texp (Quantity) – Exposure time, convertible to inverse microhertz.
Attributes Summary
Methods Summary
dot(x, diag, y)Apply a matrix-vector or matrix-matrix product
get_celerite_matrices(x, diag, *[, c, a, U, V])Get the matrices needed to solve the celerite system
Compute and return the coefficients for the celerite model
get_psd(omega)Compute the value of the power spectral density for this process
get_value(tau0)Compute the value of the kernel as a function of lag
plot(**kwargs)Plot a power spectrum.
to_dense(x, diag)Evaluate the dense covariance matrix for this term
Attributes Documentation
- terms#
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.
- 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.
- get_value(tau0)#
Compute the value of the kernel as a function of lag
- Parameters:
tau (shape[...]) – The lags where the kernel should be evaluated.
- plot(**kwargs)#
Plot a power spectrum.
Requires
matplotlib.- Parameters:
ax (
Axes)kernel (None or subclass of
Term)obs (PowerSpectrum)
freq (Quantity)
figsize (list of floats)
n_samples (int)
p_mode_inset (bool)
legend (bool)
scaling_low_freq (str)
scaling_p_mode (str)
inset_xlim (list of floats)
inset_ylim (list of floats)
title (str)
label_inset (str)
label_obs (str)
label_kernel (str)
kernel_kwargs (dict)
obs_kwargs (dict)
inset_kwargs (dict)
create_new_figure (bool)
inset_bounds (list)
- Returns:
- 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.