41 const double noiseFactor = 666;
42 const unsigned int detectionRadius = 13;
45 unit_assert(pd->detectionRadius() == detectionRadius);
74 if (
os_) copy(fd.
data().begin(), fd.
data().end(), ostream_iterator<FrequencyDatum>(*
os_,
"\n"));
80 const double noiseFactor = 1;
83 pdn1->findPeaks(fd, pd.
scans[0]);
87 pdn2->findPeaks(fd, pd.
scans[1]);
91 pdn3->findPeaks(fd, pd.
scans[2]);
96 *
os_ <<
"pd:\n" << pd << endl;
98 for (
unsigned int i=0; i<pd.
scans.size(); i++)
100 *
os_ <<
"scan " << i <<
":\n";
114int main(
int argc,
char* argv[])
120 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
121 if (
os_) *
os_ <<
"PeakDetectorNaiveTest\n";
int main(int argc, char *argv[])
const unsigned int dataSize_
Class for binary storage of complex frequency data.
void analyze()
recache statistics calculations after any direct data changes via non-const data()
const container & data() const
const access to underlying data
static std::auto_ptr< PeakDetectorNaive > create(double noiseFactor=5, unsigned int detectionRadius=2)
create an instance.
SampleDatum< double, std::complex< double > > FrequencyDatum
std::vector< Scan > scans
#define TEST_PROLOG(argc, argv)