Skip to content

Commit

Permalink
Fix unit test. Refs #5306.
Browse files Browse the repository at this point in the history
Unit test was broken due to change in IFunction.
Modify the peak function to fix the issue.
  • Loading branch information
wdzhou committed Aug 1, 2012
1 parent 0d14d70 commit c1fdecc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/CurveFitting/src/Bk2BkExpConvPV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ namespace CurveFitting
*/
void Bk2BkExpConvPV::init()
{
declareParameter("I", 1.0);
declareParameter("TOF_h", -0.0);
declareParameter("height", 1.0);
declareParameter("Alpha",1.6);
Expand Down Expand Up @@ -117,7 +116,8 @@ namespace CurveFitting
// << alpha << " beta = " << beta << " H = " << H << " eta = " << eta << std::endl;

// 2. Do calculation
std::cout << "DB1143: nData = " << nData << " From " << xValues[0] << " To " << xValues[nData-1] << std::endl;
std::cout << "DB1143: nData = " << nData << " From " << xValues[0] << " To " << xValues[nData-1] <<
" Height = " << height << std::endl;
for (size_t id = 0; id < nData; ++id)
{
double dT = xValues[id]-tof_h;
Expand Down
16 changes: 7 additions & 9 deletions Code/Mantid/Framework/CurveFitting/test/Bk2BkExpConvPVTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,25 @@ class Bk2BkExpConvPVTest : public CxxTest::TestSuite
*/
void test_functionCalculator()
{


// excluding the test until fixed
return;




// 1. Set peak
Bk2BkExpConvPV peak;
peak.initialize();

peak.setParameter("I", 1.0);
// 1. Set parameter
peak.setParameter("height", 1000.0);
peak.setParameter("TOF_h", 55175.79);
peak.setParameter("Alpha", 0.03613);
peak.setParameter("Beta", 0.02376);
peak.setParameter("Sigma2", 187.50514);
peak.setParameter("Gamma", 0.0);

// 2. Tie!
peak.tie("TOF_h", "55175.79");
peak.tie("Alpha", "0.03613");
peak.tie("Beta", "0.02376");
peak.tie("Sigma2", "187.50514");
peak.tie("Gamma", "0.0");
// peak.setParameter("height", 1.0*100*1000);

// 2. Set workspace
std::vector<double> Xs;
Expand Down

0 comments on commit c1fdecc

Please sign in to comment.