Log(Likelihood)

orbitize.lnlike.chi2_lnlike(data, errors, model, 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

  • 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.

  • 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.