Skip to content
Snippets Groups Projects
Commit a21a33c5 authored by Anthony Lim's avatar Anthony Lim
Browse files

refs #20216 renamed files

parent de221758
No related branches found
No related tags found
No related merge requests found
#ifndef MANTID_ALGORITHM_PADDINGANDAPODUIZTION_H_ #ifndef MANTID_ALGORITHM_PADDINGANDAPODUIZTION_H_
#define MANTID_ALGORITHM_FPADDINGANDAPODUIZTION_H_ #define MANTID_ALGORITHM_PADDINGANDAPODUIZTION_H_
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Includes // Includes
...@@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid> File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org> Code Documentation is available at: <http://doxygen.mantidproject.org>
*/ */
class DLLExport FFTPreProcessing : public API::Algorithm { class DLLExport PaddingAndApodization : public API::Algorithm {
public: public:
/// Algorithm's name for identification overriding a virtual method /// Algorithm's name for identification overriding a virtual method
const std::string name() const override { return "FFTPreProcessing"; } const std::string name() const override { return "FFTPreProcessing"; }
......
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Includes // Includes
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#include "MantidAlgorithms/ApodizationFunctionHelper.h" #include "MantidAlgorithms/ApodizationFunctions.h"
#include <cmath> #include <cmath>
namespace Mantid {
namespace Algorithms {
/** /**
* Returns the evaluation of the Lorentz * Returns the evaluation of the Lorentz
* (an exponential decay) * (an exponential decay)
...@@ -38,3 +41,6 @@ double gaussian(const double time, const double decayConstant) { ...@@ -38,3 +41,6 @@ double gaussian(const double time, const double decayConstant) {
* @returns :: Function evaluation * @returns :: Function evaluation
*/ */
double none(const double, const double) { return 1.; } double none(const double, const double) { return 1.; }
}
}
...@@ -46,7 +46,7 @@ class PaddingAndApodizationTest : public CxxTest::TestSuite { ...@@ -46,7 +46,7 @@ class PaddingAndApodizationTest : public CxxTest::TestSuite {
public: public:
// This pair of boilerplate methods prevent the suite being created statically // This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests // This means the constructor isn't called when running other tests
static PaddingAndApodizationTestt *createSuite() { static PaddingAndApodizationTest *createSuite() {
return new PaddingAndApodizationTest(); return new PaddingAndApodizationTest();
} }
static void destroySuite(PaddingAndApodizationTest *suite) { delete suite; } static void destroySuite(PaddingAndApodizationTest *suite) { delete suite; }
......
...@@ -39,7 +39,7 @@ Usage ...@@ -39,7 +39,7 @@ Usage
y = [100, 150, 50, 10, 5] y = [100, 150, 50, 10, 5]
x = [1,2,3,4,5,6] x = [1,2,3,4,5,6]
input = CreateWorkspace(x,y) input = CreateWorkspace(x,y)
output=FFTPreProcessing(InputWorkspace=input,ApodizationFunction="Gaussian",DecayConstant=2.44,Padding=0,) output=PaddingAndApodization(InputWorkspace=input,ApodizationFunction="Gaussian",DecayConstant=2.44,Padding=0,)
print "output: ",['{0:.2f}'.format(value) for value in output.readY(0)] print "output: ",['{0:.2f}'.format(value) for value in output.readY(0)]
Output: Output:
...@@ -57,7 +57,7 @@ Output: ...@@ -57,7 +57,7 @@ Output:
y = [100, 150, 50, 10, 5] y = [100, 150, 50, 10, 5]
x = [1,2,3,4,5,6] x = [1,2,3,4,5,6]
input = CreateWorkspace(x,y) input = CreateWorkspace(x,y)
output=FFTPreProcessing(InputWorkspace=input,Padding=2,) output=PaddingAndApodization(InputWorkspace=input,Padding=2,)
print "output: ",['{0:.2f}'.format(value) for value in output.readY(0)] print "output: ",['{0:.2f}'.format(value) for value in output.readY(0)]
Output: Output:
...@@ -75,7 +75,7 @@ Output: ...@@ -75,7 +75,7 @@ Output:
y = [100, 150, 50, 10, 5] y = [100, 150, 50, 10, 5]
x = [1,2,3,4,5,6] x = [1,2,3,4,5,6]
input = CreateWorkspace(x,y) input = CreateWorkspace(x,y)
output=FFTPreProcessing(InputWorkspace=input,ApodizationFunction="Gaussian",DecayConstant=2.44,Padding=2,) output=PaddingAndApodization(InputWorkspace=input,ApodizationFunction="Gaussian",DecayConstant=2.44,Padding=2,)
print "output: ",['{0:.2f}'.format(value) for value in output.readY(0)] print "output: ",['{0:.2f}'.format(value) for value in output.readY(0)]
Output: Output:
......
...@@ -16,7 +16,7 @@ New ...@@ -16,7 +16,7 @@ New
### ###
- :ref:`ConjoinXRuns <algm-ConjoinXRuns>` performs concatenation of the workspaces into a single one by handling the sample logs merging as in :ref:`MergeRuns <algm-MergeRuns>`. - :ref:`ConjoinXRuns <algm-ConjoinXRuns>` performs concatenation of the workspaces into a single one by handling the sample logs merging as in :ref:`MergeRuns <algm-MergeRuns>`.
- :ref:`FFTPreProcessing <algm-FFTPreProcessing-v1>` a new algorithm for padding data and adding an apodization function. - :ref:`PaddingAndApodization <algm-PaddingAndApodization-v1>` a new algorithm for padding data and adding an apodization function.
Improved Improved
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment