20using namespace HistogramData;
40 return "Rebins with an x-axis of relative time at sample for comparing event "
41 "arrival time at the sample environment.";
56 const auto histnumber =
static_cast<int>(inWS->getNumberHistograms());
58 const double tofOffset = 0;
62 auto x = Kernel::make_cow<HistogramData::HistogramX>(OutXValues_scaled);
66 for (
int i = 0; i < histnumber; ++i) {
71 const double tofFactor = correction.
factor;
73 const auto &el = inWS->getSpectrum(i);
76 el.generateHistogramTimeAtSample(*XValues_new, y_data, e_data, tofFactor, tofOffset);
79 outputWS->setSharedX(i,
x);
82 outputWS->mutableY(i) = y_data;
83 outputWS->mutableE(i) = e_data;
98 return ws->getTimeAtSampleMax().totalNanoseconds();
107 return ws->getTimeAtSampleMin().totalNanoseconds();
#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.
Helper class for reporting progress from algorithms.
RebinByTimeAtSample : Rebins an event workspace to a histogram workspace with time at sample along th...
const std::string category() const override
Algorithm's category for identification.
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
uint64_t getMaxX(Mantid::API::IEventWorkspace_sptr ws) const override
Get the minimum x across all spectra in workspace.
void doHistogramming(Mantid::API::IEventWorkspace_sptr inWS, Mantid::API::MatrixWorkspace_sptr outputWS, Mantid::MantidVecPtr &XValues_new, Mantid::MantidVec &OutXValues_scaled, Mantid::API::Progress &prog) override
Do histogramming of the data to create the output workspace.
uint64_t getMinX(Mantid::API::IEventWorkspace_sptr ws) const override
Get the maximum x across all spectra in workspace.
const std::string summary() const override
Algorithm's summary for use in the GUI and help.
TimeAtSampleStrategyElastic : Time at sample stragegy for elastic scattering.
Correction calculate(const size_t &workspace_index) const override
Calculate correction.
void report()
Increments the loop counter by 1, then sends the progress notification on behalf of its algorithm.
Implements a copy on write data template.
std::shared_ptr< IEventWorkspace > IEventWorkspace_sptr
shared pointer to Mantid::API::IEventWorkspace
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.
Helper class which provides the Collimation Length for SANS instruments.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces
The Correction struct to be applied as factor * TOF + offset offset:: TOF offset in unit of TOF facto...