11#include "MantidAlgorithms/DllConfig.h"
12#include "MantidHistogramData/Histogram.h"
17namespace HistogramData {
29 const std::string
name()
const override {
return "FindPeakBackground"; }
31 const std::string
summary()
const override {
return "Separates background from signal for spectra of a workspace."; }
34 int version()
const override {
return 1; }
35 const std::vector<std::string>
seeAlso()
const override {
return {
"Fit"}; }
38 const std::string
category()
const override {
return "Utility\\Calculation"; }
41 void setSigma(
const double &
sigma);
44 void setBackgroundOrder(
size_t order);
47 void setFitWindow(
const std::vector<double> &window);
50 void findWindowIndex(
const HistogramData::Histogram &histogram,
size_t &l0,
size_t &
n);
53 int findBackground(
const HistogramData::Histogram &histogram,
const size_t &l0,
const size_t &
n,
54 std::vector<size_t> &peak_min_max_indexes, std::vector<double> &bkgd3);
63 double moment4(MantidVec &X,
size_t n,
double mean);
64 void estimateBackground(
const HistogramData::Histogram &histogram,
const size_t i_min,
const size_t i_max,
65 const size_t p_min,
const size_t p_max,
const bool hasPeak,
double &out_bg0,
double &out_bg1,
69 void processInputProperties();
72 void createOutputWorkspaces();
Base class for algorithms that can run in parallel on all MPI ranks but not in a distributed fashion.
FindPeakBackground : Calculate Zscore for a Matrix Workspace.
const std::string summary() const override
Summary of algorithms purpose.
API::MatrixWorkspace_const_sptr m_inputWS
Input workspace.
int version() const override
Algorithm's version for identification overriding a virtual method.
std::vector< double > m_vecFitWindows
fit window
double m_sigmaConstant
constant sigma
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
std::string m_backgroundType
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
size_t m_backgroundOrder
background order: 0 for flat, 1 for linear, 2 for quadratic
size_t m_inputWSIndex
workspace index
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
API::ITableWorkspace_sptr m_outPeakTableWS
output workspace (table of result)
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
Helper class which provides the Collimation Length for SANS instruments.
bool operator()(cont_peak const &a, cont_peak const &b)