def multi_init(n, Nexp, NMC, **kwargs): energy = kwargs.pop("energy", False) seed = kwargs.pop("seed", 0) llh = MultiPointSourceLLH(seed=seed, **kwargs) P = np.random.RandomState(seed) for i in range(n): llh.add_sample("S{0:02d}".format(i), init(P.poisson(Nexp // n), NMC, energy=energy, seed=seed + i + 1)) return llh
def multi_init(n, Nexp, NMC, **kwargs): energy = kwargs.pop("energy", False) llh = MultiPointSourceLLH(nsource=25, nsource_bounds=(-Nexp / 2., Nexp / 2.) if not energy else (0., Nexp / 2.), seed=np.random.randint(2**32), **kwargs) for i in xrange(n): llh.add_sample(str(i), init(Nexp, NMC, energy=energy)) return llh
def multi_init(n, Nexp, NMC, **kwargs): energy = kwargs.pop("energy", False) llh = MultiPointSourceLLH(hemispheres=dict(Full=[-np.inf, np.inf]), nsource=25, nsource_bounds=(-Nexp / 2., Nexp / 2.) if not energy else (0., Nexp / 2.), seed=np.random.randint(2**32), **kwargs) for i in xrange(n): llh.add_sample(str(i), init(Nexp, NMC, energy=energy)) return llh