Skip to content

Commit

Permalink
Determine average full scan time based on all samples, not just one s…
Browse files Browse the repository at this point in the history
…ample.
  • Loading branch information
PMSeitzer committed Sep 12, 2019
1 parent c3cdf3f commit b63a6c6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/maven/peakdetectiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,15 @@ void PeakDetectionDialog::findPeaks() {
peakupdater->ppmMerge = ppmStep->value();
peakupdater->compoundPPMWindow = compoundPPMWindow->value();
peakupdater->compoundRTWindow = compoundRTWindow->value();
peakupdater->avgScanTime = samples[0]->getAverageFullScanTime();

float averageFullScanTime = 0;
for (auto sample : samples){
averageFullScanTime += sample->getAverageFullScanTime();
}
averageFullScanTime /= samples.size();

peakupdater->avgScanTime = averageFullScanTime;

peakupdater->rtStepSize = rtStep->value();
peakupdater->mustHaveMS2 = compoundMustHaveMS2->isChecked() || featureMustHaveMs2->isChecked();
peakupdater->productPpmTolr = productPpmTolr->value();
Expand Down

0 comments on commit b63a6c6

Please sign in to comment.