In [5]:
import numpy as np
import os, sys
path = os.path.abspath('../library/')
if path not in sys.path:
sys.path.append(path)
from cumhpx import do_likelihood, local_normalisation
name = 'raster_0.7_1.0'
In [6]:
print(local_normalisation(name, verbose = True))
outputDir = '../output/%s_0.001' %name
fSample = 0.001
print(do_likelihood(outputDir,fSample= fSample))
## Local normalisation, compare to Czekaj+14 table 7 ##
popid= 0 1.4 Msun/pc^3*10^-3
popid= 1 3.6 Msun/pc^3*10^-3
popid= 2 2.7 Msun/pc^3*10^-3
popid= 3 2.2 Msun/pc^3*10^-3
popid= 4 3.8 Msun/pc^3*10^-3
popid= 5 3.7 Msun/pc^3*10^-3
popid= 6 7.1 Msun/pc^3*10^-3
popid= 7 1.2 Msun/pc^3*10^-3
popid= 8 13.8 Msun/pc^3*10^-6
## total sum of stars: 25.6
thindisc WD 10.7 Msun/pc^3*10^-3 3.3 mact
thick disc WD 2.7 Msun/pc^3*10^-3 0.9 mact
####################################
(25.62421405098059, 4.2276952630326, 310064)
GDR2mock
nstar before cleaning: 1426412
nstar after g-band cleaning: 1096050
nstar before cleaning: 1096050
nstar after rp-band cleaning: 799610
799610
after smc cut: 799299
after lmc cut: 797728
GDR2
nstar before cleaning: 1253908
nstar after g-band cleaning: 1105846
nstar before cleaning: 1105846
nstar after rp-band cleaning: 930066
930066
after smc cut: 928633
after lmc cut: 919108
hpx 2055 is empty
hpx 2064 is empty
hpx 2065 is empty
hpx 2066 is empty
hpx 2067 is empty
hpx 2068 is empty
hpx 2069 is empty
hpx 2070 is empty
hpx 2071 is empty
hpx 2072 is empty
hpx 2073 is empty
hpx 2080 is empty
hpx 2081 is empty
hpx 2082 is empty
hpx 2088 is empty
hpx 2112 is empty
hpx 2336 is empty
hpx 2338 is empty
hpx 2344 is empty
hpx 2346 is empty
likelihood: -329392.34911536257
total diff: 141726
too many: 10173, too little: -131553
hpx 2055 is empty
hpx 2064 is empty
hpx 2065 is empty
hpx 2066 is empty
hpx 2067 is empty
hpx 2068 is empty
hpx 2069 is empty
hpx 2070 is empty
hpx 2071 is empty
hpx 2072 is empty
hpx 2073 is empty
hpx 2080 is empty
hpx 2081 is empty
hpx 2082 is empty
hpx 2088 is empty
hpx 2112 is empty
hpx 2336 is empty
hpx 2338 is empty
hpx 2344 is empty
hpx 2346 is empty
hpx 2055 is empty
hpx 2064 is empty
hpx 2065 is empty
hpx 2066 is empty
hpx 2067 is empty
hpx 2068 is empty
hpx 2069 is empty
hpx 2070 is empty
hpx 2071 is empty
hpx 2072 is empty
hpx 2073 is empty
hpx 2080 is empty
hpx 2081 is empty
hpx 2082 is empty
hpx 2088 is empty
hpx 2112 is empty
hpx 2336 is empty
hpx 2338 is empty
hpx 2344 is empty
hpx 2346 is empty
797728 919108
/home/rybizki/anaconda3/lib/python3.6/site-packages/healpy/pixelfunc.py:304: RuntimeWarning: invalid value encountered in less_equal
return np.absolute(m - badval) <= atol + rtol * np.absolute(badval)
/home/rybizki/anaconda3/lib/python3.6/site-packages/healpy/projaxes.py:1053: RuntimeWarning: invalid value encountered in less
result.data[result.data<0]=0.0
/home/rybizki/anaconda3/lib/python3.6/site-packages/healpy/projaxes.py:1054: RuntimeWarning: invalid value encountered in greater
result.data[result.data>1]=1.0
(797728, -329392.34911536257, 10173, 131553)
/home/rybizki/anaconda3/lib/python3.6/site-packages/matplotlib/colors.py:1031: RuntimeWarning: invalid value encountered in less_equal
mask |= resdat <= 0
In [4]:
name_comp = 'raster_0.7_1.0'
compDir = '../output/%s_0.001/GDR2mock_20.7Gmag.fits' %name_comp
fSample = 0.0025
do_likelihood(outputDir,fSample= fSample, comp_file = compDir, savefile=False)
GDR2mock
nstar before cleaning: 1506672
nstar after g-band cleaning: 1161038
nstar before cleaning: 1161038
nstar after rp-band cleaning: 844364
844364
after smc cut: 844040
after lmc cut: 842305
GDR2
nstar before cleaning: 1426412
nstar after g-band cleaning: 1096050
nstar before cleaning: 1096050
nstar after rp-band cleaning: 799610
799610
after smc cut: 799299
after lmc cut: 797728
hpx 2055 is empty
hpx 2064 is empty
hpx 2065 is empty
hpx 2066 is empty
hpx 2067 is empty
hpx 2068 is empty
hpx 2069 is empty
hpx 2070 is empty
hpx 2071 is empty
hpx 2072 is empty
hpx 2073 is empty
hpx 2080 is empty
hpx 2081 is empty
hpx 2082 is empty
hpx 2088 is empty
hpx 2112 is empty
hpx 2336 is empty
hpx 2338 is empty
hpx 2344 is empty
hpx 2346 is empty
likelihood: -2818.5104063285876
total diff: 44683
too many: 44630, too little: -53
hpx 2055 is empty
hpx 2064 is empty
hpx 2065 is empty
hpx 2066 is empty
hpx 2067 is empty
hpx 2068 is empty
hpx 2069 is empty
hpx 2070 is empty
hpx 2071 is empty
hpx 2072 is empty
hpx 2073 is empty
hpx 2080 is empty
hpx 2081 is empty
hpx 2082 is empty
hpx 2088 is empty
hpx 2112 is empty
hpx 2336 is empty
hpx 2338 is empty
hpx 2344 is empty
hpx 2346 is empty
hpx 2055 is empty
hpx 2064 is empty
hpx 2065 is empty
hpx 2066 is empty
hpx 2067 is empty
hpx 2068 is empty
hpx 2069 is empty
hpx 2070 is empty
hpx 2071 is empty
hpx 2072 is empty
hpx 2073 is empty
hpx 2080 is empty
hpx 2081 is empty
hpx 2082 is empty
hpx 2088 is empty
hpx 2112 is empty
hpx 2336 is empty
hpx 2338 is empty
hpx 2344 is empty
hpx 2346 is empty
842305 797728
/home/rybizki/anaconda3/lib/python3.6/site-packages/healpy/pixelfunc.py:304: RuntimeWarning: invalid value encountered in less_equal
return np.absolute(m - badval) <= atol + rtol * np.absolute(badval)
/home/rybizki/anaconda3/lib/python3.6/site-packages/healpy/projaxes.py:1053: RuntimeWarning: invalid value encountered in less
result.data[result.data<0]=0.0
/home/rybizki/anaconda3/lib/python3.6/site-packages/healpy/projaxes.py:1054: RuntimeWarning: invalid value encountered in greater
result.data[result.data>1]=1.0
/home/rybizki/anaconda3/lib/python3.6/site-packages/matplotlib/colors.py:1031: RuntimeWarning: invalid value encountered in less_equal
mask |= resdat <= 0
Out[4]:
(842305, -2818.5104063285876, 44630, 53)
In [ ]:
Content source: jan-rybizki/Galaxia_wrap
Similar notebooks: