In [1]:
%pylab inline
from astropy.io import fits
In [21]:
print('## Local normalisation, compare to Czekaj+14 table 7 ##')
outputDir = '../output/more_bulge_100pc'
#outputDir = '../output/mockcat_new_SFR_new_IMF_100pc_more_thick'
x = fits.getdata(outputDir + '/' + 'GDR2mock_20.7Gmag.fits')
smaller_sphere = 50
sphere = (4/3)*np.pi*smaller_sphere**3
for popid in np.arange(9):
selection = (x.popid==popid) & (x.logg < 7) & (np.divide(1,x.parallax)<smaller_sphere/1000)
if (popid!=8):
print('popid=',popid,' %.1f Msun/pc^3*10^-3' %(sum(x.smass[selection])/sphere*1000))
else:
print('popid=',popid,' %.1f Msun/pc^3*10^-6' %(sum(x.smass[selection])/sphere*1e6))
selection = (x.popid<=6) & (x.logg > 7)& (np.divide(1,x.parallax)<smaller_sphere/1000)
print('thindisc WD',' %.1f Msun/pc^3*10^-3 %.1f mact' %(sum(x.smass[selection])/sphere*1000,sum(x.mact[selection])/sphere*1000))
selection = (x.popid==7) & (x.logg > 7)& (np.divide(1,x.parallax)<smaller_sphere/1000)
print('thick disc WD',' %.1f Msun/pc^3*10^-3 %.1f mact' %(sum(x.smass[selection])/sphere*1000,sum(x.mact[selection])/sphere*1000))
In [3]:
# Galaxia parametrization
sfrv = np.array([1.60552043, 1.79400035, 2.02272975, 2.42164718,3.07851692, 4.15556317])
#thindisk0
hr1=5.0;
hr2=3.0;
rho0=1.5120222/(5.5683282*(hr1*hr1*hr1-hr2*hr2*hr2))
print(rho0)
rho0=2.37/(5.5683282*(hr1*hr1*hr1-hr2*hr2*hr2))
print(rho0)
#thindisk1
hr1=2.400#the value now is used in Czekaj+2014, 2.200; used in Reyle+2009//2.530; used in Robin+ 2003, Galaxia original
hr2=1.320#;
for i,sfr in enumerate(sfrv):
rho0=sfr/(23.719602*(hr1*hr1*hr1-hr2*hr2*hr2))
print(i+1, rho0)
#thickdisc
hr1=2.5;
hr2=0.8;
xl=0.4;
c1=1/((hr2*xl)*(2+xl/hr2));
c2=np.exp(xl/hr2)/(1+0.5*xl/hr2);
rho0=1.34e6*4.4634;
print(rho0)
#Halo:
ac=0.5;
rho0=9.32e3*6.4159*1.1;
#Bulge:
rho0=0.255*13.7e9;
a=78.9 ; b=3.5; g=91.3;
x0=1.59; y0=0.424; z0=0.424;
Rc=2.54;
In [11]:
agev = np.array([0.075e9, 0.575e9 ,1.5e9, 2.5e9, 4e9, 6e9, 8.5e9])
agev = np.divide(agev,1e9)
dagev = np.array([0.075e9, 0.425e9, 0.5e9, 0.5e9, 1e9, 1e9, 1.5e9])
dagev = np.divide(dagev,1e9)
In [20]:
print('## Local normalisation, compare to Czekaj+14 table 7 ##')
outputDir = '../output/GDR2mock_207'
#outputDir = '../output/mockcat_new_SFR_new_IMF_100pc_more_thick'
x = fits.getdata(outputDir + '/' + 'GDR2mock_50pc.fits')
smaller_sphere = 50
sphere = (4/3)*np.pi*smaller_sphere**3
for i in np.arange(7):
selection = (x.age<agev[i]+dagev[i]) & (x.age > agev[i]-dagev[i])
print('popid=',i,' %.1f Msun/pc^3*10^-3' %(sum(x.mass[selection])/sphere*1e3))
selection = (x.age>=10) & (x.age <= 11)
print('thindisc WD',' %.1f Msun/pc^3*10^-3' %(sum(x.mass[selection])/sphere*1000))
selection = (x.age>11)
print('thick disc WD',' %.1f Msun/pc^3*10^-6' %(sum(x.mass[selection])/sphere*1e6))
In [ ]: