coherent WaveBurst
Library Reference Guide
cWB Home
cWB Documentation
Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
u
w
+
Variables
a
b
c
d
e
f
g
h
i
j
l
m
o
p
r
s
t
u
v
w
z
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
0
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
0
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
+
Files
File List
+
File Members
+
All
1
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
x
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
a
b
c
d
e
f
g
h
i
l
m
o
r
s
w
x
+
Macros
1
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
y
z
ROOT
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
home
cWB_docker
git
cWB
library
tools
cwb
tutorials
TestReadWaveform.C
Go to the documentation of this file.
1
{
2
//
3
// Read & Draw Waveforms
4
// Author : Gabriele Vedovato
5
6
CWB::mdc
MDC
;
7
8
wavearray<double>
x
;
9
//MDC.ReadWaveform(x,"Waveforms/s11.2.h.dat");
10
//MDC.ReadWaveform(x,"Waveforms/data.GRW.md.h10kpc.15_3.2.txt");
11
MDC.
ReadWaveform
(x,
"Waveforms/SG554Q8d9.txt"
,16384.);
12
13
cout << x.
size
() <<
" "
<< x.
start
() <<
" "
<< x.
rate
() << endl;
14
15
double
hrss
=0;
16
for
(
int
i
=0;
i
<x.
size
();
i
++) hrss+=x[
i
]*x[
i
];
17
hrss=sqrt(hrss/x.
rate
());
18
for
(
int
i
=0;
i
<x.
size
();
i
++) x[
i
]/=hrss;
19
20
21
//MDC.Dump("TEST_WF_DUMP.txt",x);
22
23
//MDC.Draw(x);
24
//MDC.Draw(x,MDC_FFT);
25
MDC.
Draw
(x,
MDC_TF
);
26
27
//exit(0);
28
}
x
wavearray< double > x
Definition:
TestReadWaveform.C:1
CWB::mdc::Draw
watplot * Draw(TString name, int id=0, TString polarization="hp", MDC_DRAW type=MDC_TIME, TString options="ALP", Color_t color=kBlack)
Definition:
mdc.cc:2317
wavearray::rate
virtual void rate(double r)
Definition:
wavearray.hh:141
wavearray< double >
MDC
CWB::mdc * MDC
Definition:
CWB_Plugin_HEN_SIM_Config.C:84
wavearray::start
virtual void start(double s)
Definition:
wavearray.hh:137
i
i drho i
Definition:
cwb_epparameters.C:88
MDC_TF
Definition:
mdc.hh:204
wavearray::size
virtual size_t size() const
Definition:
wavearray.hh:145
hrss
double hrss
Definition:
TestMDC.C:70
CWB::mdc
Definition:
mdc.hh:248
CWB::mdc::ReadWaveform
void ReadWaveform(wavearray< double > &x, TString fName, double srate)
Definition:
mdc.cc:1877