Exemple #1
0
multistep_path = d["multistep_path"]

noise_dir = "noise_model"
mcm_dir = "mcms"
plot_dir = "plots/mc_spectra/"
mc_dir = "montecarlo"
bestfit_dir = "best_fits"

pspy_utils.create_directory(plot_dir)

spectra = ["TT", "TE", "TB", "ET", "BT", "EE", "EB", "BE", "BB"]
spin_pairs = ["spin0xspin0", "spin0xspin2", "spin2xspin0", "spin2xspin2"]
nsims = iStop - iStart

lth, Dlth = pspy_utils.ps_lensed_theory_to_dict(clfile,
                                                output_type=type,
                                                lmax=lmax,
                                                start_at_zero=False)

theory = {}
bin_theory = {}

for id_sv1, sv1 in enumerate(surveys):
    arrays_1 = d["arrays_%s" % sv1]
    for id_ar1, ar1 in enumerate(arrays_1):
        for id_sv2, sv2 in enumerate(surveys):
            arrays_2 = d["arrays_%s" % sv2]
            for id_ar2, ar2 in enumerate(arrays_2):

                if (id_sv1 == id_sv2) & (id_ar1 > id_ar2): continue
                if (id_sv1 > id_sv2): continue
Exemple #2
0
if include_sys == True:
    mc_dir = 'monteCarlo_syst'
    plot_name = 'robustness'
else:
    mc_dir = 'monteCarlo'
    plot_name = 'bias'

freq_pairs = []
for c1, freq1 in enumerate(freqs):
    for c2, freq2 in enumerate(freqs):
        if c1 > c2: continue
        freq_pairs += [[freq1, freq2]]

lth, psth = pspy_utils.ps_lensed_theory_to_dict(d['theoryfile'],
                                                output_type='Cl',
                                                lmax=lthmax,
                                                lstart=2)

plt.figure(figsize=(18, 10))
color_array = ['red', 'blue', 'green', 'gray', 'purple', 'orange']

for fpair, color in zip(freq_pairs, color_array):

    f0, f1 = fpair
    fname = '%sx%s' % (f0, f1)
    cl = {}
    error = {}
    mc_error = {}
    model = {}
    lmin, lmax = d['lrange_%sx%s' % (f0, f1)]
import SO_noise_utils

d = so_dict.so_dict()
d.read_from_file(sys.argv[1])

scan_list = d["scan_list"]
lmax = d["lmax"]
niter = d["niter"]
spectra = d["spectra"]
split_list = d["split_list"]
runs = d["runs"]
spin_pairs = d["spin_pairs"]
binning_file = d["binning_file_name"]
clfile = d["clfile"]

lth, ps_theory = pspy_utils.ps_lensed_theory_to_dict(clfile, "Dl", lmax=lmax)

spectra_dir = "spectra"
plot_dir = "plot/covariance"
cov_dir = "covariance"
mcm_dir = "mcms"
window_dir = "windows"

pspy_utils.create_directory(plot_dir)
pspy_utils.create_directory(cov_dir)

fsky = {}
for scan in scan_list:
    for run in runs:
        print(scan, run)
Exemple #4
0
    cov_dict = pickle.load(pkl_file)
    pkl_file.close()

    result_ps[test] = ps_dict
    result_cov[test] = cov_dict

    test_names += [test]

if compute_T_only == True:
    spectra = ["TT"]
else:
    spectra = ["TT", "TE", "TB", "ET", "BT", "EE", "EB", "BE", "BB"]

test_names.remove("exact")
# Make plots
lth, clth = pspy_utils.ps_lensed_theory_to_dict(clfile, type, lmax=lmax)
cross = "sim_%03d_split0xsim_%03d_split1" % (id_sim, id_sim)

spectra_plot_utils.plot_spectra_comparison(lb, result_ps, result_cov, cross,
                                           ["TT", "TE", "EE"], test_names,
                                           plot_dir, lth, clth)
spectra_plot_utils.plot_spectra_comparison(lb, result_ps, result_cov, cross,
                                           ["TB", "EB", "BB"], test_names,
                                           plot_dir, lth, clth)

spectra_plot_utils.delta_Cl_over_sigma(lb, result_ps, result_cov, cross,
                                       spectra, test_names, plot_dir)

spectra_plot_utils.cov_plot(lb, result_cov, cross, spectra, test_names,
                            plot_dir)