Partially revert "const-correct cwt.c:cwavelet"

This reverts commit 0b5777fc4aa12d7c019cd01aa3f5885c47c0cae2.

> In cwt.h and cwt.c , s0 and dj are needed for reconstruction.
> Both of these variables may be needed if we are to add more wavelets.
This commit is contained in:
Ivan Krylov 2018-12-14 13:04:07 +03:00
parent 0cbcb8b7d5
commit fbbebc90f9
3 changed files with 6 additions and 4 deletions

View File

@ -118,7 +118,7 @@ static void wave_function(int nk, double dt,int mother, double param,double scal
}
}
void cwavelet(const double *y, int N, double dt, int mother, double param, int jtot, int npad,
void cwavelet(const double *y, int N, double dt, int mother, double param, double s0, double dj, int jtot, int npad,
double *wave, double *scale, double *period, double *coi) {
int i, j, k, iter;
@ -129,6 +129,8 @@ void cwavelet(const double *y, int N, double dt, int mother, double param, int j
fft_object obj, iobj;
fft_data *ypad, *yfft,*daughter;
(void)s0; (void)dj; /* yes, we need these parameters unused */
pi = 4.0 * atan(1.0);
if (npad < N) {
@ -342,7 +344,7 @@ double cdelta(int mother, double param, double psi0 ) {
scale[i] = s0*pow(2.0, (double)(i)*dj);
}
cwavelet(delta, N, dt, mother, param, jtot, N, wave, scale, period, coi);
cwavelet(delta, N, dt, mother, param, s0, dj, jtot, N, wave, scale, period, coi);
for (i = 0; i < N; ++i) {
mval[i] = 0;

View File

@ -7,7 +7,7 @@
extern "C" {
#endif
void cwavelet(const double *y, int N, double dt, int mother, double param, int jtot, int npad,
void cwavelet(const double *y, int N, double dt, int mother, double param, double s0, double dj, int jtot, int npad,
double *wave, double *scale, double *period, double *coi);
void psi0(int mother, double param, double *val, int *real);

View File

@ -1413,7 +1413,7 @@ void cwt(cwt_object wt, const double *inp) {
}
wt->smean /= N;
cwavelet(inp, N, wt->dt, wt->mother, wt->m, wt->J,npad,wt->params, wt->params+nj2, wt->params+nj2+j, wt->params+nj2+j2);
cwavelet(inp, N, wt->dt, wt->mother, wt->m, wt->s0,wt->dj,wt->J,npad,wt->params, wt->params+nj2, wt->params+nj2+j, wt->params+nj2+j2);
}