12#include "MantidAlgorithms/DllConfig.h"
13#include "MantidHistogramData/Histogram.h"
21namespace PeakParameterHelper {
25template <
typename vector_like>
26MANTID_ALGORITHMS_DLL
size_t findXIndex(
const vector_like &vecx,
const double x,
const size_t startindex = 0);
31 size_t stop_index,
double &peak_center,
size_t &peak_center_index,
35MANTID_ALGORITHMS_DLL
double observePeakFwhm(
const HistogramData::Histogram &histogram,
38 const double peakWidthPercentage);
41MANTID_ALGORITHMS_DLL
int
45 const double peakWidthPercentage,
const double minPeakHeight);
A class to store values calculated by a function.
std::shared_ptr< IBackgroundFunction > IBackgroundFunction_sptr
std::shared_ptr< IPeakFunction > IPeakFunction_sptr
MANTID_ALGORITHMS_DLL double observePeakFwhm(const HistogramData::Histogram &histogram, const API::FunctionValues &bkgd_values, size_t ipeak, size_t istart, size_t istop, const EstimatePeakWidth peakWidthEstimateApproach, const double peakWidthPercentage)
Observe peak width.
MANTID_ALGORITHMS_DLL int observePeakCenter(const HistogramData::Histogram &histogram, const API::FunctionValues &bkgd_values, size_t start_index, size_t stop_index, double &peak_center, size_t &peak_center_index, double &peak_height)
observe peak center
MANTID_ALGORITHMS_DLL size_t findXIndex(const vector_like &vecx, const double x, const size_t startindex=0)
Get an index of a value in a sorted vector.
MANTID_ALGORITHMS_DLL int estimatePeakParameters(const HistogramData::Histogram &histogram, const std::pair< size_t, size_t > &peak_window, const API::IPeakFunction_sptr &peakfunction, const API::IBackgroundFunction_sptr &bkgdfunction, bool observe_peak_width, const EstimatePeakWidth peakWidthEstimateApproach, const double peakWidthPercentage, const double minPeakHeight)
Estimate peak parameters by 'observation'.
Helper class which provides the Collimation Length for SANS instruments.