def compute_b(G_lst, GtG_lst, beta_lst, Rc0, num_bands, a_ri):
"""
compute the uniform sinusoidal samples b from the updated annihilating
filter coeffiients.
:param GtG_lst: list of G^H G for different subbands
:param beta_lst: list of beta-s for different subbands
:param Rc0: right-dual matrix, here it is the convolution matrix associated with c
:param num_bands: number of bands
:param L: size of b: L by 1
:param a_ri: a 2D numpy array. each column corresponds to the measurements within a subband
:return:
"""
b_lst = []
a_Gb_lst = []
for loop in range(num_bands):
GtG_loop = GtG_lst[loop]
beta_loop = beta_lst[loop]
b_loop = beta_loop - \
linalg.solve(GtG_loop,
np.dot(Rc0.T,
linalg.solve(np.dot(Rc0, linalg.solve(GtG_loop, Rc0.T)),
np.dot(Rc0, beta_loop)))
)
b_lst.append(b_loop)
a_Gb_lst.append(a_ri[:, loop] - np.dot(G_lst[loop], b_loop))
return np.column_stack(b_lst), linalg.norm(np.concatenate(a_Gb_lst))
评论列表
文章目录