This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |