Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #10384 Framework class for background removal
- Loading branch information
Showing
6 changed files
with
137 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/BackgroundHelper.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#ifndef MANTID_ALGORITHM_BACKGROUNDHELPER_H_ | ||
#define MANTID_ALGORITHM_BACKGROUNDHELPER_H_ | ||
|
||
|
||
#include "MantidKernel/Unit.h" | ||
#include "MantidKernel/cow_ptr.h" | ||
|
||
#include "MantidAPI/DllConfig.h" | ||
#include "MantidAPI/MatrixWorkspace.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace Algorithms | ||
{ | ||
/** Class helping to remove constant (and possibly non-constant after simple modification) background calculated in TOF units | ||
from a matrix workspace, expressed in units, different from TOF. | ||
@date 26/10/2014 | ||
Copyright © 2014 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://github.com/mantidproject/mantid>. | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
|
||
class DLLExport BackgroundHelper | ||
{ | ||
public: | ||
BackgroundHelper():m_emode(0){}; | ||
void initialize(const API::MatrixWorkspace_const_sptr &bkgWS,const API::MatrixWorkspace_sptr &sourceWS,int emode); | ||
|
||
void removeBackground(int hist,const MantidVec &XValues,MantidVec &y_data,MantidVec &e_data); | ||
private: | ||
int m_emode; | ||
|
||
}; | ||
|
||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "MantidAlgorithms/BackgroundHelper.h" | ||
|
||
|
||
namespace Mantid | ||
{ | ||
namespace Algorithms | ||
{ | ||
|
||
|
||
void BackgroundHelper::initialize(const API::MatrixWorkspace_const_sptr &bkgWS,const API::MatrixWorkspace_sptr &sourceWS,int emode) | ||
{ | ||
} | ||
|
||
void BackgroundHelper::removeBackground(int hist,const MantidVec &XValues,MantidVec &y_data,MantidVec &e_data) | ||
{ | ||
} | ||
|
||
} // end API | ||
} // end Mantid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
Code/Mantid/Framework/Algorithms/test/BackgroundHelperTest.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef BACKGROUDHELPER_TEST_H_ | ||
#define BACKGROUDHELPER_TEST_H_ | ||
|
||
#include <cxxtest/TestSuite.h> | ||
|
||
#include "MantidAlgorithms/BackgroundHelper.h" | ||
|
||
|
||
|
||
class BackgroundHelperTest : public CxxTest::TestSuite | ||
{ | ||
public: | ||
|
||
// This pair of boilerplate methods prevent the suite being created statically | ||
// This means the constructor isn't called when running other tests | ||
static BackgroundHelperTest *createSuite() { return new BackgroundHelperTest(); } | ||
static void destroySuite( BackgroundHelperTest *suite ) { delete suite; } | ||
|
||
BackgroundHelperTest() | ||
{ | ||
} | ||
|
||
~BackgroundHelperTest() | ||
{ | ||
} | ||
|
||
void testBackgroundInit() | ||
{ | ||
} | ||
|
||
private: | ||
|
||
|
||
}; | ||
|
||
|
||
|
||
#endif /*ALGORITHMTEST_H_*/ |