From d73ab919573a75a0d2e8ed749e5d8e5b48736227 Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Thu, 21 Nov 2024 08:18:58 +0100 Subject: [PATCH] Use phase 0 for cos inData. --- applications/lofar2/model/pfb_bunton_annotated/reconstruct.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/lofar2/model/pfb_bunton_annotated/reconstruct.m b/applications/lofar2/model/pfb_bunton_annotated/reconstruct.m index b5df369180..19e03989e4 100644 --- a/applications/lofar2/model/pfb_bunton_annotated/reconstruct.m +++ b/applications/lofar2/model/pfb_bunton_annotated/reconstruct.m @@ -56,7 +56,7 @@ k = length(inData); % = len * Nhold % 3) sine wave signal %inData = cos(((1:k).^2 ) * len / (k)^2); %inData = cos(2*pi*(1:k) * 0.031 / 16); -%inData = cos(2*pi*(1:k) * 4.0 / Nfft); % use integer for CW at bin +%inData = cos(2*pi*(0:k-1) * 1.5 / Nfft); % use integer for CW at bin % 4) impulse signal if ImpulseResponse == 1 @@ -121,7 +121,7 @@ diff = outData - inData(1:length(outData)); % With DEVP = 0.005 and W0 = 1 / 15.05 then db(0.005) = -46.0 dB and SNR = % 38.8 dB, so increased. SNR = 10 * log10(sum(abs(inData(10000:70000) .^ 2)) / sum(abs(diff(10000:70000) .^ 2))); -sprintf('SNR = %6.2f [dB]', SNR) +sprintf('SNR = %.5f [dB]', SNR) %plot(diff) %plot(db(fft(outData))) %to see frequency error -- GitLab