orbitize.lnlike.chi2_lnlike(data, errors, model, jitter, seppa_indices)[source]

Compute Log of the chi2 Likelihood

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

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


Nobsx2xM array of chi-squared values.

Return type



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.