-
Notifications
You must be signed in to change notification settings - Fork 122
/
StripVanadiumPeaks.h
73 lines (64 loc) · 2.3 KB
/
StripVanadiumPeaks.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
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
/*
* StripVanadiumPeaks.h
*
* Created on: Sep 10, 2010
* Author: janik
*/
#pragma once
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidAPI/Algorithm.h"
#include "MantidAPI/ITableWorkspace_fwd.h"
#include "MantidAlgorithms/DllConfig.h"
namespace Mantid {
namespace Algorithms {
/** StripVanadiumPeaks algorithm
This algorithm takes a list of peak centers (or uses a default one for
Vanadium peaks)
and cuts them out by performing a linear fit of the Y values to the left and
right of the peak:
- The center of the peak C is specified in d-spacing.
- A peak width W is specified as a percentage of the d-spacing at the peak
center.
- A width of W/2 is averaged on the left and right sides, centered at C +-
W/2.
- A linear fit is made from those two value.
- The Y values between C-W/2 and C+W/2 are filled in with the result of the
fit.
@author Janik Zikovsky, SNS
@date 2010-09-10
*/
class MANTID_ALGORITHMS_DLL StripVanadiumPeaks : public API::Algorithm {
public:
/// (Empty) Constructor
StripVanadiumPeaks();
/// Algorithm's name
const std::string name() const override { return "StripVanadiumPeaks"; }
/// Summary of algorithms purpose
const std::string summary() const override {
return "This algorithm removes peaks (at vanadium d-spacing positions by "
"default) out of a background by linearly interpolating over the "
"expected peak positions.";
}
/// Algorithm's version
int version() const override { return (1); }
/// Algorithm's category for identification
const std::string category() const override {
return "CorrectionFunctions\\PeakCorrections;Optimization\\PeakFinding;"
"Diffraction\\Corrections";
}
private:
/// Initialisation code
void init() override;
/// Execution code
void exec() override;
};
} // namespace Algorithms
} // namespace Mantid