Ejemplo n.º 1
0
prioravg = np.array([])
priorwth = np.array([])
priorvals = np.array([prioravg,priorwth])

parlist_cat = np.append(fixlist, parlist) 
parvals_cat = np.append(fixvals,parvals)
#print parlist_cat
#print parvals_cat
    
start = time.time()
filedir = '/Users/nab/Desktop/Projects/ACTPol_Cluster_Like/'
filename = args.chain_name #,'mockCat_v1'

if args.testMock:
    print("Testing Mockcat Numbers")
    MC = lk.MockCatalog(iniFile,pardict,nemoOutputDir,noise_file,parvals,parlist,mass_grid_log=[mmin,15.7,0.01],z_grid=[0.1,2.01,0.1])
    saveNum = []
    for i in range(args.testMock):
        Nums = MC.test_Mockcat_Nums(mmin)
        saveNum = np.append(saveNum,Nums)
        if (np.mod(i,old_div(args.testMock,10)) == 0):
            print(".")
    #print saveNum
    f = open(filedir+filename+'.txt', "w")
    np.savetxt(f,saveNum)
    print('sample time',time.time() - start)    
    sys.exit(0)
else:
    check = os.path.isfile(filedir+filename+'.fits')
    if (check == False):
        MC = lk.MockCatalog(iniFile,pardict,nemoOutputDir,noise_file,parvals,parlist,mass_grid_log=[mmin,15.7,0.01],z_grid=[0.1,2.01,0.1])
Ejemplo n.º 2
0
    priorwth = np.array([0.002, 0.014, 3.6, 0.11, 0.1])
    # prioravg = np.array([0.0223,0.96,67.3,0.8,0.2])
    # priorwth = np.array([0.0009,0.02,3.6,0.12,0.1])
    priorvals = np.array([prioravg, priorwth])

if args.mockcat or args.randcat:
    parlist = [
        'omch2', 'ombh2', 'H0', 'As', 'ns', 'tau', 'massbias', 'yslope', 'scat'
    ]
    parvals = [0.1225, 0.0245, 70, 2.0e-09, 0.97, 0.06, 1.0, 0.08, 0.2]

    if args.mockcat:
        MC = lk.MockCatalog(iniFile,
                            pardict,
                            nemoOutputDir,
                            noise_file,
                            parvals,
                            parlist,
                            mass_grid_log=[13.6, 15.7, 0.01],
                            z_grid=[0.1, 2.01, 0.1])
    if args.randcat:
        MC = lk.MockCatalog(
            iniFile,
            pardict,
            nemoOutputDir,
            noise_file,
            parvals,
            parlist,
            mass_grid_log=[np.log10(2e14),
                           np.log10(7e15), 0.01],
            z_grid=[0.1, 1.01, 0.1],
            randoms=True)