In [1]:
import numpy as np
from astropy.io import fits
import os, sys
path = os.path.abspath('../library/')
if path not in sys.path:
    sys.path.append(path)
from cumhpx import do_likelihood

In [2]:
#x = fits.getdata("../output/GDR2_207/GDR2_207_0.0025sampling.fits")
#x = delete_magellanic_clouds(x, True)

In [ ]:
#outputDir = '../output/more_bulge'
#fSample = 0.001
#do_likelihood(outputDir,fSample= fSample)

In [ ]:
for i in range(20):
    print(i)
    try:
        outputDir = '../output/GDR2mock_207/'
        fSample = 0.001
        do_likelihood(outputDir,fSample= fSample, outputFile = 'GDR2mock_207_0.001sampling')
        break
    except:
        continue


0
GDR2mock
nstar before cleaning: 1606747
nstar after g-band cleaning: 1271604
nstar before cleaning: 1271604
nstar after rp-band cleaning: 938411
938411
after smc cut: 938056
after lmc cut: 936170
GDR2
nstar before cleaning: 1253908
nstar after g-band cleaning: 1106073
nstar before cleaning: 1106073
nstar after rp-band cleaning: 930761
930761
after smc cut: 929360
after lmc cut: 919998
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 2432 is empty
cumhpx 3108 is deleted in the model because of no representation in the data, (might affect likelihood)
cumhpx 3452 is deleted in the model because of no representation in the data, (might affect likelihood)
likelihood:  -269560.8003526661
total diff:  127333
too many: 71751, too little: -55582
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 2432 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
hpx 2432 is empty
936170 919998
/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
1
GDR2mock
nstar before cleaning: 1606747
nstar after g-band cleaning: 1271604
nstar before cleaning: 1271604
nstar after rp-band cleaning: 938411
938411
after smc cut: 938056
after lmc cut: 936170
GDR2
nstar before cleaning: 1253908
nstar after g-band cleaning: 1106057
nstar before cleaning: 1106057
nstar after rp-band cleaning: 930507
930507
after smc cut: 929100
after lmc cut: 919438
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
cumhpx 3108 is deleted in the model because of no representation in the data, (might affect likelihood)
likelihood:  -277726.70528568554
total diff:  129281
too many: 73006, too little: -56275
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
936170 919438
2
GDR2mock
nstar before cleaning: 1606747
nstar after g-band cleaning: 1271604
nstar before cleaning: 1271604
nstar after rp-band cleaning: 938411
938411
after smc cut: 938056
after lmc cut: 936170
GDR2
nstar before cleaning: 1253908
nstar after g-band cleaning: 1106151
nstar before cleaning: 1106151
nstar after rp-band cleaning: 930579
930579
after smc cut: 929179
after lmc cut: 919614

In [ ]: