Functions
test_simple_channel_noisedb.cxx File Reference
#include "WireCellUtil/Testing.h"
#include "WireCellSigProc/SimpleChannelNoiseDB.h"
#include "WireCellUtil/Units.h"
#include <iostream>

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

int main ( void  )

Definition at line 12 of file test_simple_channel_noisedb.cxx.

13 {
14  const int nsamples = 5432;
15  const double tick = 1.0*units::ms;
16 
17  SimpleChannelNoiseDB cndb(tick, nsamples);
18 
19  Assert(cndb.sample_time() == tick);
20  Assert(cndb.nominal_baseline(0) == 0.0);
21  Assert(cndb.gain_correction(0) == 1.0);
22 
23  auto rcrc0 = cndb.rcrc(0);
24  auto config0 = cndb.config(0);
25  auto noise0 = cndb.noise(0);
26 
27  cerr << rcrc0.size() << endl;
28 
29  Assert(rcrc0.size() == nsamples);
30  Assert(config0.size() == nsamples);
31  Assert(noise0.size() == nsamples);
32 
33  cndb.set_gains_shapings({0,1,2,3});
34 
35  auto config1 = cndb.config(1);
36  cerr << config1.size() << endl;
37  Assert(config1.size() == nsamples);
38 
39  return 0;
40 }
const double tick
#define Assert
Definition: Testing.h:7
static const double ms
Definition: Units.h:100
QTextStream & endl(QTextStream &s)