Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::CurveFitting::Algorithms::ChiSlice Class Reference

Helper class to calculate the chi squared along a direction in the parameter space. More...

Public Member Functions

 ChiSlice (IFunction_sptr inputFunction, int fixedParameterIndex, API::MatrixWorkspace_sptr inputWS, int workspaceIndex, const API::FunctionDomain &domain, API::FunctionValues &values, double chi0, std::vector< int > &freeParameters)
 Constructor. More...
 
double findBound (double shift)
 Fiind a displacement in the parameter space from the initial point to a point where the PDF drops significantly. More...
 
Functions::ChebfunBase_sptr makeApprox (double lBound, double rBound, std::vector< double > &P, std::vector< double > &A)
 Make an approximation for this slice on an interval. More...
 
double operator() (double p)
 Calculate the value of chi squared along the chosen direction at a distance from the minimum point. More...
 

Private Attributes

double m_chi0
 The chi squared at the minimum. More...
 
const API::FunctionDomainm_domain
 The domain. More...
 
IAlgorithm_sptr m_fitalg
 
int m_fixedParameterIndex
 
std::vector< int > m_freeParameters
 
IFunction_sptr m_function
 
API::FunctionValuesm_values
 The values. More...
 
int m_workspaceIndex
 
MatrixWorkspace_sptr m_ws
 

Detailed Description

Helper class to calculate the chi squared along a direction in the parameter space.

Definition at line 50 of file ProfileChiSquared1D.cpp.

Constructor & Destructor Documentation

◆ ChiSlice()

Mantid::CurveFitting::Algorithms::ChiSlice::ChiSlice ( IFunction_sptr  inputFunction,
int  fixedParameterIndex,
API::MatrixWorkspace_sptr  inputWS,
int  workspaceIndex,
const API::FunctionDomain domain,
API::FunctionValues values,
double  chi0,
std::vector< int > &  freeParameters 
)
inline

Constructor.

Parameters
inputFunction:: The fitting function
fixedParameterIndex:: index of the parameter which is fixed
inputWS:: The input workspace (used for fit algorithm)
workspaceIndex:: Workspace index (used for fit algorithm)
domain:: Function's domain.
values:: Functin's values.
chi0:: Chi squared at the minimum.
freeParameters:: Parameters which are free in the function.

Definition at line 61 of file ProfileChiSquared1D.cpp.

References Mantid::DataObjects::create(), and m_fitalg.

Member Function Documentation

◆ findBound()

double Mantid::CurveFitting::Algorithms::ChiSlice::findBound ( double  shift)
inline

Fiind a displacement in the parameter space from the initial point to a point where the PDF drops significantly.

Parameters
shift:: Initial shift form par0 value.

Definition at line 121 of file ProfileChiSquared1D.cpp.

References fabs.

Referenced by Mantid::CurveFitting::Algorithms::ProfileChiSquared1D::execConcrete().

◆ makeApprox()

Functions::ChebfunBase_sptr Mantid::CurveFitting::Algorithms::ChiSlice::makeApprox ( double  lBound,
double  rBound,
std::vector< double > &  P,
std::vector< double > &  A 
)
inline

Make an approximation for this slice on an interval.

Parameters
lBound:: The left bound of the approximation interval.
rBound:: The right bound of the approximation interval.
P:: Output vector with approximation parameters.
A:: Output vector with approximation parameters.

Definition at line 107 of file ProfileChiSquared1D.cpp.

References Mantid::CurveFitting::Functions::ChebfunBase::bestFitAnyTolerance().

Referenced by Mantid::CurveFitting::Algorithms::ProfileChiSquared1D::execConcrete().

◆ operator()()

double Mantid::CurveFitting::Algorithms::ChiSlice::operator() ( double  p)
inline

Calculate the value of chi squared along the chosen direction at a distance from the minimum point.

Parameters
p:: A distance from the minimum.

Definition at line 74 of file ProfileChiSquared1D.cpp.

References m_chi0, m_domain, m_fitalg, m_fixedParameterIndex, m_freeParameters, m_function, m_values, m_workspaceIndex, and m_ws.

Member Data Documentation

◆ m_chi0

double Mantid::CurveFitting::Algorithms::ChiSlice::m_chi0
private

The chi squared at the minimum.

Definition at line 165 of file ProfileChiSquared1D.cpp.

Referenced by operator()().

◆ m_domain

const API::FunctionDomain& Mantid::CurveFitting::Algorithms::ChiSlice::m_domain
private

The domain.

Definition at line 161 of file ProfileChiSquared1D.cpp.

Referenced by operator()().

◆ m_fitalg

IAlgorithm_sptr Mantid::CurveFitting::Algorithms::ChiSlice::m_fitalg
private

Definition at line 167 of file ProfileChiSquared1D.cpp.

Referenced by ChiSlice(), and operator()().

◆ m_fixedParameterIndex

int Mantid::CurveFitting::Algorithms::ChiSlice::m_fixedParameterIndex
private

Definition at line 159 of file ProfileChiSquared1D.cpp.

Referenced by operator()().

◆ m_freeParameters

std::vector<int> Mantid::CurveFitting::Algorithms::ChiSlice::m_freeParameters
private

Definition at line 173 of file ProfileChiSquared1D.cpp.

Referenced by operator()().

◆ m_function

IFunction_sptr Mantid::CurveFitting::Algorithms::ChiSlice::m_function
private

Definition at line 169 of file ProfileChiSquared1D.cpp.

Referenced by operator()().

◆ m_values

API::FunctionValues& Mantid::CurveFitting::Algorithms::ChiSlice::m_values
private

The values.

Definition at line 163 of file ProfileChiSquared1D.cpp.

Referenced by operator()().

◆ m_workspaceIndex

int Mantid::CurveFitting::Algorithms::ChiSlice::m_workspaceIndex
private

Definition at line 171 of file ProfileChiSquared1D.cpp.

Referenced by operator()().

◆ m_ws

MatrixWorkspace_sptr Mantid::CurveFitting::Algorithms::ChiSlice::m_ws
private

Definition at line 170 of file ProfileChiSquared1D.cpp.

Referenced by operator()().


The documentation for this class was generated from the following file: