Running the sampler (thejoker.sampler)

Introduction

API

thejoker.sampler Package

Functions

compute_likelihoods(n_prior_samples, …) Return the indices of ‘good’ samples by computing the log-likelihood for n_prior_samples prior samples and doing rejection sampling.
design_matrix(nonlinear_p, data, joker_params)
Parameters:
get_good_sample_indices(marg_ll[, seed]) Return the indices of ‘good’ samples from pre-computed values of the log-likelihood.
marginal_ln_likelihood(nonlinear_p, data, …) Internal function used to compute the likelihood marginalized over the linear parameters.
pack_prior_samples(samples, rv_unit) Pack a dictionary of prior samples as Astropy Quantity objects into a single 2D array.
sample_indices_to_full_samples(…[, …]) Generate the full set of parameter values (linear + non-linear) for the nonlinear parameter prior samples that pass the rejection sampling.
save_prior_samples(f, samples, rv_unit[, …]) Save a dictionary of Astropy Quantity prior samples to an HDF5 file in a format expected and used by thejoker.sampler.TheJoker.
tensor_vector_scalar(A, ivar, y) Internal function used to construct linear algebra objects used to compute the marginal log-likelihood.

Classes

JokerParams(P_min, P_max[, trend_cls, …])
Parameters:
JokerSamples([trend_cls])
TheJoker(params[, pool, random_state]) A custom Monte-Carlo sampler for two-body systems.