Skip to content

Commit

Permalink
Addressing PR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpratmarti committed May 25, 2022
1 parent aee4156 commit d6837f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions txpipe/twopoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ def add_data_points(self, S, results):

# Add the covariance. There are several different jackknife approaches
# available - see the treecorr docs
print(comb[0])
print(dir(comb[0]))
if treecorr.__version__.startswith("4.2."):
if self.rank == 0:
print("Using old TreeCorr - covariance may be slow. "
Expand Down Expand Up @@ -438,6 +436,7 @@ def call_treecorr(self, i, j, k):
"""
import sacc
import pickle
#TODO: fix up the caching code
if self.name == "TXTwoPoint":
pickle_filename = self.get_output("twopoint_data_real_raw") + f".checkpoint-{i}-{j}-{k}.pkl"
#pickle_filename = f"treecorr-cache-{i}-{j}-{k}.pkl"
Expand Down
3 changes: 0 additions & 3 deletions txpipe/twopoint_fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ def run(self):
if self.rank == 0:
nband = ell_bins.get_n_bands()
ell_effs = ell_bins.get_effective_ells()
# this ell_effs variable is not used anywhere else, should we just remove it?
print(f"Chosen {nband} ell bin bands with effective ell values and ranges:")
for i in range(nband):
leff = ell_effs[i]
Expand Down Expand Up @@ -587,7 +586,6 @@ def compute_power_spectra(

if self.config["analytic_noise"]:
# we are going to subtract the noise afterwards
#if k == POS_POS:
c = nmt.compute_full_master(
field_i,
field_j,
Expand Down Expand Up @@ -643,7 +641,6 @@ def window_pixel(ell, nside):
ls = ell_bins.get_effective_ells()

c_beam = c / window_pixel(ls, pixel_scheme.nside) ** 2
#print("window_pixel(ls, pixel_scheme.nside) ** 2", window_pixel(ls, pixel_scheme.nside) ** 2)
print("c_beam, k, i, j", c_beam, k, i, j)

# this has shape n_cls, n_bpws, n_cls, lmax+1
Expand Down
4 changes: 2 additions & 2 deletions txpipe/utils/nmt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ def apply_window(self, b, c_ell):
return (c_ell[ell] * weight).sum() / weight.sum()

@classmethod
def from_binning_info(self, ell_min, ell_max, n_ell, ell_spacing):
def from_binning_info(cls, ell_min, ell_max, n_ell, ell_spacing):
# Creating the ell binning from the edges using this Namaster constructor.
if ell_spacing == "log":
edges = np.unique(np.geomspace(ell_min, ell_max, n_ell).astype(int))
else:
edges = np.unique(np.linspace(ell_min, ell_max, n_ell).astype(int))

ell_bins = self.from_edges(edges[:-1], edges[1:], is_Dell=False)
ell_bins = cls.from_edges(edges[:-1], edges[1:], is_Dell=False)

return ell_bins

Expand Down

0 comments on commit d6837f3

Please sign in to comment.