#include "WireCellUtil/Waveform.h"
#include "WireCellUtil/Testing.h"
#include <iostream>
#include <algorithm>
#include <complex>
Go to the source code of this file.
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 72 of file test_waveform.cxx.
91 compseq_t cv{{1.1,2.2},{-3.3,4.4},{0,0},{1,0},{0,1},{-1,0},{0,-1}};
Definition at line 66 of file test_waveform.cxx.
68 Waveform::compseq_t cv{{1.1,2.2},{-3.3,4.4},{0,0},{1,0},{0,1},{-1,0},{0,-1}};
array_xxf idft(const array_xxc &arr)
Definition at line 47 of file test_waveform.cxx.
50 const int nbins = 360;
51 for (
int ind=0; ind<
nbins; ++ind) {
52 double phi = ind*3.1415/180.0;
58 for (
int ind=0; ind<
nbins; ++ind) {
62 cerr << s.size() <<
" " << spec.size() <<
endl;
internal::named_arg< T, char > arg(string_view name, const T &arg)
array_xxc dft(const array_xxf &arr)
QTextStream & endl(QTextStream &s)
Definition at line 36 of file test_waveform.cxx.
43 cerr <<
us.first <<
" +/- " <<
us.second <<
" med=" <<
m <<
endl;
double median(sqlite3 *db, std::string const &table_name, std::string const &column_name)
QTextStream & endl(QTextStream &s)
Definition at line 16 of file test_waveform.cxx.
18 const int baseline = 1000;
20 const int period = 10;
24 for (
int ind=0; ind<
nticks; ++ind) {
25 wf1[ind] = baseline + ind%period;
28 transform(wf1.begin(), wf1.end(), wf2.begin(),
29 [](
int x)->
int{
return x - baseline;});
31 for (
int ind=0; ind<
nticks; ++ind) {
32 Assert(wf1[ind]-baseline == wf2[ind]);
tagset_t transform(const tagset_t &ts, const ruleset_t &rs, bool all_rules=true)