Skip to content
Open
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
6 changes: 3 additions & 3 deletions R/multitaperHelper.R
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, d_k(f) is defined in equation 5.2. |d_k(f)|^2 is the weight in equation 5.3.

Line 75 should read:
## note that the weights are squared, they are |d_k(f)|^2 from equation
## (5.3)

Perhaps I need to do a second PR?

Copy link
Author

@ashimkapoor ashimkapoor Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have done a second commit to perfect this.

Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@
var, dt_, ev, evp=(1-ev),
tol=.03, maxadaptiveiteration=100) {

## this is equation (5.3) and (5.4) form
## this is equation (5.2) and (5.3) from
## Thomson, D.J. Spectrum Estimation and Harmonic Analysis,
## Proceedings of the IEEE, 1982.
## note that the weights are squared, they are |d_k(f)^2 from equation
## (5.4)
## note that the weights are squared, they are |d_k(f)|^2 from equation
## (5.3)

out <- .Fortran("mw2wta", as.double(sa),
wt=matrix(as.double(0), nfreq, nord),
Expand Down