24using namespace Kernel;
26using namespace DataObjects;
30 "The input workspace.");
34 "The optional input workspace for the imaginary part.");
36 "Spectrum number, one of the six possible spectra output by "
39 "The output workspace.");
41 "Apply an extra phase equal to this quantity "
42 "times 2*pi to the transform");
44 "Automatically calculate and apply phase shift. Zero on the "
45 "X axis is assumed to be in the centre - if it is not, "
46 "setting this property will automatically correct for this.");
47 declareProperty(
"AcceptXRoundingErrors",
false,
"Continue to process the data even if X values are not evenly spaced",
56 const bool xRoundingErrs =
getProperty(
"AcceptXRoundingErrors");
58 const auto numHists =
static_cast<int>(inputWS->getNumberHistograms());
61 Progress prog(
this, 0.0, 1.0, numHists);
64 for (
int i = 0; i < numHists; i++) {
69 childFFT->setProperty<
int>(
"Real", i);
72 childFFT->setProperty<
int>(
"Imaginary", i);
74 childFFT->setProperty<
double>(
"Shift", shift);
75 childFFT->setProperty<
bool>(
"AutoShift", autoShift);
76 childFFT->setProperty<
bool>(
"AcceptXRoundingErrors", xRoundingErrs);
80 outputWS->getAxis(0)->unit() = fftTemp->getAxis(0)->unit();
82 outputWS->setHistogram(i, fftTemp->histogram(fftPart));
90 if (!inputImagWS && fftPart <= 2) {
92 const double xMax = outputWS->x(0)[(outputWS->x(0).size() / 2) - 1];
97 extractSpectra->setProperty(
"XMax", xMax);
98 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::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.