|
Mantid
|
A collection of static functions for use with workspaces. More...
#include <WorkspaceOpOverloads.h>
Static Public Member Functions | |
| static void | makeDistribution (const MatrixWorkspace_sptr &workspace, const bool forwards=true) |
| Divides the data in a workspace by the bin width to make it a distribution. | |
| static bool | matchingBins (const std::shared_ptr< const MatrixWorkspace > &ws1, const std::shared_ptr< const MatrixWorkspace > &ws2, const bool firstOnly=false) |
| Checks whether the bins (X values) of two workspace are the same. | |
| static bool | sharedXData (const std::shared_ptr< const MatrixWorkspace > &WS) |
| Checks whether all the X vectors in a workspace are the same one underneath. | |
A collection of static functions for use with workspaces.
Definition at line 55 of file WorkspaceOpOverloads.h.
|
static |
Divides the data in a workspace by the bin width to make it a distribution.
Can also reverse this operation (i.e. multiply by the bin width). Sets the isDistribution() flag accordingly.
| workspace | :: The workspace on which to carry out the operation |
| forwards | :: If true (the default) divides by bin width, if false multiplies |
Definition at line 442 of file WorkspaceOpOverloads.cpp.
References workspace.
Referenced by Mantid::Algorithms::GetEi2::calculatePeakPosition(), Mantid::Algorithms::ConvertFromDistribution::exec(), Mantid::Algorithms::ConvertToDistribution::exec(), Mantid::Algorithms::InterpolatingRebin::exec(), and Mantid::Algorithms::GetEi::getPeakCentre().
|
static |
Checks whether the bins (X values) of two workspace are the same.
| ws1 | :: The first workspace |
| ws2 | :: The second workspace |
| firstOnly | :: If true, only the first spectrum is checked. If false (the default), all spectra are checked and the two workspaces must have the same number of spectra |
Definition at line 370 of file WorkspaceOpOverloads.cpp.
References sharedXData(), Mantid::Kernel::withinAbsoluteDifference(), and Mantid::Kernel::withinRelativeDifference().
Referenced by Mantid::Algorithms::PointByPointVCorrection::check_validity(), Mantid::Algorithms::ConjoinWorkspaces::checkBinning(), Mantid::Algorithms::MergeRuns::checkRebinning(), Mantid::Algorithms::BinaryOperation::checkSizeCompatibility(), Mantid::Algorithms::Divide::checkSizeCompatibility(), Mantid::Algorithms::Multiply::checkSizeCompatibility(), Mantid::Algorithms::CalculateTransmission::exec(), Mantid::Algorithms::CalculateTransmissionBeamSpreader::exec(), Mantid::Algorithms::NormaliseToMonitor::getMonitorWorkspace(), Mantid::Algorithms::Divide::setOutputUnits(), Mantid::Algorithms::DepolarizedAnalyserTransmission::validateInputs(), and Mantid::Algorithms::PolarizerEfficiency::validateInputs().
|
static |
Checks whether all the X vectors in a workspace are the same one underneath.
Definition at line 425 of file WorkspaceOpOverloads.cpp.
Referenced by Mantid::Algorithms::XDataConverter::exec(), and matchingBins().