libatomprobe
Library for Atom Probe Tomography (APT) computation
deconvolution.h
Go to the documentation of this file.
1 
2 /* axialdf.h : Axial distribution function routines
3  * Copyright (C) 2014 Daniel Haley
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 #ifndef ATOMPROBE_DECONVOLUTION_H
19 #define ATOMPROBE_DECONVOLUTION_H
20 #include <vector>
21 #include <utility>
22 
25 
26 namespace AtomProbe
27 {
28 
30  // Returns false if overlap cannot be uniquely solved (e.g. rank deficient/multiple solutions)
31  // return vector contains pairs of ionID, and number of hits.
32  // - Background estimation provided by the background estimator
33  // function. This will subtract the estimated counts from each range
34  // given in the supplied function (startMass,endMass). If the
35  // function given is null, then background estimation will not be used.
36  bool leastSquaresOverlapSolve(const AtomProbe::MultiRange &rangeData, const AtomProbe::AbundanceData &abundance,
37  const std::vector<IonHit> &hits, float (*backgroundEstimator)(float,float),
38  std::vector<std::pair<unsigned int,float> > &decomposedHits, float rangeTolerance=0);
39 
40 
41 #ifdef DEBUG
42  bool testDeconvolve();
43 #endif
44 
45 }
46 
47 #endif
Data storage and retrieval class for "ranging" a spectra, where overlapping ranges are permitted...
Definition: multiRange.h:63
Class to load abundance information for natural isotopes.
Definition: abundance.h:54
bool leastSquaresOverlapSolve(const AtomProbe::MultiRange &rangeData, const AtomProbe::AbundanceData &abundance, const std::vector< IonHit > &hits, float(*backgroundEstimator)(float, float), std::vector< std::pair< unsigned int, float > > &decomposedHits, float rangeTolerance=0)
Solve overlaps using least squares for given multi-range.