Commit 5a6b3e6a authored by LUSTIG Peter's avatar LUSTIG Peter

Works with new Jackknife Version, added band selection

parent 8ba502d7
......@@ -26,6 +26,7 @@ import datetime
from astropy.io.fits import ImageHDU
from copy import deepcopy, copy
from utils import CombineMeasurements
import binascii
#import dill as pickle
plt.close('all')
......@@ -149,6 +150,7 @@ detection = False
ncores = 2
parity_threshold = 1
band = '1mm'
outdir = Path("montecarlo_results/")
outdir = Path("testdir")
......@@ -172,9 +174,10 @@ message = '''\
# Number of Injected Sources: {:5d} #
# Photometry: {} #
# Detection: {} #
# Band: {} #
###############################################################
'''.format(nsim, ncores, min_detection_threshold, len(flux), nsources,
photometry, detection)
photometry, detection, band)
print(message, "\n")
......@@ -200,7 +203,8 @@ jk_filenames = list(Path(DATA_DIR).glob('*/map.fits'))
for i in range(len(jk_filenames)):
jk_filenames[i] = str(jk_filenames[i])
jk_iter = Jackknife(jk_filenames, band='2mm', n=nsim)
jk_iter = Jackknife(jk_filenames, band=band, n=nsim,
parity_threshold=parity_threshold)
print('Done in {:.2f}s'.format(clock()-t0))
print('Begin Monte Carlo')
......@@ -216,7 +220,7 @@ for _flux in flux:
jackknifes = []
for i in range(nsim):
jackknifes.append(jk_iter(parity_threshold=parity_threshold))
jackknifes.append(jk_iter())
print('Done in {:.2f}s'.format(clock()-t0))
'''
......@@ -248,7 +252,7 @@ for _flux in flux:
else:
print('simulation without source injection')
if(1):
if(0):
res = p.map(helpfunc, jackknifes)
res = list(zip(*res))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment