Log(Likelihood)
- orbitize.lnlike.chi2_lnlike(data, errors, corrs, model, jitter, seppa_indices)[source]
Compute Log of the chi2 Likelihood
- Parameters
data (np.array) – Nobsx2 array of data, where data[:,0] = sep/RA/RV for every epoch, and data[:,1] = corresponding pa/DEC/np.nan.
errors (np.array) – Nobsx2 array of errors for each data point. Same format as
data
.corrs (np.array) – Nobs array of Pearson correlation coeffs between the two quantities. If there is none, can be None.
model (np.array) – Nobsx2xM array of model predictions, where M is the number of orbits being compared against the data. If M is 1,
model
can be 2 dimensional.jitter (np.array) – Nobsx2xM array of jitter values to add to errors. Elements of array should be 0 for for all data other than stellar rvs.
seppa_indices (list) – list of epoch numbers whose observations are given in sep/PA. This list is located in System.seppa.
- Returns
Nobsx2xM array of chi-squared values.
- Return type
np.array
Note
Example: We have 8 epochs of data for a system. OFTI returns an array of 10,000 sets of orbital parameters. The
model
input for this function should be an array of dimension 8 x 2 x 10,000.
- orbitize.lnlike.chi2_norm_term(errors, corrs)[source]
Return only the normalization term of the Gaussian likelihood:
\[-log(\sqrt(2\pi*error^2))\]or
\[-0.5 * (log(det(C)) + N * log(2\pi))\]- Parameters
errors (np.array) – Nobsx2 array of errors for each data point. Same format as
data
.corrs (np.array) – Nobs array of Pearson correlation coeffs between the two quantities. If there is none, can be None.
- Returns
sum of the normalization terms
- Return type
float