Skip to content

Commit

Permalink
Merge 3842320 into 607704f
Browse files Browse the repository at this point in the history
  • Loading branch information
adrn authored Feb 28, 2019
2 parents 607704f + 3842320 commit 237a809
Show file tree
Hide file tree
Showing 8 changed files with 240 additions and 240 deletions.
5 changes: 3 additions & 2 deletions thejoker/sampler/fast_likelihood.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ cdef void design_matrix(double P, double phi0, double ecc, double omega,
P, 1., ecc, omega, phi0, t0,
anomaly_tol, anomaly_maxiter)

for j in range(n_times):
A_T[1, j] = 1.
if n_trend > 0: # only needed if we are fitting for a constant trend
for j in range(n_times):
A_T[1, j] = 1.

if n_trend > 1: # only needed if more than constant trend
for i in range(1, n_trend):
Expand Down
3 changes: 1 addition & 2 deletions thejoker/sampler/likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def design_matrix(nonlinear_p, data, joker_params):
joker_params.anomaly_tol,
joker_params.anomaly_maxiter)

# here we only support a constant N=1 velocity trend!
A1 = np.vander(t, N=1, increasing=True)
A1 = np.vander(t - t0, N=joker_params.poly_trend, increasing=True)
A = np.hstack((zdot[:, None], A1))

return A
Expand Down
Loading

0 comments on commit 237a809

Please sign in to comment.