Go to the documentation of this file.
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;
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";
std::complex< double > monoisotopicIntensity
const container & data() const
const access to underlying data
std::ostream * log
log stream (0 == no logging)
#define unit_assert_equal(x, y, epsilon)
const double testDataCalibrationB_
double observationDuration() const
virtual void findPeaks(const pwiz::data::FrequencyData &fd, pwiz::data::peakdata::Scan &result) const =0
Find the peaks in the frequency data, filling in Scan structure.
double collapseRadius
multiple peaks within this radius (Hz) are reported as single peak
void testCreation(const IsotopeEnvelopeEstimator &isotopeEnvelopeEstimator)
auto_ptr< IsotopeEnvelopeEstimator > createIsotopeEnvelopeEstimator()
int isotopeMaxChargeState
isotope filter maximum charge state to score
Class for binary storage of complex frequency data.
int logDetailLevel
log detail level (0 == normal, 1 == extra)
const double testDataObservationDuration_
Class used for calculating a theoretical isotope envelope for a given mass, based on an estimate of t...
const unsigned int testDataSize_
int isotopeMaxNeutronCount
isotope filter maximum number of neutrons to score
double peakMaxCorrelationAngle
maximum correlation angle (degrees) for initial peak reporting
double peakThresholdFactor
noise floor multiple for initial peak reporting threshold
int filterMatchRate
number of filter correlations computed per frequency step
std::vector< Peak > peaks
int filterSampleRadius
number of filter samples taken on either side of 0
const IsotopeCalculator * isotopeCalculator
const double testDataCalibrationA_
void testFind(FrequencyData &fd, const IsotopeEnvelopeEstimator &isotopeEnvelopeEstimator)
virtual const Config & config() const =0
access to the configuration
#define TEST_PROLOG(argc, argv)
double getAttribute(Attribute attribute) const
void initializeWithTestData(FrequencyData &fd)
double monoisotopicFrequency
structure for holding the matched filter calculation results
SampleDatum< double, std::complex< double > > FrequencyDatum
std::vector< Scan > scans
const chemistry::IsotopeEnvelopeEstimator * isotopeEnvelopeEstimator
IsotopeEnvelopeEstimator pointer, must be valid for PeakDetector lifetime.
int main(int argc, char *argv[])
const CalibrationParameters & calibrationParameters() const
void analyze()
recache statistics calculations after any direct data changes via non-const data()
bool useMagnitudeFilter
use the magnitude of the peak shape filter kernel for finding peaks
double monoisotopicPeakThresholdFactor
noise floor multiple for monoisotopic peak threshold
double isotopeThresholdFactor
noise floor multiple for isotope filter threshold
structure for holding configuration