Exemple #1
0
		id = "{:2d}".format(index)
		lower = "{:3.2f}".format(koo.calcLowerPRB(vinf[j]))

		vin_vcr = "{:6.3f}".format(vinf[j] / koo.calcCritVel(mdot[j], vinf[j], mh * mvd_iden[i][0]))
		tp_rb = "{:5.2f}".format(koo.calcConfineTimeRB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * S2YR / 1000.0)
		rfinal_rb = "{:4.3f}".format(koo.calcFinalRadiusRB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * CM2PC)
		tp_prb = "{:5.2f}".format(koo.calcConfineTimePRB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * S2YR / 1000.0)
		rfinal_prb = "{:4.3f}".format(koo.calcFinalRadiusPRB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * CM2PC)
		tp_ab = "{:5.2f}".format(koo.calcConfineTimeAB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * S2YR / 1000.0)
		rfinal_fab = "{:4.3f}".format(koo.calcFinalRadiusFAB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * CM2PC)
		rfinal_pab = "{:4.3f}".format(koo.calcFinalRadiusPAB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * CM2PC)

		vin_vcr2 = "{:6.3f}".format(vinf[j] / koo.calcCritVel(mdot[j], vinf[j], mh * den[i]))
		tp_rb2 = "{:5.2f}".format(koo.calcConfineTimeRB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * S2YR / 1000.0)
		rfinal_rb2 = "{:4.3f}".format(koo.calcFinalRadiusRB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * CM2PC)
		tp_prb2 = "{:5.2f}".format(koo.calcConfineTimePRB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * S2YR / 1000.0)
		rfinal_prb2 = "{:4.3f}".format(koo.calcFinalRadiusPRB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * CM2PC)
		tp_ab2 = "{:5.2f}".format(koo.calcConfineTimeAB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * S2YR / 1000.0)
		rfinal_fab2 = "{:4.3f}".format(koo.calcFinalRadiusFAB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * CM2PC)
		rfinal_pab2 = "{:4.3f}".format(koo.calcFinalRadiusPAB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * CM2PC)

		t_start = str(koo.calcStartTime(mdot[j], vinf[j], mh * den[i], 8000.0, 0.5, mp1_data.injection_radii[index-1] * PC2CM) * S2YR / 1000.0)

		print id + " & " + lower + " & " +\
			  vin_vcr + " & " + tp_rb + " & " + rfinal_rb + " & " + tp_prb + " & " +\
			  rfinal_prb + " & " + tp_ab + " & " + rfinal_fab + " & " + rfinal_pab + " & " +\
			  vin_vcr2 + " & " + tp_rb2 + " & " + rfinal_rb2 + " & " + tp_prb2 + " & " +\
			  rfinal_prb2 + " & " + tp_ab2 + " & " + rfinal_fab2 + " & " + rfinal_pab2 + " & " +\
			  t_start + "\\\\"

Exemple #2
0
	r = "{:4.2f}".format(rstar[j])
	l = "{:4.2f}".format(logL[j])
	q = "{:4.2f}".format(logQ[j])
	ed = "{:4.2e}".format(0.5 * mdot[j] * vinf[j] * vinf[j]) # erg.s-1
	md = "{:8.2e}".format(mdot[j] / 6.341958397e25) # [Msun.yr-1]
	v = "{:8.2e}".format(vinf[j] / 100000.0) # [km.s-1]

	print m + " & " + t + " & " + r + " & " + l + " & " + q + " & " + ed + " & " + md \
			  + " & " + v + " \\\\"

for i in range(len(den)):
	for j in range(len(mass)):
		index = 9*i + j
		m = "{:3d}".format(int(mass[j]))
		d = "{:8.2e}".format(den[i])
		ysc = "{:4.3f}".format(koo.calcStromgrenRadius(logQ[j], den[i]) / cloud_dist)
		nx = str(nxs[index])
		ny = str(nys[index])
		nxny = "{($" + nx + "$,$" + ny + "$)}"
		sizex = "{:3.2f}".format(sizexs[index] / 3.09e18)
		r_inj = 10.0 * sizexs[index] / nxs[index]
		lcrit = "{:4.3e}".format(critL2(r_inj, vinf[j]))
		tstart = "{:4.3f}".format(koo.calcStartTime(mdot[j], vinf[j], mh*den[i], 8000.0, 0.5, r_inj) * S2YR / 1000.0)
		tcoolval = coolTime(mp1_data.central_pressures[index], mp1_data.central_densities[index]) * S2YR / 1000.0
		tcool = "{:4.3e}".format(tcoolval)
		texitval = exitTime(r_inj, vinf[j]) * S2YR / 1000.0
		texit = "{:4.3f}".format(texitval)
		R_inj = "{:4.3f}".format(r_inj * CM2PC)
		ri = "{:8d}".format((int)(-tcoolval / texitval))

		print m + " & " + d + " & " + nx + " & " + ny + " & " + sizex + " & " + ysc + " & " + R_inj + " & " + tstart + " & " + tcool + " \\\\"