The cutoff is a number between 0 and 0.5. I wrote in the docstring this is a fraction of the Nyquist frequency, because that's the closest interpretation, but the code is doing this:
discrete_cutoff = int(high_freq_cutoff*N)
omega[discrete_cutoff:N-discrete_cutoff] = 0
That means if the discrete cutoff is 1/2, we zero out nothing. But Nyquist is at $N/2$, not $N$. More sensible would be to rescale this parameter so it actually is a fraction of Nyquist and modify the code to be:
discrete_cutoff = int(high_freq_cutoff*N/2) # Nyquist is at N/2 location, and we're cutting off as a fraction of that
omega[discrete_cutoff:N-discrete_cutoff] = 0
I'll cook it up.
The cutoff is a number between 0 and 0.5. I wrote in the docstring this is a fraction of the Nyquist frequency, because that's the closest interpretation, but the code is doing this:
That means if the discrete cutoff is 1/2, we zero out nothing. But Nyquist is at$N/2$ , not $N$ . More sensible would be to rescale this parameter so it actually is a fraction of Nyquist and modify the code to be:
I'll cook it up.