mirror of
https://github.com/simon987/wavelib.git
synced 2025-04-18 01:46:41 +00:00
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:
parent
0cbcb8b7d5
commit
fbbebc90f9
@ -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) {
|
double *wave, double *scale, double *period, double *coi) {
|
||||||
|
|
||||||
int i, j, k, iter;
|
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_object obj, iobj;
|
||||||
fft_data *ypad, *yfft,*daughter;
|
fft_data *ypad, *yfft,*daughter;
|
||||||
|
|
||||||
|
(void)s0; (void)dj; /* yes, we need these parameters unused */
|
||||||
|
|
||||||
pi = 4.0 * atan(1.0);
|
pi = 4.0 * atan(1.0);
|
||||||
|
|
||||||
if (npad < N) {
|
if (npad < N) {
|
||||||
@ -342,7 +344,7 @@ double cdelta(int mother, double param, double psi0 ) {
|
|||||||
scale[i] = s0*pow(2.0, (double)(i)*dj);
|
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) {
|
for (i = 0; i < N; ++i) {
|
||||||
mval[i] = 0;
|
mval[i] = 0;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#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);
|
double *wave, double *scale, double *period, double *coi);
|
||||||
|
|
||||||
void psi0(int mother, double param, double *val, int *real);
|
void psi0(int mother, double param, double *val, int *real);
|
||||||
|
@ -1413,7 +1413,7 @@ void cwt(cwt_object wt, const double *inp) {
|
|||||||
}
|
}
|
||||||
wt->smean /= N;
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user