Skip to content

Commit

Permalink
test that the binning_file are consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Thibaut committed Feb 22, 2025
1 parent 57d4d93 commit ba1e4df
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This script combined the spectra together
"""

from pspy import so_dict, pspy_utils
from pspy import so_dict, pspy_utils, so_spectra
from pspipe_utils import covariance, pspipe_list, log
import numpy as np
import pylab as plt
Expand Down Expand Up @@ -135,6 +135,12 @@ def ml_helper(cov, vec_xar_th, vec_xar_fg_th, bin_mean, all_indices, bin_out_dic
spec_name_list = pspipe_list.get_spec_name_list(d, delimiter="_")
bin_low, bin_high, bin_mean, bin_size = pspy_utils.read_binning_file(binning_file, lmax)


# Check the binning
lb_, _ = so_spectra.read_ps(f"{spec_dir}/Dl_{spec_name_list[0]}_cross.dat")
assert (lb_ == bin_mean).all(), "binning file should be consistent with the one used to compute the spectra"


cov = np.load("covariances/x_ar_final_cov_data.npy")

vec_xar = covariance.read_x_ar_spectra_vec(spec_dir,
Expand Down

0 comments on commit ba1e4df

Please sign in to comment.