fisx: fisx_math.h Source File

fisx

fisx_math.h
1 #/*##########################################################################
2 #
3 # The fisx library for X-Ray Fluorescence
4 #
5 # Copyright (c) 2014-2016 European Synchrotron Radiation Facility
6 #
7 # This file is part of the fisx X-ray developed by V.A. Sole
8 #
9 # Permission is hereby granted, free of charge, to any person obtaining a copy
10 # of this software and associated documentation files (the "Software"), to deal
11 # in the Software without restriction, including without limitation the rights
12 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 # copies of the Software, and to permit persons to whom the Software is
14 # furnished to do so, subject to the following conditions:
15 #
16 # The above copyright notice and this permission notice shall be included in
17 # all copies or substantial portions of the Software.
18 #
19 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 # THE SOFTWARE.
26 #
27 #############################################################################*/
28 #ifndef FISX_DEBOER_H
29 #define FISX_DEBOER_H
30
31 namespace fisx
32 {
33
44 class Math
45 {
46 public:
58 static double E1(const double & x);
59
71 static double En(const int & n, const double & x);
72
73
81 static double deBoerD(const double & x);
82
83
92 static double deBoerL0(const double & mu1, const double & mu2, const double & muj, \
93 const double & density, const double & thickness);
94
95
105 static double deBoerX(const double & p, const double & q, \
106 const double & d1, const double & d2, \
107 const double & mu_1_j, const double & mu_2_j, \
108 const double & mu_b_j_d_t = 0.0);
109
110 static double deBoerV(const double & p, const double & q, \
111 const double & d1, const double & d2, \
112 const double & mu_1_j, const double & mu_2_j, \
113 const double & mu_b_j_d_t);
114
118 static bool isNumber(const double & x);
119
123 static bool isFiniteNumber(const double & x);
124
128 static double deBoerY(const double & a, const double & b, const double & c, const double & d);
129
133 static double deBoerW(const double & a, const double & b, const double & d);
134
140 static double AS_5_1_53(const double & x);
141
147 static double AS_5_1_56(const double & x);
148
152 static double getFWHM(const double & energy, const double & noise, \
153 const double & fano, const double & quantumEnergy = 0.00385);
154
158 static double erf(const double & x);
159
160
164 static double erfc(const double & x);
165
166 private:
176 static double _deBoerD(const double &x, \
177 const double & epsilon = 1.0e-7, \
178 const int & maxIter = 100);
179 };
180
181 } // namespace fisx
182
183 #endif // FISX_DEBOER_H
fisx::Math::AS_5_1_53
static double AS_5_1_53(const double &x)
Definition: fisx_math.cpp:115
fisx::Math::isNumber
static bool isNumber(const double &x)
Definition: fisx_math.cpp:494
fisx::Math::deBoerX
static double deBoerX(const double &p, const double &q, const double &d1, const double &d2, const double &mu_1_j, const double &mu_2_j, const double &mu_b_j_d_t=0.0)
Definition: fisx_math.cpp:315
fisx::Math::deBoerW
static double deBoerW(const double &a, const double &b, const double &d)
fisx
Definition: fisx_element.cpp:34
fisx::Math::deBoerD
static double deBoerD(const double &x)
Definition: fisx_math.cpp:159
fisx::Math::isFiniteNumber
static bool isFiniteNumber(const double &x)
Definition: fisx_math.cpp:499
fisx::Math::En
static double En(const int &n, const double &x)
Definition: fisx_math.cpp:85
fisx::Math::AS_5_1_56
static double AS_5_1_56(const double &x)
Definition: fisx_math.cpp:137
fisx::Math
Common fluorescence spectroscopy math functions.
Definition: fisx_math.h:44
fisx::Math::E1
static double E1(const double &x)
Definition: fisx_math.cpp:37
fisx::Math::deBoerL0
static double deBoerL0(const double &mu1, const double &mu2, const double &muj, const double &density, const double &thickness)
Definition: fisx_math.cpp:207
fisx::Math::erfc
static double erfc(const double &x)
Definition: fisx_math.cpp:583
fisx::Math::deBoerY
static double deBoerY(const double &a, const double &b, const double &c, const double &d)
fisx::Math::erf
static double erf(const double &x)
Definition: fisx_math.cpp:565
fisx::Math::getFWHM
static double getFWHM(const double &energy, const double &noise, const double &fano, const double &quantumEnergy=0.00385)
Definition: fisx_math.cpp:558