Пример #1
0
func main() {
	if len(os.Args) != 2 {
		panic("You must give exactly one argument.")
	}
	outDir := os.Args[1]

	alphaTable := table.NewOutTable(alphaNames...)
	betaTable := table.NewOutTable(betaNames...)
	fthTable := table.NewOutTable(fthNames...)
	biasTable := table.NewOutTable(biasNames...)

	cFunc0 := halo.ConcentrationFunc(halo.Bhattacharya2013, 0)
	cFunc5 := halo.ConcentrationFunc(halo.Bhattacharya2013, 0.5)

	h014 := halo.New(fTh, simPpt, cFunc0, halo.Corrected, 1e14, 0)
	h015 := halo.New(fTh, simPpt, cFunc0, halo.Corrected, 5e14, 0)
	h214 := halo.New(fTh, simPpt, cFunc5, halo.Corrected, 1e14, 0.2)
	h215 := halo.New(fTh, simPpt, cFunc5, halo.Corrected, 5e14, 0.2)

	minFracLog, maxFracLog := math.Log10(0.01), math.Log10(10)
	logWidth := (maxFracLog - minFracLog) / steps
	for fracLog := minFracLog; fracLog <= maxFracLog; fracLog += logWidth {
		frac := math.Pow(10, fracLog)
		r014 := h014.C500.R * frac
		r015 := h015.C500.R * frac
		r214 := h214.C500.R * frac
		r215 := h215.C500.R * frac

		alphaTable.AddRow(frac,
			h014.AlphaBias(r014),
			h015.AlphaBias(r015),
			h214.AlphaBias(r214),
			h215.AlphaBias(r215))

		betaTable.AddRow(frac,
			h014.BetaBias(r014),
			h015.BetaBias(r015),
			h214.BetaBias(r214),
			h215.BetaBias(r215))

		fthTable.AddRow(frac,
			h014.FThermal(r014),
			h015.FThermal(r015),
			h214.FThermal(r214),
			h215.FThermal(r215))

		biasTable.AddRow(frac,
			h014.BFrac(r014),
			h015.BFrac(r015),
			h214.BFrac(r214),
			h215.BFrac(r215))
	}

	alphaTable.Write(table.KeepHeader, path.Join(outDir, "radial-alpha.table"))
	betaTable.Write(table.KeepHeader, path.Join(outDir, "radial-beta.table"))
	fthTable.Write(table.KeepHeader, path.Join(outDir, "radial-fth.table"))
	biasTable.Write(table.KeepHeader, path.Join(outDir, "radial-bias.table"))
}
Пример #2
0
func main() {
	if len(os.Args) != 2 {
		panic("You must give exactly one argument.")
	}
	outDir := os.Args[1]

	println("WARNING: You still need to implement this quickly :3")

	fgasTable := table.NewOutTable(fgasNames...)
	normTable := table.NewOutTable(normNames...)

	cFunc0 := halo.ConcentrationFunc(halo.Bhattacharya2013, 0.0)
	cFunc5 := halo.ConcentrationFunc(halo.Bhattacharya2013, 0.5)

	h014 := halo.New(fTh, simPpt, cFunc0, halo.Corrected, 1e14, 0.0)
	h015 := halo.New(fTh, simPpt, cFunc0, halo.Corrected, 5e14, 0.0)
	h514 := halo.New(fTh, simPpt, cFunc5, halo.Corrected, 1e14, 0.5)
	h515 := halo.New(fTh, simPpt, cFunc5, halo.Corrected, 5e14, 0.5)

	minFracLog, maxFracLog := math.Log10(0.01), math.Log10(10)
	logWidth := (maxFracLog - minFracLog) / steps

	for fracLog := minFracLog; fracLog <= maxFracLog; fracLog += logWidth {
		frac := math.Pow(10, fracLog)
		r14 := h014.C500.R * frac
		r15 := h015.C500.R * frac

		frac014 := h014.GasEnclosed(bt, valPpt, r14) /
			h014.MassEnclosed(bt, r14)
		frac015 := h015.GasEnclosed(bt, valPpt, r15) /
			h015.MassEnclosed(bt, r15)
		frac514 := h514.GasEnclosed(bt, valPpt, r14) /
			h514.MassEnclosed(bt, r14)
		frac515 := h515.GasEnclosed(bt, valPpt, r15) /
			h515.MassEnclosed(bt, r15)

		fgasTable.AddRow(frac, frac014, frac015, frac514, frac515)

		normTable.AddRow(frac,
			frac014/(cosmo.OmegaB/cosmo.OmegaM),
			frac015/(cosmo.OmegaB/cosmo.OmegaM),
			frac514/(cosmo.OmegaB/cosmo.OmegaM),
			frac515/(cosmo.OmegaB/cosmo.OmegaM))
	}

	fgasTable.Write(table.KeepHeader,
		path.Join(outDir, "radial-density-frac.table"))
	normTable.Write(table.KeepHeader,
		path.Join(outDir, "radial-density-frac-norm.table"))
}
Пример #3
0
func main() {
	if len(os.Args) != 2 {
		panic("You must give exactly one argument.")
	}
	outDir := os.Args[1]

	outTable := table.NewOutTable(colNames...)

	cFunc0 := halo.ConcentrationFunc(halo.Bhattacharya2013, 0.0)
	cFunc5 := halo.ConcentrationFunc(halo.Bhattacharya2013, 0.5)

	h014 := halo.New(fTh, simPpt, cFunc0, halo.Corrected, 1e14, 0.0)
	h015 := halo.New(fTh, simPpt, cFunc0, halo.Corrected, 5e14, 0.0)
	h514 := halo.New(fTh, simPpt, cFunc5, halo.Corrected, 1e14, 0.5)
	h515 := halo.New(fTh, simPpt, cFunc5, halo.Corrected, 5e14, 0.5)

	minFracLog, maxFracLog := math.Log10(0.01), math.Log10(10)
	logWidth := (maxFracLog - minFracLog) / steps
	for fracLog := minFracLog; fracLog <= maxFracLog; fracLog += logWidth {
		frac := math.Pow(10, fracLog)

		println(
			h014.EWTemperature(halo.Corrected, valPpt, h015.C500.R*frac),
			h015.EWTemperature(halo.Corrected, valPpt, h015.C500.R*frac),
			h514.EWTemperature(halo.Corrected, valPpt, h514.C500.R*frac),
			h515.EWTemperature(halo.Corrected, valPpt, h515.C500.R*frac))

		outTable.AddRow(frac,
			h014.EWTemperature(halo.Corrected, valPpt, h015.C500.R*frac),
			h015.EWTemperature(halo.Corrected, valPpt, h015.C500.R*frac),
			h514.EWTemperature(halo.Corrected, valPpt, h514.C500.R*frac),
			h515.EWTemperature(halo.Corrected, valPpt, h515.C500.R*frac))
	}

	outTable.Write(table.KeepHeader, path.Join(outDir, "radial-temp.table"))
}
Пример #4
0
const (
	steps  = 200
	simFth = halo.Battaglia2013
	simPpt = halo.BattagliaAGN2012
	valPpt = halo.Planck2012

	tempBt = halo.Corrected
)

var (
	fTh  = halo.FThermalFunc(simFth, halo.MeanCurve)
	fThP = halo.FThermalFunc(simFth, halo.PlusSigmaCurve)
	fThM = halo.FThermalFunc(simFth, halo.MinusSigmaCurve)

	cFunc0 = halo.ConcentrationFunc(halo.Bhattacharya2013, 0.0)
	cFunc5 = halo.ConcentrationFunc(halo.Bhattacharya2013, 0.5)

	colNames = []string{
		"m500c",
		"temp-z=0",
		"temp-z=0+",
		"temp-z=0-",
		"temp-z=0.5",
		"temp-z=0.5+",
		"temp-z=0.5-",
	}
)

func main() {
	if len(os.Args) != 2 {
Пример #5
0
	"os"
	"path"

	"bitbucket.org/phil-mansfield/halo"
	"bitbucket.org/phil-mansfield/table"
)

const (
	steps  = 200
	simFth = halo.Battaglia2013
	simPpt = halo.BattagliaAGN2012
)

var (
	fTh   = halo.FThermalFunc(simFth, halo.MeanCurve)
	cFunc = halo.ConcentrationFunc(halo.Bhattacharya2013, 0.0)

	colNames = []string{
		"m500true",
		"q500",
		"fth500",
		"fth500bias",
		"bfrac500",
		"bfrac500bias",
	}
)

func main() {
	if len(os.Args) != 2 {
		panic("Must provite a target directory.")
	}