From 35c426bb1231aa2299cedfd4549777e5627116aa Mon Sep 17 00:00:00 2001 From: Rafat Hussain Date: Wed, 12 Oct 2016 15:10:33 +0530 Subject: [PATCH] COMMIT : ICWT (Approximate Rconstruction) modified to only support power of 2.0 scales --- src/wavelib.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wavelib.c b/src/wavelib.c index 565a74e..d33671c 100644 --- a/src/wavelib.c +++ b/src/wavelib.c @@ -1418,9 +1418,12 @@ void icwt(cwt_object wt, double *cwtop) { cdel = cdelta(wt->mother, wt->m, psi); //printf("\n PSI %g CDEL %g param %g mother %d \n", psi, cdel,wt->m,wt->mother); - - icwavelet(wt->params, N, wt->params+nj2, wt->J, wt->dt, wt->dj, cdel, psi, cwtop); - + if (!strcmp(wt->type, "pow") || !strcmp(wt->type, "power")) { + icwavelet(wt->params, N, wt->params+nj2, wt->J, wt->dt, wt->dj, cdel, psi, cwtop); + } else { + printf("Inverse CWT is only available for power of 2.0 scales \n"); + exit(-1); + } for(i = 0; i < N;++i) { cwtop[i] += wt->smean; }