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. More... | |
static bool | matchingBins (const MatrixWorkspace &ws1, const MatrixWorkspace &ws2, const bool firstOnly=false) |
Checks whether the bins (X values) of two workspace are the same. More... | |
static bool | sharedXData (const MatrixWorkspace &WS) |
Checks whether all the X vectors in a workspace are the same one underneath. More... | |
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 441 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 369 of file WorkspaceOpOverloads.cpp.
References Mantid::API::MatrixWorkspace::getNumberHistograms(), sharedXData(), Mantid::API::MatrixWorkspace::size(), and Mantid::API::MatrixWorkspace::x().
Referenced by Mantid::Algorithms::PointByPointVCorrection::check_validity(), 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(), and Mantid::Algorithms::Divide::setOutputUnits().
|
static |
Checks whether all the X vectors in a workspace are the same one underneath.
Definition at line 424 of file WorkspaceOpOverloads.cpp.
References Mantid::API::MatrixWorkspace::getNumberHistograms(), and Mantid::API::MatrixWorkspace::x().
Referenced by Mantid::Algorithms::XDataConverter::exec(), and matchingBins().