core#
- nuance.core.separate_models(time, flux, X=None, gp=None, model=None)#
Returns a function to compute the mean, signal, and noise model of a light curve given the epoch, duration, and period of the signal model.
- Parameters:
time (np.ndarray) – array of times
flux (np.ndarray) – array of fluxes
X (np.ndarray, optional) – linear model design matrix, by default a constant model
gp (tinygp.GaussianProcess, optional) – Gaussian process object, by default a very long scale exponential kernel
model (callable, optional) – model function with signature
model(time, epoch, duration, period=None) -> Array
, by default an empiricaltransit()
model
- Returns:
function that computes the mean, signal, and noise model of a light curve given the epoch, duration, and period of the signal model. Signature is:
function(epoch, duration, period=None) -> (mean, signal, noise)
- Return type:
callable
- nuance.core.snr(time, flux, X=None, gp=None, model=None)#
Returns a function to compute the signal-to-noise ratio of a signal model given its epoch, duration, and period.
- Parameters:
time (np.ndarray) – array of times
flux (np.ndarray) – array of fluxes
X (np.ndarray, optional) – linear model design matrix, by default a constant model
gp (tinygp.GaussianProcess, optional) – Gaussian process object, by default a very long scale exponential kernel
model (callable, optional) – model function with signature
model(time, epoch, duration, period=None) -> Array
, by default an empiricaltransit()
model
- Returns:
function that computes the signal-to-noise ratio of a signal model given its epoch, duration, and period. Signature is:
function(epoch, duration, period=None) -> float
- Return type:
callable
- nuance.core.solve(time, flux, gp=None, X=None, model=None)#
Returns a function to compute the log likelihood of data assuming it is drawn from a Gaussian Process with a mean linear model.
X is a design matrix for the linear model whose last column is the searched signal
model
.- Parameters:
time (np.ndarray) – array of times
flux (np.ndarray) – array of fluxes
X (np.ndarray, optional) – linear model design matrix, by default a constant model
gp (tinygp.GaussianProcess, optional) – Gaussian process object, by default a very long scale exponential kernel
model (callable, optional) – model function with signature
model(time, epoch, duration, period=None) -> Array
, by default an empiricaltransit()
model
- Returns:
function that computes the log likelihood of data assuming it is drawn from a Gaussian Process with a mean linear model. Signature is:
function(epoch, duration, period=None) -> (depth, depth_variance, log_likelihood)
- Return type:
callable
- nuance.core.transit(time, epoch, duration, period=None, c=12)#
Empirical transit model from Protopapas et al. 2005.
- Parameters:
time (np.ndarray) – array of times
epoch (float) – signal epoch
duration (float) – signal duration
period (float, optional) – signal period, by default None for a non-periodic signal
c (int, optional) – controls the ‘roundness’ of transit shape, by default 12
- Returns:
array of transit model values
- Return type:
np.ndarray
- nuance.core.transit_box(time, epoch, duration, period=1000000000000000.0)#
Box-shaped transit model.
- Parameters:
time (np.ndarray) – array of times
epoch (float) – signal epoch
duration (float) – signal duration
period (float, optional) – signal period, by default None for a non-periodic signal
- Returns:
array of transit model values
- Return type:
np.ndarray
- nuance.core.transit_exocomet(time, epoch, duration, period=None, n=3)#
Empirical exocomet transit model.
- Parameters:
time (np.ndarray) – array of times
epoch (float) – signal epoch
duration (float) – signal duration
period (float, optional) – dummy parameter for compatibility with other models, by default None
n (int, optional) – TBD, by default 3
- Returns:
array of transit model values
- Return type:
np.ndarray