Ejemplo n.º 1
0
def map_dbt_lightcone():
    for i in range(0, len(redshifts)):
        # print 'filename: setup_dirs.resultsdir()+'map_dbt_lightcone_'+str('%.3f' % redshifts[i])+'.dat'

        filename = setup_dirs.resultsdir() + "map_dbt_lightcone_" + str("%.3f" % redshifts[i]) + ".dat"
        temp_filename = setup_dirs.path() + "Temper3D_" + str("%.3f" % redshifts[i]) + ".bin"
        xfrac_filename = setup_dirs.path() + "xfrac3d_" + str("%.3f" % redshifts[i]) + ".bin"
        if i % 2 == 0:
            density_filename = (
                "/research/prace/244Mpc_RT/244Mpc_f2_8.2pS_250/coarser_densities/"
                + str("%.3f" % redshifts[i])
                + "n_all.dat"
            )
        else:
            density_filename = (
                "/research/prace/244Mpc_RT/244Mpc_f2_8.2pS_250/coarser_densities/"
                + str("%.3f" % redshifts[i - 1])
                + "n_all.dat"
            )

        tfile = c2t.TemperFile(temp_filename)
        xfile = c2t.XfracFile(xfrac_filename).xi
        if ss == " ":
            dfile = c2t.DensityFile(density_filename).cgs_density
        else:
            dfile = np.ones(ss ** 3).reshape(ss, ss, ss) * 1.981e-10 * (1 + redshifts[i]) ** 3

        dT_box = c2t.calc_dt_full_lightcone(xfile, tfile, dfile, redshifts[i])
        IO.writemap(dT_box, filename)
        print "Written map to " + filename
Ejemplo n.º 2
0
def map_temp():
    for i in range(start, len(redshifts)):
        filename = setup_dirs.resultsdir() + "map_temper_" + str("%.3f" % redshifts[i]) + ".dat"
        temp_filename = setup_dirs.path() + "Temper3D_" + str("%.3f" % redshifts[i]) + ".bin"
        tfile = c2t.TemperFile(temp_filename)
        IO.writemap(tfile.temper, filename)
    print "Writen map to " + filename
Ejemplo n.º 3
0
def map_xfrac(id):
    #    for i in range(len(redshifts)-6,len(redshifts)-4):
    print len(redshifts)
    for i in range(start, len(redshifts)):
        filename = setup_dirs.resultsdir() + "map_xfrac" + id + "_" + str("%.3f" % redshifts[i]) + ".dat"
        xfrac_filename = setup_dirs.path() + "xfrac3d" + id + "_" + str("%.3f" % redshifts[i]) + ".bin"
        xfile = c2t.XfracFile(xfrac_filename)
        IO.writemap(xfile.xi, filename)
    print "Written map to " + filename