Mantid
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Mantid::API::WorkspaceHelpers Struct Reference

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...
 

Detailed Description

A collection of static functions for use with workspaces.

Author
Russell Taylor, Tessella Support Services plc
Date
19/09/2008

Definition at line 55 of file WorkspaceOpOverloads.h.

Member Function Documentation

◆ makeDistribution()

void Mantid::API::WorkspaceHelpers::makeDistribution ( const MatrixWorkspace_sptr workspace,
const bool  forwards = true 
)
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.

Parameters
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().

◆ matchingBins()

bool Mantid::API::WorkspaceHelpers::matchingBins ( const MatrixWorkspace ws1,
const MatrixWorkspace ws2,
const bool  firstOnly = false 
)
static

◆ sharedXData()

bool Mantid::API::WorkspaceHelpers::sharedXData ( const MatrixWorkspace WS)
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().


The documentation for this struct was generated from the following files: