-
Notifications
You must be signed in to change notification settings - Fork 122
/
PoldiFitPeaks1D.h
63 lines (50 loc) · 2.12 KB
/
PoldiFitPeaks1D.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
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2014 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 +
#pragma once
#include "MantidAPI/Algorithm.h"
#include "MantidKernel/System.h"
#include "MantidAPI/IPeakFunction.h"
#include "MantidAPI/TableRow.h"
#include "MantidDataObjects/TableWorkspace.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidSINQ/DllConfig.h"
#include "MantidSINQ/PoldiUtilities/PoldiPeakCollection.h"
namespace Mantid {
namespace Poldi {
/** PoldiFitPeaks1D :
PoldiFitPeaks1D fits multiple peaks to POLDI auto-correlation data.
@author Michael Wedel, Paul Scherrer Institut - SINQ
@date 17/03/2014
*/
class MANTID_SINQ_DLL PoldiFitPeaks1D : public API::Algorithm {
public:
const std::string name() const override;
/// Summary of algorithms purpose
const std::string summary() const override {
return "PoldiPeakFit1D fits peak profiles to POLDI auto-correlation data.";
}
int version() const override;
const std::string category() const override;
protected:
void setPeakFunction(const std::string &peakFunction);
PoldiPeakCollection_sptr getInitializedPeakCollection(const DataObjects::TableWorkspace_sptr &peakTable) const;
API::IFunction_sptr getPeakProfile(const PoldiPeak_sptr &poldiPeak) const;
void setValuesFromProfileFunction(const PoldiPeak_sptr &poldiPeak, const API::IFunction_sptr &fittedFunction) const;
double getFwhmWidthRelation(const API::IPeakFunction_sptr &peakFunction) const;
API::IAlgorithm_sptr getFitAlgorithm(const DataObjects::Workspace2D_sptr &dataWorkspace, const PoldiPeak_sptr &peak,
const API::IFunction_sptr &profile);
PoldiPeakCollection_sptr m_peaks;
std::string m_profileTemplate;
API::IFunction_sptr m_backgroundTemplate;
std::string m_profileTies;
double m_fwhmMultiples{1.0};
private:
void init() override;
void exec() override;
};
} // namespace Poldi
} // namespace Mantid