Skip to content

Instantly share code, notes, and snippets.

View kilianbreathnach's full-sized avatar

Kilian kilianbreathnach

View GitHub Profile
import abcpmc
from abcpmc import mpi_util
import numpy as np
from multiprocessing import cpu_count
from halotools.empirical_models import Zheng07, model_defaults
from halotools.empirical_models.mock_helpers import (three_dim_pos_bundle,
infer_mask_from_kwargs)
from halotools.mock_observables.clustering import tpcf
from halotools.sim_manager import supported_sims
import numpy as np
def p_max(k, f):
rnd = int(round(1. / f))
sum = 0
for n in range(1, rnd + 1):
sum += (-1) ** (n - 1) * (float(rnd) / n) * (1 - n * f) ** k