From 138514e7945cb2fe424f5609e9ed7ffe42b0d5dd Mon Sep 17 00:00:00 2001 From: Cees Bassa Date: Tue, 27 Feb 2018 15:46:19 +0100 Subject: [PATCH] Add check to ensure channelsize and subint size result in an integer number of spectra per subint --- rffft.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rffft.c b/rffft.c index 459d386..9eb1517 100644 --- a/rffft.c +++ b/rffft.c @@ -123,6 +123,9 @@ int main(int argc,char *argv[]) return 0; } + // Ensure integer number of spectra per subintegration + tint=ceil(fchan*tint)/fchan; + // Number of channels nchan=(int) (samp_rate/fchan);