libatomprobe
Library for Atom Probe Tomography (APT) computation
filter.h
Go to the documentation of this file.
1 /* filter.h: mass spectrum candidate filtering
2  * Copyright (C) 2020 Daniel Haley
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 #ifndef ATOMPROBE_MASS__FILTER_H
18 #define ATOMPROBE_MASS__FILTER_H
19 
20 #include <vector>
21 #include <utility>
22 
25 
26 namespace AtomProbe
27 {
28 
32 
38  const std::vector<float> &peakData, float tolerance,
39  size_t solutionCharge, std::vector<std::vector<AtomProbe::ISOTOPE_ENTRY> > &solutions);
40 
41 
43 
52 void filterBySolutionPPM(const AtomProbe::AbundanceData &massTable,
53  float minPpm, std::vector<std::vector<AtomProbe::ISOTOPE_ENTRY> > &solutions);
54 
56 
68 std::vector<float> maxExplainedFraction(const std::vector<std::pair<float,float> > &massData,
69  float peakMass, float massWidth, const std::vector<std::vector<AtomProbe::ISOTOPE_ENTRY> > &solutions,
70  const AtomProbe::AbundanceData &massTable, float massDistTol, unsigned int solutionCharge);
71 #ifdef DEBUG
72  bool isotopeFilterTests();
73 #endif
74 }
75 #endif
void filterPeakNeedBiggerObs(const AtomProbe::AbundanceData &massTable, const std::vector< float > &peakData, float tolerance, size_t solutionCharge, std::vector< std::vector< AtomProbe::ISOTOPE_ENTRY > > &solutions)
Definition: filter.cpp:119
void filterBySolutionPPM(const AtomProbe::AbundanceData &massTable, float minPpm, std::vector< std::vector< AtomProbe::ISOTOPE_ENTRY > > &solutions)
Use the maximum possible PPM for each isotopic combination to filter possible solutions.
Definition: filter.cpp:83
Class to load abundance information for natural isotopes.
Definition: abundance.h:54
std::vector< float > maxExplainedFraction(const std::vector< std::pair< float, float > > &massData, float peakMass, float massWidth, const std::vector< std::vector< AtomProbe::ISOTOPE_ENTRY > > &solutions, const AtomProbe::AbundanceData &massTable, float massDistTol, unsigned int solutionCharge)
Compute the fraction of the data that has been explained, using the natural abundance information...