14#include "MantidAlgorithms/DllConfig.h"
31 const std::string
name()
const override {
return "GeneratePeaks"; }
33 const std::string
summary()
const override {
34 return "Generate peaks in an output workspace according to a "
35 "TableWorkspace containing a list of peak's parameters.";
39 int version()
const override {
return 1; }
40 const std::vector<std::string>
seeAlso()
const override {
return {
"FindPeaks",
"MatchPeaks"}; }
42 const std::string
category()
const override {
return "Crystal\\Peaks"; }
51 void processAlgProperties(std::string &peakfunctype, std::string &bkgdfunctype);
54 void processTableColumnNames();
56 void importPeaksFromTable(std::map<
specnum_t, std::vector<std::pair<double, API::IFunction_sptr>>> &functionmap);
59 void importPeakFromVector(std::vector<std::pair<double, API::IFunction_sptr>> &functionmap);
62 void generatePeaks(
const std::map<
specnum_t, std::vector<std::pair<double, API::IFunction_sptr>>> &functionmap,
73 void createFunction(std::string &peaktype, std::string &bkgdtype);
81 std::vector<std::string> addFunctionParameterNames(
const std::vector<std::string> &funcnames);
132 int i_height, i_centre, i_width,
i_a0, i_a1, i_a2;
Base class from which all concrete algorithm classes should be derived.
GeneratePeaks : Generate peaks from a table workspace containing peak parameters.
API::IBackgroundFunction_sptr m_bkgdFunction
Background function.
std::set< specnum_t > m_spectraSet
Set of spectra (workspace indexes) in the original workspace that contain peaks to generate.
int m_wsIndex
Spectrum if only 1 peak is to plot.
const std::string summary() const override
Summary of algorithms purpose.
std::vector< double > m_vecPeakParamValues
bool m_useFuncParamWS
Flag to use parameter table workspace.
std::map< specnum_t, specnum_t > m_SpectrumMap
Spectrum map from full spectra workspace to partial spectra workspace.
API::MatrixWorkspace_const_sptr inputWS
Input workspace (optional)
double m_maxChi2
Maximum chi-square to have peak generated.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
std::vector< std::string > m_funcParameterNames
List of functions' parameters naems.
bool m_useRawParameter
Flag to indicate parameter table workspace containing raw parameters names.
std::vector< double > binParameters
Binning parameters.
API::IPeakFunction_sptr m_peakFunction
Peak function.
bool m_newWSFromParent
Flag whether the new workspace is exactly as input.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
bool m_useAutoBkgd
Flag to use automatic background (???)
bool m_genBackground
Flag to generate background.
int version() const override
Algorithm's version for identification overriding a virtual method.
std::vector< double > m_vecBkgdParamValues
double m_numPeakWidth
Number of FWHM for peak to extend.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
DataObjects::TableWorkspace_sptr m_funcParamWS
Parameter table workspace.
std::shared_ptr< IBackgroundFunction > IBackgroundFunction_sptr
std::shared_ptr< IPeakFunction > IPeakFunction_sptr
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
std::shared_ptr< const TableWorkspace > TableWorkspace_const_sptr
shared pointer to Mantid::DataObjects::TableWorkspace (const version)
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.