-
Notifications
You must be signed in to change notification settings - Fork 122
/
PoldiCalculateSpectrum2D.h
86 lines (60 loc) · 2.88 KB
/
PoldiCalculateSpectrum2D.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
#ifndef MANTID_SINQ_POLDICALCULATESPECTRUM2D_H_
#define MANTID_SINQ_POLDICALCULATESPECTRUM2D_H_
#include "MantidKernel/System.h"
#include "MantidSINQ/DllConfig.h"
#include "MantidAPI/Algorithm.h"
#include "MantidAPI/MultiDomainFunction.h"
#include "MantidDataObjects/TableWorkspace.h"
#include "MantidSINQ/PoldiUtilities/PoldiPeakCollection.h"
#include "MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h"
#include "MantidSINQ/PoldiUtilities/Poldi2DFunction.h"
namespace Mantid
{
namespace Poldi
{
/** PoldiCalculateSpectrum2D : TODO: DESCRIPTION
Copyright © 2014 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
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 MANTID_SINQ_DLL PoldiCalculateSpectrum2D : public API::Algorithm
{
public:
PoldiCalculateSpectrum2D();
virtual ~PoldiCalculateSpectrum2D();
virtual const std::string name() const;
virtual int version() const;
virtual const std::string category() const;
virtual const std::string summary() const;
protected:
PoldiPeakCollection_sptr getPeakCollection(DataObjects::TableWorkspace_sptr peakTable);
PoldiPeakCollection_sptr getIntegratedPeakCollection(PoldiPeakCollection_sptr rawPeakCollection);
PoldiPeakCollection_sptr getNormalizedPeakCollection(PoldiPeakCollection_sptr peakCollection);
boost::shared_ptr<Poldi2DFunction> getFunctionFromPeakCollection(PoldiPeakCollection_sptr peakCollection);
API::MatrixWorkspace_sptr calculateSpectrum(PoldiPeakCollection_sptr peakCollection, API::MatrixWorkspace_sptr matrixWorkspace);
void setTimeTransformerFromInstrument(PoldiInstrumentAdapter_sptr poldiInstrument);
void setTimeTransformer(PoldiTimeTransformer_sptr poldiTimeTransformer);
void setDeltaTFromWorkspace(API::MatrixWorkspace_sptr matrixWorkspace);
void setDeltaT(double newDeltaT);
bool isValidDeltaT(double deltaT);
void throwOnInsufficientState();
PoldiTimeTransformer_sptr m_timeTransformer;
double m_deltaT;
private:
void init();
void exec();
};
} // namespace Poldi
} // namespace Mantid
#endif /* MANTID_SINQ_POLDICALCULATESPECTRUM2D_H_ */