Exemplo n.º 1
0
    fisher_single = fisher.copy()

    # utils.study_prior_tau_on_N_eff(fid, fisher, 'data/' + output_folder, header)
    np.savetxt(
        'data/{}/fisher_mat_joint_lmin={}_lmax={}_ndet={}_fsky={}.txt'.format(
            output_folder, lmin, lmax, N_det, fsky),
        fisher_single,
        header=header)

    print 'finally how much constraint on parameters without external prior?'
    print ''

    fisher_inv = np.linalg.inv(fisher_single)

    utils.save_cov_matrix(
        fisher_inv,
        'data/{}/param_cov_lmin={}_lmax={}_ndet={}_fsky={}.txt'.format(
            output_folder, lmin, lmax, N_det, fsky))

    np.savetxt(
        'data/{}/invetered_sqrt_fisher_joint_lmin={}_lmax={}_ndet={}_fsky={}.txt'
        .format(output_folder, lmin, lmax, N_det, fsky),
        np.sqrt(fisher_inv),
        header=header)

    print 'fisher=', fisher
    no_lcdm_parameters = ['massless_neutrinos', 'w', 'omnuh2']
    plot_now = ['omnuh2']
    excluded_parameters = list(set(no_lcdm_parameters) - set(plot_now))

    par_gaps, values, fid, fisher_single = utils.exclude_parameters_from_fisher(
        excluded_parameters, par_gaps, values, fid, fisher_single)
Exemplo n.º 2
0
           np.column_stack((dats[lmin_index:lmax_index, 0, 0], no_marginalized_ell)), header=header)
np.savetxt('data/{}/marginalized_ell_CMB_lmin={}_lmax={}_ndet={}_fsky={}.txt'.format(output_folder, lmin, lmax, N_det, fsky),
           np.column_stack((dats[lmin_index:lmax_index, 0, 0], marginalized_ell)), header=header)
np.save('data/{}/full_fisher_mat_CMB_lmin={}_lmax={}_ndet={}_fsky={}.npy'.format(output_folder, lmin, lmax, N_det, fsky),
        fisher_save)

np.savetxt('data/{}/ell_indeces_CMB_lmin={}_lmax={}_ndet={}_fsky={}.txt'.format(output_folder, lmin, lmax, N_det, fsky),
           dats[lmin_index:lmax_index, 0, 0], header=header)

# utils.study_prior_tau_on_N_eff(fid, fisher, 'data/' + output_folder, header)


print 'finally how much constraint on parameters without prior?'
print ''
fisher_single = fisher.copy()

fisher_inv = np.linalg.inv(fisher_single)

utils.save_cov_matrix(
    fisher_inv, 'data/{}/param_cov_lmin={}_lmax={}_ndet={}_fsky={}.txt'.format(output_folder, lmin, lmax, N_det, fsky))


np.savetxt('data/{}/invetered_sqrt_fisher_CMB_lmin={}_lmax={}_ndet={}_fsky={}.txt'.format(output_folder,
                                                                                            lmin, lmax, N_det, fsky), np.sqrt(fisher_inv), header=header)
np.savetxt('data/{}/fisher_mat_CMB_lmin={}_lmax={}_ndet={}_fsky={}.txt'.format(output_folder,
                                                                                 lmin, lmax, N_det, fsky), fisher_single, header=header)

print 'fisher=', fisher

utils.print_resume_stat(fisher_single, fid)