-
Notifications
You must be signed in to change notification settings - Fork 122
/
FlatPlateAbsorption.h
114 lines (97 loc) · 4.6 KB
/
FlatPlateAbsorption.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#ifndef MANTID_ALGORITHMS_FLATPLATEABSORPTION_H_
#define MANTID_ALGORITHMS_FLATPLATEABSORPTION_H_
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidAlgorithms/AbsorptionCorrection.h"
namespace Mantid {
namespace Algorithms {
/** Calculates attenuation due to absorption and scattering in a flat plate/slab
sample.
Properties:
<UL>
<LI> InputWorkspace - The name of the input workspace. </LI>
<LI> OutputWorkspace - The name of the output workspace. Can be the same as
the input one. </LI>
<LI> AttenuationXSection - The attenuation cross-section for the sample
material in barns. </LI>
<LI> ScatteringXSection - The scattering cross-section for the sample
material in barns. </LI>
<LI> SampleNumberDensity - The number density of the sample in
Angstrom^-3.</LI>
<LI> NumberOfWavelengthPoints - The number of wavelength points for which
numerical integral is calculated (default: all points). </LI>
<LI> ExpMethod - The method to calculate exponential function (Normal or
Fast approximation). </LI>
<LI> SampleHeight - The height of the sample in centimetres. </LI>
<LI> SampleWidth - The width of the sample in centimetres. </LI>
<LI> SampleThickness - The thickness of the sample in centimetres. </LI>
<LI> Emode - The energy mode (0=elastic, 1=direct geometry, 2=indirect
geometry) </LI>
<LI> Efixed - Value of fixed energy: EI (emode=1) or EF (emode=2) (meV)
</LI>
<LI> ElementSize - The side dimension of an integration element cube in mm
(default: 1). </LI>
</UL>
This algorithm uses numerical integration method to calculate attenuation
factors
resulting from absorption and single scattering in a flat plate sample with
the dimensions
and material properties given. Factors are calculated for each spectrum
(i.e. detector position)
and wavelength point, as defined by the input workspace.
The sample is divided up into a small cubes and thenpath lengths through the
sample are
calculated for the centre-point of each element and a numerical
integration is carried out using these path lengths over the volume
elements.
@author Russell Taylor, Tessella plc
@date 15/01/2010
Copyright © 2010 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport FlatPlateAbsorption : public AbsorptionCorrection {
public:
/// (Empty) Constructor
FlatPlateAbsorption();
/// Algorithm's name
const std::string name() const override { return "FlatPlateAbsorption"; }
/// Summary of algorithms purpose
const std::string summary() const override {
return "Calculates bin-by-bin correction factors for attenuation due to "
"absorption and scattering in a sample of 'flat plate' geometry.";
}
/// Algorithm's version
int version() const override { return (1); }
protected:
void initialiseCachedDistances() override;
private:
void defineProperties() override;
void retrieveProperties() override;
std::string sampleXML() override;
double m_slabHeight; ///< The height of the sample in m
double m_slabWidth; ///< The width of the sample in m
double m_slabThickness; ///< The thickness of the sample in m
int m_numXSlices; ///< The number of slices in X
int m_numYSlices; ///< The number of slices in Y
int m_numZSlices; ///< The number of slices in Z
double m_XSliceThickness; ///< The thickness of an X slice in m
double m_YSliceThickness; ///< The thickness of a Y slice in m
double m_ZSliceThickness; ///< The thickness of a Z slice in m
};
} // namespace Algorithms
} // namespace Mantid
#endif /* MANTID_ALGORITHMS_FLATPLATEABSORPTION_H_*/