Logo coherent WaveBurst  
Library Reference Guide
Logo
numpy.hh
Go to the documentation of this file.
1 /*
2 # Copyright (C) 2019 Sergey Klimenko, Valentin Necula
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17 
18 
19 #ifndef NUMPY_HH
20 #define NUMPY_HH
21 
22 #include "math.h"
23 
24 double interp(double v, double* x, double* y, int n);
25 double interp(double v, double* x, double* y, int n, double left, double right);
26 
27 double* interp(double* v, int Nv, double* x, double* y, int n, double left, double right);
28 
29 class Complex{
30 public:
31  Complex(double r=0., double i=0.){ a = r; b = i;}
32  double Re() const{ return a;};
33  double Im() const{ return b;};
34 private:
35  double a, b;
36 };
37 
38 
39 Complex operator+(const Complex& x, const Complex& y);
40 
41 Complex operator*(const Complex& x, const Complex& y);
42 
43 Complex Exp(double phase);
44 
45 double fabs(const Complex& x);
46 
47 #endif
Complex(double r=0., double i=0.)
Definition: numpy.hh:31
double b
Definition: numpy.hh:33
double Im() const
Definition: numpy.hh:33
Complex operator+(const Complex &x, const Complex &y)
Definition: numpy.cc:43
WSeries< float > v[nIFO]
Definition: cwb_net.C:80
int n
Definition: cwb_net.C:28
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1) *itime+ifreq;double time=itime *dT;double freq=(ifreq >0) ? ifreq *dF :dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
double phase
i drho i
double a
Definition: numpy.hh:33
double interp(double v, double *x, double *y, int n)
Definition: numpy.cc:21
regression r
Definition: Regression_H1.C:44
Complex operator*(const Complex &x, const Complex &y)
Definition: numpy.cc:47
Complex Exp(double phase)
Definition: numpy.cc:51
double fabs(const Complex &x)
Definition: numpy.cc:55
wavearray< double > y
Definition: Test10.C:31
double Re() const
Definition: numpy.hh:32
Definition: numpy.hh:29