From 2b88a9eb528a8168ccac188841edb3de5d45e0d2 Mon Sep 17 00:00:00 2001 From: "J.A. de Jong" Date: Sun, 17 Oct 2021 14:00:16 +0200 Subject: [PATCH] Bugfix in fft.c, forgot some defines --- lasp/c/lasp_fft.c | 6 +++--- lasp/c/lasp_mq.c | 8 ++++---- lasp/wrappers.pyx | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lasp/c/lasp_fft.c b/lasp/c/lasp_fft.c index f238083..46eeec5 100644 --- a/lasp/c/lasp_fft.c +++ b/lasp/c/lasp_fft.c @@ -28,7 +28,7 @@ typedef struct Fft_s { d* real_storage; } Fft_s; #else -#error "Cannot compile lasp_ffc.c, no FFT backend specified" +#error "Cannot compile lasp_ffc.c, no FFT backend specified. Should either be FFTPack, or FFTW" #endif void load_fft_wisdom(const char* wisdom) { @@ -130,7 +130,7 @@ void Fft_ifft_single(const Fft* fft,const vc* freqdata,vd* result) { getvdval(&fft->fft_work,0)); -#elif defined LASP_FFT_BACKEND_FFTW +#elif LASP_FFT_BACKEND == FFTW c* freqdata_ptr = (c*) getvcval(freqdata,0); c_copy(fft->complex_storage, freqdata_ptr,nfft/2+1); @@ -219,7 +219,7 @@ void Fft_fft_single(const Fft* fft,const vd* timedata,vc* result) { result_ptr[nfft+1] = 0; } check_overflow_vx(fft->fft_work); -#elif defined LASP_FFT_BACKEND_FFTW +#elif LASP_FFT_BACKEND == FFTW d* timedata_ptr = getvdval(timedata,0); c* result_ptr = getvcval(result,0); diff --git a/lasp/c/lasp_mq.c b/lasp/c/lasp_mq.c index 8e96130..b5031f9 100644 --- a/lasp/c/lasp_mq.c +++ b/lasp/c/lasp_mq.c @@ -96,10 +96,10 @@ void print_job_queue(JobQueue* jq) { JobQueue* JobQueue_alloc(const us max_jobs) { TRACE(15,"JobQueue_alloc"); - if(max_jobs > LASP_MAX_NUM_CHANNELS) { - WARN("Max jobs restricted to LASP_MAX_NUM_CHANNELS"); - return NULL; - } + /* if(max_jobs > LASP_MAX_NUM_CHANNELS) { */ + /* WARN("Max jobs restricted to LASP_MAX_NUM_CHANNELS"); */ + /* return NULL; */ + /* } */ JobQueue* jq = a_malloc(sizeof(JobQueue)); diff --git a/lasp/wrappers.pyx b/lasp/wrappers.pyx index f7620c8..444bf49 100644 --- a/lasp/wrappers.pyx +++ b/lasp/wrappers.pyx @@ -449,7 +449,7 @@ cdef class SosFilterBank: """ if sos.shape[0] != self.nsections: - raise RuntimeError('Invalid number of sections in filter data, should be {self.nsections.}') + raise RuntimeError(f'Invalid number of sections in filter data, should be {self.nsections}.') elif sos.shape[1] != 6: raise RuntimeError('Illegal number of filter coefficients in section. Should be 6.') cdef dmat coefs = dmat_foreign_data(sos.size,1,