29 using namespace pwiz::util;
30 using namespace pwiz::frequency;
31 using namespace pwiz::chemistry;
32 using namespace pwiz::data;
33 using namespace pwiz::data::peakdata;
45 complex<double>(datum->real, datum->imaginary)));
55 if (
os_) *
os_ <<
"testCreation()\n";
56 const int filterMatchRate = 4;
57 const int filterSampleRadius = 2;
58 const double peakThresholdFactor = 0;
59 const double peakMaxCorrelationAngle = 5;
60 const double isotopeThresholdFactor = 666;
61 const double monoisotopicPeakThresholdFactor = 777;
72 auto_ptr<PeakDetectorMatchedFilter> pd = PeakDetectorMatchedFilter::create(config);
85 if (
os_) *
os_ <<
"testFind()\n";
104 auto_ptr<PeakDetectorMatchedFilter> pd = PeakDetectorMatchedFilter::create(config);
109 vector<PeakDetectorMatchedFilter::Score> scores;
115 *
os_ <<
"peaks found: " << data.
scans[0].peakFamilies.size() << endl;
117 *
os_ <<
"scores: " << scores.size() << endl;
118 copy(scores.begin(), scores.end(),
119 ostream_iterator<PeakDetectorMatchedFilter::Score>(*
os_,
"\n"));
126 if (
os_) *
os_ <<
"peakFamily: " << peakFamily << endl;
128 const Peak& peak = peakFamily.peaks[0];
135 unit_assert(score.monoisotopicFrequency == peak.getAttribute(Peak::Attribute_Frequency));
137 polar(peak.intensity, peak.getAttribute(Peak::Attribute_Phase))),
144 const double abundanceCutoff = .01;
145 const double massPrecision = .1;
157 if (
os_) *
os_ << setprecision(12);
166 testFind(fd, *isotopeEnvelopeEstimator);
170 int main(
int argc,
char* argv[])
176 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
177 if (
os_) *
os_ <<
"PeakDetectorMatchedFilterTest\n";