def design_matrix(nonlinear_p, data, joker_params):
"""
Parameters
----------
nonlinear_p : array_like
Array of non-linear parameter values. For the default case,
these are P (period, day), phi0 (phase at pericenter, rad),
ecc (eccentricity), omega (argument of perihelion, rad).
May also contain log(jitter^2) as the last index.
data : `~thejoker.data.RVData`
The observations.
joker_params : `~thejoker.sampler.params.JokerParams`
The specification of parameters to infer with The Joker.
Returns
-------
A : `numpy.ndarray`
The design matrix with shape ``(n_times, n_params)``.
"""
P, phi0, ecc, omega = nonlinear_p[:4] # we don't need the jitter here
# phi0 now is implicitly relative to data.t_offset, not mjd=0
t = data._t_bmjd
zdot = rv_from_elements(times=t, P=P, K=1., e=ecc,
omega=omega, phi0=phi0,
anomaly_tol=joker_params.anomaly_tol)
# TODO: right now, we only support a single, global velocity trend!
A1 = np.vander(t, N=joker_params._n_trend, increasing=True)
A = np.hstack((zdot[:,None], A1))
return A
评论列表
文章目录