Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions heracles/twopoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def invert_mixing_matrix(
return inv_M


def apply_mixing_matrix(d, M, lmax=None):
def apply_mixing_matrix(d, M):
"""
Apply mixing matrix to the data Cl.
Args:
Expand All @@ -476,10 +476,7 @@ def apply_mixing_matrix(d, M, lmax=None):
"""
corr_d = {}
for key in d.keys():
if lmax is None:
*_, lmax = d[key].shape
dtype = d[key].array.dtype
ell_mask = M[key].ell
s1, s2 = d[key].spin
_d = np.atleast_2d(d[key].array)
_M = M[key].array
Expand All @@ -495,7 +492,5 @@ def apply_mixing_matrix(d, M, lmax=None):
_corr_d.append(_M @ cl)
_corr_d = np.squeeze(_corr_d)
_corr_d = np.array(list(_corr_d), dtype=dtype)
corr_d[key] = replace(d[key], array=_corr_d, ell=ell_mask)
# truncate
corr_d = binned(corr_d, np.arange(0, lmax + 1))
corr_d[key] = replace(d[key], array=_corr_d)
return corr_d