Skip to content

Commit

Permalink
Minor change to normalize phi after averaging
Browse files Browse the repository at this point in the history
  • Loading branch information
DetectiveKiwi committed Nov 14, 2023
1 parent 49b9cb5 commit c48f129
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nsdmd/nsdmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ def get_soln(freqs, phis, idxs, t_len, windows, N, sr):
)[:, 0]
temp_ii = np.argwhere(loc_len == i)[:, 0][temp_i]
temp_pa = np.mean(np.abs(phis_init[:, temp]), axis=1)
temp_pa /= (np.sum(np.abs(temp_pa)**2, axis=1)**0.5)[:,None]
temp_pp = circmean(np.angle(phis_init[:, temp]), axis=1)
phis_all[:, temp_ii] = (temp_pa * np.exp(1j * temp_pp))[:, None, :]

Expand Down

0 comments on commit c48f129

Please sign in to comment.