HECATE.nested_sampling
Classes
Class to compare between linear models with constant slope (m=0) or unconstrained slope (m!=0) regarding CCF parameters in function of orbital phases or mu. |
- class run_nestedsampler[source]
Bases:
objectClass to compare between linear models with constant slope (m=0) or unconstrained slope (m!=0) regarding CCF parameters in function of orbital phases or mu. Includes jittering via ln f parameter, that has a predefined prior of [-7,1] in log-scale. Returns a tuple with the results.
- Parameters:
x (numpy array) – orbital phases or mu arrays.
y (numpy array) – CCF parameter (central RV, line-width measure or line-center intensity).
yerr (numpy array) – uncertainty of CCF parameter.
m_span (int) – half of the range of prior on the slope.
b_span (int) – half of the range of prior on the intercept.
verbose (bool) – print output.
plot (bool) – whether to plot the trace and corner plots from the dynesty packages.
save – path to save plots.
- compare_models(x, y, yerr, m_span, b_span, verbose)[source]
compares between an unconstrained and a constant model. If the unconstrained model is preferred, it compares a model with a positive slope with one with a negative slope.
- __init__(x: numpy.array, y: numpy.array, yerr: numpy.array, m_span: int = 100, b_span: int = 100, verbose: bool = True, plot: bool = True, save=None)[source]
- compare_models(x: numpy.array, y: numpy.array, yerr: numpy.array, m_span: int = 100, b_span: int = 100, verbose: bool = True)[source]
First compares between an unconstrained and a constant model. If the unconstrained model is preferred, it compares a model with a positive slope with one with a negative slope.
- Parameters:
x (numpy array) – orbital phases or mu arrays.
y (numpy array) – CCF parameter (central RV, line-width measure or line-center intensity).
yerr (numpy array) – uncertainty of CCF parameter.
m_span (int) – half of the range of prior on the slope.
b_span (int) – half of the range of prior on the intercept.
verbose (bool) – print output.
- Returns:
resA – dynesty results for initial linear model (m!=0).
resB – dynesty results for constant model (m=0).
resPos – dynesty results for linear model with positive slope (m>0).
resNeg – dynesty results for linear model with negative slope (m<0).
model (str) – type of model obtained.
logK_linear_vs_const (float) – evidence difference between constant and unconstrained models.
logK_sign (float) – evidence difference between positive and negative models.
logZ (float) – evidence of final model.