def ln_likelihood_hernq(p, dt, nsteps, prog_w, star_w, betas, sat_mass): alpha, log_m, c = p params = dict() params['m'] = np.exp(log_m) params['c'] = c pot = gp.HernquistPotential(units=galactic, **params) nstars = star_w.shape[0] ll = np.zeros((nsteps,nstars), dtype=float) - 9999. rewinder_likelihood(ll, dt, nsteps, pot.c_instance, pot.G, prog_w[None].copy(), star_w, sat_mass, 0., alpha, betas, 0., True) return integrate_tub(ll, dt).sum()
def ln_likelihood_nfw(p, dt, nsteps, prog_w, star_w, betas, sat_mass): alpha, v_c, log_r_s = p params = true_params.copy() params['v_c'] = v_c params['r_s'] = np.exp(log_r_s) pot = gp.LeeSutoTriaxialNFWPotential(units=galactic, **params) nstars = star_w.shape[0] ll = np.zeros((nsteps,nstars), dtype=float) - 9999. rewinder_likelihood(ll, dt, nsteps, pot.c_instance, pot.G, prog_w[None].copy(), star_w, sat_mass, 0., alpha, betas, 0., True) return integrate_tub(ll, dt).sum()
def ln_likelihood_nfw(p, dt, nsteps, prog_w, star_w, betas, sat_mass): alpha, v_c, log_r_s = p params = true_params.copy() params['v_c'] = v_c params['r_s'] = np.exp(log_r_s) pot = gp.LeeSutoTriaxialNFWPotential(units=galactic, **params) nstars = star_w.shape[0] ll = np.zeros((nsteps, nstars), dtype=float) - 9999. rewinder_likelihood(ll, dt, nsteps, pot.c_instance, pot.G, prog_w[None].copy(), star_w, sat_mass, 0., alpha, betas, 0., True) return integrate_tub(ll, dt).sum()
def ln_likelihood_hernq(p, dt, nsteps, prog_w, star_w, betas, sat_mass): alpha, log_m, c = p params = dict() params['m'] = np.exp(log_m) params['c'] = c pot = gp.HernquistPotential(units=galactic, **params) nstars = star_w.shape[0] ll = np.zeros((nsteps, nstars), dtype=float) - 9999. rewinder_likelihood(ll, dt, nsteps, pot.c_instance, pot.G, prog_w[None].copy(), star_w, sat_mass, 0., alpha, betas, 0., True) return integrate_tub(ll, dt).sum()
def ln_likelihood_bfe(p, dt, nsteps, prog_w, star_w, betas, sat_mass): alpha = p[0] log_m = p[1] c = p[2] params = dict() params['m'] = np.exp(log_m) params['c'] = c params['coeffs'] = np.array(p[3:]) pot = gp.SphericalBFEPotential(units=galactic, **params) nstars = star_w.shape[0] ll = np.zeros((nsteps,nstars), dtype=float) - 9999. rewinder_likelihood(ll, dt, nsteps, pot.c_instance, pot.G, prog_w[None].copy(), star_w, sat_mass, 0., alpha, betas, 0., True) return integrate_tub(ll, dt).sum()
def ln_likelihood_bfe(p, dt, nsteps, prog_w, star_w, betas, sat_mass): alpha = p[0] log_m = p[1] c = p[2] params = dict() params['m'] = np.exp(log_m) params['c'] = c params['coeffs'] = np.array(p[3:]) pot = gp.SphericalBFEPotential(units=galactic, **params) nstars = star_w.shape[0] ll = np.zeros((nsteps, nstars), dtype=float) - 9999. rewinder_likelihood(ll, dt, nsteps, pot.c_instance, pot.G, prog_w[None].copy(), star_w, sat_mass, 0., alpha, betas, 0., True) return integrate_tub(ll, dt).sum()