Skip to content
Snippets Groups Projects
Commit dd83cb0c authored by Kipp Cannon's avatar Kipp Cannon Committed by Kipp Cannon
Browse files

reference_psd: fix weirdness in PSDFirKernel

- if a Nyquist override is provided the reported sample rate would be tied to that value instead of the actual frequency bins in the PSD that are used (as it would be without an override).  this patch fixes
parent f8d45f86
No related branches found
No related tags found
No related merge requests found
......@@ -491,9 +491,10 @@ class PSDFirKernel(object):
#
if nyquist is not None:
assert nyquist <= sample_rate / 2.
sample_rate = nyquist * 2
data = data[:int(nyquist / psd.deltaF) + 1]
i = int(round((nyquist * 2. - psd.f0) / psd.deltaF))
assert i < len(data)
data = data[:i + 1]
sample_rate = 2 * int(round(psd.f0 + (len(data) - 1) * psd.deltaF))
#
# compute the FIR kernel. it always has an odd number of
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment