test_fft_window.cxx
Go to the documentation of this file.
2 
3 #include <iostream>
4 #include <vector>
5 
6 using namespace WireCell;
7 
8 int main(int argc, char** argv){
9  std::vector<std::size_t> lengths{ 2, 4, 8, 16, 32, 64, 128, 256,
10  400,480, // protoDUNE U/V and W channels per plane
11  512,
12  800, // protoDUNE, sum of U or V channels for both faces
13  960, // protoDUNE, sum of W channels (or wires) for both faces
14  1024,
15  1148, // N wires in U/V plane for protodune
16  2048,
17  2400, // number of channels in U or V in microboone
18  2560, // DUNE, total APA channels
19  3456, // number of channels in microboone's W
20  4096,
21  6000, // one choice of nticks for protoDUNE
22  8192,
23  8256, // total microboone channels
24  9592,9594,9595,9600, // various microboone readout lengths
25  9892, // ?
26  10000, // 5 ms at 2MHz readout
27  10240,
28  16384};
29 
30  for (auto len : lengths) {
31  for (auto add : {-1,0,1}) {
32  const size_t ini = len + add;
33  const size_t t = fft_best_length(ini, true);
34  const size_t f = fft_best_length(ini, false);
35  std::cout << ini << " " << t << " " << f << std::endl;
36  }
37  }
38  std::cout << "<num> <keep=true> <keep=false>\n";
39  return 0;
40 }
std::size_t fft_best_length(size_t nsamples, bool keep_odd_even=false)
Coord add(Coord c1, Coord c2)
Definition: restypedef.cpp:23
int main(int argc, char **argv)
Definition: Main.h:22
QTextStream & endl(QTextStream &s)