14#include "MantidHistogramData/Slice.h"
25using namespace Kernel;
27using namespace DataObjects;
31 "The input workspace.");
35 "The optional input workspace for the imaginary part.");
37 "Spectrum number, one of the six possible spectra output by "
40 "The output workspace.");
42 "Apply an extra phase equal to this quantity "
43 "times 2*pi to the transform");
45 "Automatically calculate and apply phase shift. Zero on the "
46 "X axis is assumed to be in the centre - if it is not, "
47 "setting this property will automatically correct for this.");
48 declareProperty(
"AcceptXRoundingErrors",
false,
"Continue to process the data even if X values are not evenly spaced",
57 const bool xRoundingErrs =
getProperty(
"AcceptXRoundingErrors");
59 const auto numHists =
static_cast<int>(inputWS->getNumberHistograms());
62 Progress prog(
this, 0.0, 1.0, numHists);
66 for (
int i = 0; i < numHists; i++) {
71 childFFT->setProperty<
int>(
"Real", i);
74 childFFT->setProperty<
int>(
"Imaginary", i);
76 childFFT->setProperty<
double>(
"Shift", shift);
77 childFFT->setProperty<
bool>(
"AutoShift", autoShift);
78 childFFT->setProperty<
bool>(
"AcceptXRoundingErrors", xRoundingErrs);
81 unit = fftTemp->getAxis(0)->unit();
82 outputWS->setHistogram(i, fftTemp->histogram(fftPart));
90 outputWS->getAxis(0)->unit() = unit;
92 if (!inputImagWS && fftPart <= 2) {
94 const double xMax = outputWS->x(0)[(outputWS->x(0).size() / 2) - 1];
99 extractSpectra->setProperty(
"XMax", xMax);
100 extractSpectra->execute();
#define DECLARE_ALGORITHM(classname)
#define PARALLEL_START_INTERRUPT_REGION
Begins a block to skip processing is the algorithm has been interupted Note the end of the block if n...
#define PARALLEL_END_INTERRUPT_REGION
Ends a block to skip processing is the algorithm has been interupted Note the start of the block if n...
#define PARALLEL_FOR_IF(condition)
Empty definitions - to enable set your complier to enable openMP.
#define PARALLEL_CHECK_INTERRUPT_REGION
Adds a check after a Parallel region to see if it was interupted.
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
virtual std::shared_ptr< Algorithm > createChildAlgorithm(const std::string &name, const double startProgress=-1., const double endProgress=-1., const bool enableLogging=true, const int &version=-1)
Create a Child Algorithm.
Helper class for reporting progress from algorithms.
A property class for workspaces.
BoundedValidator is a validator that requires the values to be between upper or lower bounds,...
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void report()
Increments the loop counter by 1, then sends the progress notification on behalf of its algorithm.
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< Unit > Unit_sptr
Shared pointer to the Unit base class.
std::enable_if< std::is_pointer< Arg >::value, bool >::type threadSafe(Arg workspace)
Thread-safety check Checks the workspace to ensure it is suitable for multithreaded access.
@ Input
An input workspace.
@ Output
An output workspace.