Mantid
Loading...
Searching...
No Matches
Classes | Functions
WorkspaceCreationHelper Namespace Reference

Classes

struct  EPPTableRow
 A struct containing the cells of an EPP table row. More...
 
struct  FibSeries
 Create a Fibonacci series. More...
 
struct  ReturnOne
 
class  StubAlgorithm
 Stub algorithm for doing logging/progress reporting. More...
 

Functions

void addNoise (const Mantid::API::MatrixWorkspace_sptr &ws, double noise, const double lower=-0.5, const double upper=0.5)
 Add random noise to the signalcreate2DWorkspaceWithFullInstrument. More...
 
void addTSPEntry (Run &runInfo, const std::string &name, double val)
 Utility function to add a TimeSeriesProperty with a name and value. More...
 
std::shared_ptr< Mantid::DataObjects::TableWorkspacebuildPreprocessedDetectorsWorkspace (const Mantid::API::MatrixWorkspace_sptr &ws)
 Build table workspace with preprocessed detectors for existing workspace with instrument. More...
 
Mantid::DataObjects::Workspace2D_sptr create1DWorkspaceConstant (int size, double value, double error, bool isHisto)
 
Mantid::DataObjects::Workspace2D_sptr create1DWorkspaceConstantWithXerror (int size, double value, double error, double xError, bool isHisto=true)
 
Mantid::DataObjects::Workspace2D_sptr create1DWorkspaceFib (int size, bool isHisto)
 
Mantid::DataObjects::Workspace2D_sptr create1DWorkspaceRand (int size, bool isHisto)
 
void create2DAngles (std::vector< double > &L2, std::vector< double > &polar, std::vector< double > &azim, size_t nPolar=10, size_t nAzim=10, double polStart=0, double polEnd=90, double azimStart=-30, double azimEnd=30)
 
Mantid::API::MatrixWorkspace_sptr create2DDetectorScanWorkspaceWithFullInstrument (int nhist, int nbins, size_t nTimeIndexes, size_t startTime=0, size_t firstInterval=1, bool includeMonitors=false, bool startYNegative=false, bool isHistogram=true, const std::string &instrumentName=std::string("testInst"))
 Create a workspace as for create2DWorkspaceWithFullInstrument, but including time indexing, i.e. More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspace (size_t nhist, size_t numBoundaries)
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspace123 (int64_t nHist, int64_t nBins, bool isHist=false, const std::set< int64_t > &maskedWorkspaceIndices=std::set< int64_t >(), bool hasDx=false)
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspace123WithMaskedBin (int numHist, int numBins, int maskedWorkspaceIndex, int maskedBinIndex)
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspace154 (int64_t nHist, int64_t nBins, bool isHist=false, const std::set< int64_t > &maskedWorkspaceIndices=std::set< int64_t >(), bool hasDx=false)
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceBinned (size_t nhist, size_t numVals, double x0=0.0, double deltax=1.0)
 Create a 2D workspace with this many histograms and bins. More...
 
template<typename fT , typename gT = ReturnOne>
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceFromFunction (fT yFunc, int nSpec, double x0, double x1, double dx, bool isHist=false, gT eFunc=ReturnOne())
 Creates a 2D workspace from taking the function values from the input function. More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceNonUniformlyBinned (int nhist, const int numBoundaries, const double xBoundaries[], bool hasDx=false)
 Create a 2D workspace with this many histograms and bins. More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspacePoints (size_t nhist, size_t numVals, double x0=0.0, double deltax=1.0)
 Create a 2D workspace with this many point-histograms and bins. More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceThetaVsTOF (int nHist, int nBins)
 Create a test workspace with a Theta numeric axis instead of a spectrum axis the values run from 1 to nhist Data filled with: Y: 2.0, E: sqrt(2.0), X: nbins of width 1 starting at 0. More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceWhereYIsWorkspaceIndex (int nhist, int numBoundaries)
 Create a Workspace2D where the Y value at each bin is == to the workspace index. More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceWithFullInstrument (int nhist, int nbins, bool includeMonitors=false, bool startYNegative=false, bool isHistogram=true, const std::string &instrumentName=std::string("testInst"), bool hasDx=false)
 Create a test workspace with a fully defined instrument. More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceWithGeographicalDetectors (const int nlat, const int nlong, const double anginc, const int nbins, const double x0, const double deltax, const std::string &instrumentName, const std::string &xunit)
 Create an Workspace2D with an instrument that contains detectors arranged at even latitude/longitude values. More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceWithRectangularInstrument (int numBanks, int numPixels, int numBins)
 Create an Workspace2D with an instrument that contains RectangularDetector's. More...
 
Mantid::API::MatrixWorkspace_sptr create2DWorkspaceWithReflectometryInstrument (const double startX=0.0, const Mantid::Kernel::V3D &slit1Pos=Mantid::Kernel::V3D(0, 0, 0), const Mantid::Kernel::V3D &slit2Pos=Mantid::Kernel::V3D(0, 0, 1), const double vg1=0.5, const double vg2=1.0, const Mantid::Kernel::V3D &sourcePos=Mantid::Kernel::V3D(0, 0, 0), const Mantid::Kernel::V3D &monitorPos=Mantid::Kernel::V3D(14, 0, 0), const Mantid::Kernel::V3D &samplePos=Mantid::Kernel::V3D(15, 0, 0), const Mantid::Kernel::V3D &detectorPos=Mantid::Kernel::V3D(20,(20 - 15), 0), const int nBins=100, const double deltaX=2000.0)
 Create a 2D workspace with one detector and one monitor based around a virtual reflectometry instrument. More...
 
Mantid::API::MatrixWorkspace_sptr create2DWorkspaceWithReflectometryInstrumentMultiDetector (const double startX=0.0, const double detSize=0.0, const Mantid::Kernel::V3D &slit1Pos=Mantid::Kernel::V3D(0, 0, 0), const Mantid::Kernel::V3D &slit2Pos=Mantid::Kernel::V3D(0, 0, 1), const double vg1=0.5, const double vg2=1.0, const Mantid::Kernel::V3D &sourcePos=Mantid::Kernel::V3D(0, 0, 0), const Mantid::Kernel::V3D &monitorPos=Mantid::Kernel::V3D(14, 0, 0), const Mantid::Kernel::V3D &samplePos=Mantid::Kernel::V3D(15, 0, 0), const Mantid::Kernel::V3D &detectorCenterPos=Mantid::Kernel::V3D(20,(20 - 15), 0), const int nSpectra=4, const int nBins=20, const double deltaX=5000.0)
 Create a 2D workspace with one monitor and three detectors based around a virtual reflectometry instrument. More...
 
Workspace2D_sptr create2DWorkspaceWithValues (int64_t nHist, int64_t nBins, bool isHist, const std::set< int64_t > &maskedWorkspaceIndices, double xVal, double yVal, double eVal, bool hasDx=false)
 create2DWorkspaceWithValues More...
 
Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceWithValuesAndXerror (int64_t nHist, int64_t nBins, bool isHist, double xVal, double yVal, double eVal, double dxVal, const std::set< int64_t > &maskedWorkspaceIndices=std::set< int64_t >())
 
Mantid::API::ITableWorkspace_sptr createEPPTableWorkspace (const std::vector< EPPTableRow > &rows)
 Create a table workspace corresponding to what the FindEPP algorithm gives. More...
 
Mantid::DataObjects::EventWorkspace_sptr createEventWorkspace ()
 Create event workspace with: 500 pixels 1000 histogrammed bins. More...
 
Mantid::DataObjects::EventWorkspace_sptr createEventWorkspace (int numPixels, int numBins, int numEvents, double x0, double binDelta, int eventPattern, int start_at_pixelID)
 Create event workspace. More...
 
Mantid::DataObjects::EventWorkspace_sptr createEventWorkspace2 (int numPixels=50, int numBins=100)
 Create event workspace with: 50 pixels 100 histogrammed bins from 0.0 in steps of 1.0 200 events; two in each bin, at time 0.5, 1.5, etc. More...
 
Mantid::DataObjects::EventWorkspace_sptr createEventWorkspace3 (const Mantid::DataObjects::EventWorkspace_const_sptr &sourceWS, const std::string &wsname, Mantid::API::Algorithm *alg)
 
Mantid::DataObjects::EventWorkspace_sptr createEventWorkspaceWithFullInstrument (int numBanks, int numPixels, bool clearEvents=true)
 Create an Eventworkspace with an instrument that contains RectangularDetector's. More...
 
Mantid::DataObjects::EventWorkspace_sptr createEventWorkspaceWithFullInstrument2 (int numBanks, int numPixels, bool clearEvents=true)
 Create an Eventworkspace with instrument 2.0 that contains RectangularDetector's. More...
 
Mantid::DataObjects::EventWorkspace_sptr createEventWorkspaceWithNonUniformInstrument (int numBanks, bool clearEvents)
 Creates an event workspace with instrument which consists of cylindrical detectors. More...
 
EventWorkspace_sptr createEventWorkspaceWithStartTime (int numPixels, int numBins, int numEvents, double x0, double binDelta, int eventPattern, int start_at_pixelID, DateAndTime run_start)
 Create event workspace with defined start date time. More...
 
Mantid::DataObjects::EventWorkspace_sptr createEventWorkspaceWithStartTime (int numPixels, int numBins, int numEvents=100, double x0=0.0, double binDelta=1.0, int eventPattern=1, int start_at_pixelID=0, Mantid::Types::Core::DateAndTime run_start=Mantid::Types::Core::DateAndTime("2010-01-01T00:00:00"))
 
Mantid::DataObjects::EventWorkspace_sptr createGroupedEventWorkspace (std::vector< std::vector< int > > groups, int numBins, double binDelta, double xOffset)
 Create event workspace, with several detector IDs in one event list. More...
 
Mantid::API::MatrixWorkspace_sptr createGroupedWorkspace2D (size_t numHist, int numBins, double binDelta)
 Create Workspace2d, with numHist spectra, each with 9 detectors, with IDs 1-9, 10-18, 19-27. More...
 
Mantid::API::MatrixWorkspace_sptr createGroupedWorkspace2DWithRingsAndBoxes (size_t RootOfNumHist=10, int numBins=10, double binDelta=1.0)
 
template<typename YType , typename EType >
Mantid::HistogramData::Histogram createHisto (bool isHistogram, YType &&yAxis, EType &&eAxis)
 Creates and returns point or bin based histograms with the data specified in parameters. More...
 
template<typename YType , typename EType >
Histogram createHisto (bool isHistogram, YType &&yAxis, EType &&eAxis)
 Creates bin or point based histograms based on the data passed in for Y and E values and the bool specified. More...
 
void createInstrumentForWorkspaceWithDistances (const Mantid::API::MatrixWorkspace_sptr &workspace, const Mantid::Kernel::V3D &samplePosition, const Mantid::Kernel::V3D &sourcePosition, const std::vector< Mantid::Kernel::V3D > &detectorPositions)
 
std::shared_ptr< Mantid::DataObjects::PeaksWorkspacecreatePeaksWorkspace (const int numPeaks, const bool createOrientedLattice=false)
 Create a simple peaks workspace containing the given number of peaks. More...
 
std::shared_ptr< Mantid::DataObjects::PeaksWorkspacecreatePeaksWorkspace (const int numPeaks, const Mantid::Kernel::DblMatrix &ubMat)
 Create a simple peaks workspace containing the given number of peaks and UB matrix. More...
 
Mantid::API::MatrixWorkspace_sptr createProcessedInelasticWS (const std::vector< double > &L2, const std::vector< double > &polar, const std::vector< double > &azimutal, size_t numBins, double Emin, double Emax, double Ei)
 Create a workspace with all components needed for inelastic analysis and 3 detectors in specific places. More...
 
Mantid::API::MatrixWorkspace_sptr createProcessedWorkspaceWithCylComplexInstrument (size_t numPixels=100, size_t numBins=20, bool has_oriented_lattice=true)
 
Mantid::DataObjects::EventWorkspace_sptr createRandomEventWorkspace (size_t numbins, size_t numpixels, double bin_delta)
 Create an event workspace with randomized TOF and pulsetimes. More...
 
Mantid::DataObjects::RebinnedOutput_sptr createRebinnedOutputWorkspace ()
 Function to create a fixed RebinnedOutput workspace. More...
 
Mantid::API::WorkspaceGroup_sptr createWorkspaceGroup (int nEntries, int nHist, int nBins, const std::string &stem)
 Create a WorkspaceGroup with N workspaces and the specified parameters. More...
 
Mantid::DataObjects::WorkspaceSingleValue_sptr createWorkspaceSingleValue (double value)
 
Mantid::DataObjects::WorkspaceSingleValue_sptr createWorkspaceSingleValueWithError (double value, double error)
 
void displayData (const Mantid::API::MatrixWorkspace_const_sptr &ws)
 
void displayDataE (const Mantid::API::MatrixWorkspace_const_sptr &ws)
 
void displayDataX (const Mantid::API::MatrixWorkspace_const_sptr &ws)
 
void displayDataY (const Mantid::API::MatrixWorkspace_const_sptr &ws)
 
void eventWorkspace_Finalize (const Mantid::DataObjects::EventWorkspace_sptr &ew)
 Perform some finalization on event workspace stuff. More...
 
template<typename T >
std::shared_ptr< T > getWS (const std::string &name)
 Returns a workspace of a given type. More...
 
Mantid::DataObjects::Workspace2D_sptr maskSpectra (Mantid::DataObjects::Workspace2D_sptr workspace, const std::set< int64_t > &maskedWorkspaceIndices)
 
template<typename T >
void populateWsWithInitList (T &destination, size_t startingIndex, const std::initializer_list< double > &values)
 Populates a mutable reference from initializer list starting at user specified index. More...
 
DataObjects::Workspace2D_sptr reflectometryWorkspace (const double startX, const int nSpectra, const int nBins, const double deltaX)
 Creates a binned 2DWorkspace with title and TOF x-axis and counts y-axis. More...
 
void removeWS (const std::string &name)
 Deletes a workspace. More...
 
void setGoniometer (const Mantid::API::MatrixWorkspace_sptr &ws, double phi, double chi, double omega)
 Create a default universal goniometer and set its angles. More...
 
void setOrientedLattice (const Mantid::API::MatrixWorkspace_sptr &ws, double a, double b, double c)
 Sets the OrientedLattice in the crystal as an crystal with given lattice lengths, angles of 90 deg. More...
 
template<typename WSType >
void storeWS (const std::string &name, WSType &ws)
 Adds a workspace to the ADS. More...
 

Function Documentation

◆ addNoise()

void WorkspaceCreationHelper::addNoise ( const Mantid::API::MatrixWorkspace_sptr ws,
double  noise,
const double  lower,
const double  upper 
)

Add random noise to the signalcreate2DWorkspaceWithFullInstrument.

Add random noise to the signal.

Parameters
ws:: The workspace to add the noise to
noise:: The mean noise level
lower:: The lower bound of the flucation (default=-0.5)
upper,:The upper bound of the flucation (default=-0.5)

Definition at line 336 of file WorkspaceCreationHelper.cpp.

References lower, Mantid::Kernel::MersenneTwister::nextValue(), and upper.

◆ addTSPEntry()

void WorkspaceCreationHelper::addTSPEntry ( Run runInfo,
const std::string &  name,
double  val 
)

Utility function to add a TimeSeriesProperty with a name and value.

Parameters
runInfo:: Run to add to
name:: property name
val:: value

Definition at line 922 of file WorkspaceCreationHelper.cpp.

References Mantid::API::LogManager::addProperty(), and Mantid::Kernel::TimeSeriesProperty< TYPE >::addValue().

Referenced by createProcessedInelasticWS(), createProcessedWorkspaceWithCylComplexInstrument(), and setGoniometer().

◆ buildPreprocessedDetectorsWorkspace()

std::shared_ptr< Mantid::DataObjects::TableWorkspace > WorkspaceCreationHelper::buildPreprocessedDetectorsWorkspace ( const Mantid::API::MatrixWorkspace_sptr ws)

Build table workspace with preprocessed detectors for existing workspace with instrument.

◆ create1DWorkspaceConstant()

Workspace2D_sptr WorkspaceCreationHelper::create1DWorkspaceConstant ( int  size,
double  value,
double  error,
bool  isHisto 
)

Definition at line 121 of file WorkspaceCreationHelper.cpp.

References createHisto(), error, and value.

Referenced by create1DWorkspaceConstantWithXerror().

◆ create1DWorkspaceConstantWithXerror()

Workspace2D_sptr WorkspaceCreationHelper::create1DWorkspaceConstantWithXerror ( int  size,
double  value,
double  error,
double  xError,
bool  isHisto = true 
)

Definition at line 130 of file WorkspaceCreationHelper.cpp.

References create1DWorkspaceConstant(), error, and value.

◆ create1DWorkspaceFib()

Workspace2D_sptr WorkspaceCreationHelper::create1DWorkspaceFib ( int  size,
bool  isHisto 
)

Definition at line 138 of file WorkspaceCreationHelper.cpp.

References createHisto().

◆ create1DWorkspaceRand()

Workspace2D_sptr WorkspaceCreationHelper::create1DWorkspaceRand ( int  size,
bool  isHisto 
)

◆ create2DAngles()

void WorkspaceCreationHelper::create2DAngles ( std::vector< double > &  L2,
std::vector< double > &  polar,
std::vector< double > &  azim,
size_t  nPolar = 10,
size_t  nAzim = 10,
double  polStart = 0,
double  polEnd = 90,
double  azimStart = -30,
double  azimEnd = 30 
)

Definition at line 1259 of file WorkspaceCreationHelper.cpp.

◆ create2DDetectorScanWorkspaceWithFullInstrument()

MatrixWorkspace_sptr WorkspaceCreationHelper::create2DDetectorScanWorkspaceWithFullInstrument ( int  nhist,
int  nbins,
size_t  nTimeIndexes,
size_t  startTime = 0,
size_t  firstInterval = 1,
bool  includeMonitors = false,
bool  startYNegative = false,
bool  isHistogram = true,
const std::string &  instrumentName = std::string("testInst") 
)

Create a workspace as for create2DWorkspaceWithFullInstrument, but including time indexing, i.e.

detector scans. Note that no positions or rotations are currently changed for the detector scan workspaces.

Data filled with: Y: 2.0, E: sqrt(2.0), X: nbins of width 1 starting at 0

Definition at line 382 of file WorkspaceCreationHelper.cpp.

References create2DWorkspaceWithFullInstrument().

◆ create2DWorkspace()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspace ( size_t  nhist,
size_t  numBoundaries 
)

◆ create2DWorkspace123()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspace123 ( int64_t  nHist,
int64_t  nBins,
bool  isHist = false,
const std::set< int64_t > &  maskedWorkspaceIndices = std::set<int64_t>(),
bool  hasDx = false 
)

◆ create2DWorkspace123WithMaskedBin()

Mantid::DataObjects::Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspace123WithMaskedBin ( int  numHist,
int  numBins,
int  maskedWorkspaceIndex,
int  maskedBinIndex 
)

Definition at line 1305 of file WorkspaceCreationHelper.cpp.

References create2DWorkspace123().

◆ create2DWorkspace154()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspace154 ( int64_t  nHist,
int64_t  nBins,
bool  isHist = false,
const std::set< int64_t > &  maskedWorkspaceIndices = std::set<int64_t>(),
bool  hasDx = false 
)

Definition at line 232 of file WorkspaceCreationHelper.cpp.

References create2DWorkspaceWithValues().

◆ create2DWorkspaceBinned()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceBinned ( size_t  nhist,
size_t  numVals,
double  x0 = 0.0,
double  deltax = 1.0 
)

◆ create2DWorkspaceFromFunction()

template<typename fT , typename gT = ReturnOne>
Mantid::DataObjects::Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceFromFunction ( fT  yFunc,
int  nSpec,
double  x0,
double  x1,
double  dx,
bool  isHist = false,
gT  eFunc = ReturnOne() 
)

Creates a 2D workspace from taking the function values from the input function.

The type must define operator()()

Parameters
yFunc:: A function to use for the y values
nSpec:: The number of spectra
x0:: The start of the x range
x1:: The end of the x range
dx:: The steps in x
isHist:: True if it should be a histogram
eFunc:: A function to use for the y error values
Returns
The new workspace. The errors are set to 1.0

Definition at line 191 of file WorkspaceCreationHelper.h.

References Mantid::DataObjects::create(), Mantid::Kernel::SingletonHolder< T >::Instance(), Mantid::Geometry::X, Mantid::Geometry::x, and Mantid::Geometry::Y.

Referenced by MuonWorkspaceCreationHelper::createAsymmetryWorkspace(), and MuonWorkspaceCreationHelper::createCountsWorkspace().

◆ create2DWorkspaceNonUniformlyBinned()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceNonUniformlyBinned ( int  nhist,
const int  numBoundaries,
const double  xBoundaries[],
bool  hasDx = false 
)

Create a 2D workspace with this many histograms and bins.

The bins are assumed to be non-uniform and given by the input array Filled with Y = 2.0 and E = sqrt(2.0)w

The bins are assumed to be non-uniform and given by the input array Filled with Y = 2.0 and E = M_SQRT2w If hasDx is true, all spectra will have dx values, starting from 0.1 and increased by 0.1 for each bin.

Definition at line 312 of file WorkspaceCreationHelper.cpp.

References createHisto(), Mantid::Geometry::x, and Mantid::Geometry::y.

◆ create2DWorkspacePoints()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspacePoints ( size_t  nhist,
size_t  numVals,
double  x0 = 0.0,
double  deltax = 1.0 
)

Create a 2D workspace with this many point-histograms and bins.

Filled with Y = 2.0 and E = M_SQRT2

Filled with Y = 2.0 and E = M_SQRT2w

Definition at line 299 of file WorkspaceCreationHelper.cpp.

References Mantid::Geometry::x, and Mantid::Geometry::y.

◆ create2DWorkspaceThetaVsTOF()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceThetaVsTOF ( int  nHist,
int  nBins 
)

Create a test workspace with a Theta numeric axis instead of a spectrum axis the values run from 1 to nhist Data filled with: Y: 2.0, E: sqrt(2.0), X: nbins of width 1 starting at 0.

Definition at line 168 of file WorkspaceCreationHelper.cpp.

References create2DWorkspaceBinned().

◆ create2DWorkspaceWhereYIsWorkspaceIndex()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceWhereYIsWorkspaceIndex ( int  nhist,
int  numBoundaries 
)

Create a Workspace2D where the Y value at each bin is == to the workspace index.

Parameters
nhist:: # histograms
numBoundaries:: # of bins
Returns
Workspace2D

Definition at line 158 of file WorkspaceCreationHelper.cpp.

References create2DWorkspaceBinned().

◆ create2DWorkspaceWithFullInstrument()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceWithFullInstrument ( int  nhist,
int  nbins,
bool  includeMonitors,
bool  startYNegative,
bool  isHistogram,
const std::string &  instrumentName,
bool  hasDx 
)

Create a test workspace with a fully defined instrument.

Each spectra will have a cylindrical detector defined 2*cylinder_radius away from the centre of the previous.

Data filled with: Y: 2.0, E: M_SQRT2, X: nbins of width 1 starting at 0 The flag hasDx is responsible for creating dx values or not

Definition at line 355 of file WorkspaceCreationHelper.cpp.

References InstrumentCreationHelper::addFullInstrumentToWorkspace(), create2DWorkspace123(), and create2DWorkspaceBinned().

Referenced by create2DDetectorScanWorkspaceWithFullInstrument(), and Mantid::IndirectFitDataCreationHelper::createInstrumentWorkspace().

◆ create2DWorkspaceWithGeographicalDetectors()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceWithGeographicalDetectors ( const int  nlat,
const int  nlong,
const double  anginc,
const int  nbins,
const double  x0,
const double  deltax,
const std::string &  instrumentName,
const std::string &  xunit 
)

Create an Workspace2D with an instrument that contains detectors arranged at even latitude/longitude values.

For use in testing absorption and multiple scattering corrections. The sparse instrument functionality in these algorithms uses geographical angles (lat/long) to specify the detector positions Latitude/longitude corresponds to two theta if longitude/latitude equals zero

Definition at line 409 of file WorkspaceCreationHelper.cpp.

References InstrumentCreationHelper::addInstrumentWithGeographicalDetectorsToWorkspace(), create2DWorkspaceBinned(), and Mantid::Kernel::SingletonHolder< T >::Instance().

◆ create2DWorkspaceWithRectangularInstrument()

Mantid::DataObjects::Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceWithRectangularInstrument ( int  numBanks,
int  numPixels,
int  numBins 
)

Create an Workspace2D with an instrument that contains RectangularDetector's.

Bins will be 0.0, 1.0, to numBins, filled with signal=2.0, M_SQRT2

Parameters
numBanks:: number of rectangular banks
numPixels:: each bank will be numPixels*numPixels
numBins:: each spectrum will have this # of bins
Returns
The Workspace2D

Definition at line 432 of file WorkspaceCreationHelper.cpp.

References create2DWorkspaceBinned(), and ComponentCreationHelper::createTestInstrumentRectangular().

◆ create2DWorkspaceWithReflectometryInstrument()

MatrixWorkspace_sptr WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrument ( const double  startX,
const V3D slit1Pos,
const V3D slit2Pos,
const double  vg1,
const double  vg2,
const V3D sourcePos,
const V3D monitorPos,
const V3D samplePos,
const V3D detectorPos,
const int  nBins,
const double  deltaX 
)

Create a 2D workspace with one detector and one monitor based around a virtual reflectometry instrument.

Create a very small 2D workspace for a virtual reflectometry instrument.

Returns
workspace with instrument attached.
Parameters
startX: X Tof start value for the workspace.
slit1Pos:: slit 1 position
slit2Pos:: slit 2 position
vg1:: vertical gap slit 1
vg2:: vertical gap slit 2
sourcePos:: source position
monitorPos:: monitor position
samplePos:: sample position
detectorPos:: detector position
nBins:: number of bins
deltaX:: TOF delta x-value

Definition at line 581 of file WorkspaceCreationHelper.cpp.

References InstrumentCreationHelper::addComponent(), InstrumentCreationHelper::addDetector(), InstrumentCreationHelper::addMonitor(), InstrumentCreationHelper::addSample(), InstrumentCreationHelper::addSource(), reflectometryWorkspace(), and workspace.

◆ create2DWorkspaceWithReflectometryInstrumentMultiDetector()

MatrixWorkspace_sptr WorkspaceCreationHelper::create2DWorkspaceWithReflectometryInstrumentMultiDetector ( const double  startX,
const double  detSize,
const V3D slit1Pos,
const V3D slit2Pos,
const double  vg1,
const double  vg2,
const V3D sourcePos,
const V3D monitorPos,
const V3D samplePos,
const V3D detectorCenterPos,
const int  nSpectra,
const int  nBins,
const double  deltaX 
)

Create a 2D workspace with one monitor and three detectors based around a virtual reflectometry instrument.

Create a very small 2D workspace for a virtual reflectometry instrument with multiple detectors.

Returns
workspace with instrument attached.
Parameters
startX:: X Tof start value for the workspace.
detSize:: detector height
slit1Pos:: position of the first slit (counting from source)
slit2Pos:: position of the second slit (counting from source)
vg1:: slit 1 vertical gap
vg2:: slit 2 vertical gap
sourcePos:: source position
monitorPos:: monitor position
samplePos:: sample position
detectorCenterPos:: position of the detector center
nSpectra:: number of spectra (detectors + monitor)
nBins:: number of TOF channels
deltaX:: TOF channel width

Definition at line 629 of file WorkspaceCreationHelper.cpp.

References InstrumentCreationHelper::addComponent(), InstrumentCreationHelper::addDetector(), InstrumentCreationHelper::addMonitor(), InstrumentCreationHelper::addSample(), InstrumentCreationHelper::addSource(), nSpectra, reflectometryWorkspace(), workspace, Mantid::Kernel::V3D::X(), Mantid::Geometry::y, Mantid::Kernel::V3D::Y(), and Mantid::Kernel::V3D::Z().

Referenced by Mantid::FrameworkTestHelpers::createWorkspaceSingle().

◆ create2DWorkspaceWithValues()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceWithValues ( int64_t  nHist,
int64_t  nBins,
bool  isHist,
const std::set< int64_t > &  maskedWorkspaceIndices,
double  xVal,
double  yVal,
double  eVal,
bool  hasDx = false 
)

create2DWorkspaceWithValues

Parameters
nHist:: Number of spectra
nBins:: Number of points (not bin edges!)
isHist:: Flag if it is a histogram or point data
maskedWorkspaceIndices:: Mask workspace indices
xVal:: bin edge or point
yVal:: y value
eVal:: error values
hasDx:: wether workspace has dx values defined (default is false)
Returns
A workspace filled with nBins bins or points and nHist spectra of the values yVal and the error eVal as well as Dx values which are copies of the y values

Definition at line 196 of file WorkspaceCreationHelper.cpp.

References createHisto(), and maskSpectra().

Referenced by create2DWorkspace123(), create2DWorkspace154(), create2DWorkspaceWithValuesAndXerror(), and createProcessedInelasticWS().

◆ create2DWorkspaceWithValuesAndXerror()

Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceWithValuesAndXerror ( int64_t  nHist,
int64_t  nBins,
bool  isHist,
double  xVal,
double  yVal,
double  eVal,
double  dxVal,
const std::set< int64_t > &  maskedWorkspaceIndices = std::set<int64_t>() 
)

Definition at line 216 of file WorkspaceCreationHelper.cpp.

References create2DWorkspaceWithValues().

◆ createEPPTableWorkspace()

ITableWorkspace_sptr WorkspaceCreationHelper::createEPPTableWorkspace ( const std::vector< EPPTableRow > &  rows)

Create a table workspace corresponding to what the FindEPP algorithm gives.

Definition at line 1276 of file WorkspaceCreationHelper.cpp.

References WorkspaceCreationHelper::EPPTableRow::SUCCESS.

◆ createEventWorkspace() [1/2]

EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspace ( )

Create event workspace with: 500 pixels 1000 histogrammed bins.

Definition at line 700 of file WorkspaceCreationHelper.cpp.

References createEventWorkspace().

Referenced by createEventWorkspace(), and createEventWorkspace2().

◆ createEventWorkspace() [2/2]

EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspace ( int  numPixels,
int  numBins,
int  numEvents = 100,
double  x0 = 0.0,
double  binDelta = 1.0,
int  eventPattern = 1,
int  start_at_pixelID = 0 
)

Create event workspace.

Definition at line 714 of file WorkspaceCreationHelper.cpp.

References createEventWorkspaceWithStartTime(), and Mantid::DataHandling::numEvents().

◆ createEventWorkspace2()

EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspace2 ( int  numPixels = 50,
int  numBins = 100 
)

Create event workspace with: 50 pixels 100 histogrammed bins from 0.0 in steps of 1.0 200 events; two in each bin, at time 0.5, 1.5, etc.

Create event workspace with: numPixels pixels numBins histogrammed bins from 0.0 in steps of 1.0 200 events; two in each bin, at time 0.5, 1.5, etc.

PulseTime = 1 second, 2 seconds, etc.

PulseTime = 0 second x2, 1 second x2, 2 seconds x2, etc. after 2010-01-01

Definition at line 708 of file WorkspaceCreationHelper.cpp.

References createEventWorkspace().

Referenced by createEventWorkspaceWithFullInstrument(), createEventWorkspaceWithFullInstrument2(), and createEventWorkspaceWithNonUniformInstrument().

◆ createEventWorkspace3()

Mantid::DataObjects::EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspace3 ( const Mantid::DataObjects::EventWorkspace_const_sptr sourceWS,
const std::string &  wsname,
Mantid::API::Algorithm alg 
)

◆ createEventWorkspaceWithFullInstrument()

Mantid::DataObjects::EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspaceWithFullInstrument ( int  numBanks,
int  numPixels,
bool  clearEvents 
)

Create an Eventworkspace with an instrument that contains RectangularDetector's.

X axis = 100 histogrammed bins from 0.0 in steps of 1.0. 200 events per pixel.

Parameters
numBanks:: number of rectangular banks
numPixels:: each bank will be numPixels*numPixels
clearEvents:: if true, erase the events from list
Returns
The EventWorkspace

Definition at line 457 of file WorkspaceCreationHelper.cpp.

References createEventWorkspace2(), and ComponentCreationHelper::createTestInstrumentRectangular().

◆ createEventWorkspaceWithFullInstrument2()

Mantid::DataObjects::EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspaceWithFullInstrument2 ( int  numBanks,
int  numPixels,
bool  clearEvents 
)

Create an Eventworkspace with instrument 2.0 that contains RectangularDetector's.

X axis = 100 histogrammed bins from 0.0 in steps of 1.0. 200 events per pixel.

Parameters
numBanks:: number of rectangular banks
numPixels:: each bank will be numPixels*numPixels
clearEvents:: if true, erase the events from list
Returns
The EventWorkspace

Definition at line 494 of file WorkspaceCreationHelper.cpp.

References createEventWorkspace2(), and ComponentCreationHelper::createTestInstrumentRectangular2().

◆ createEventWorkspaceWithNonUniformInstrument()

Mantid::DataObjects::EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspaceWithNonUniformInstrument ( int  numBanks,
bool  clearEvents 
)

Creates an event workspace with instrument which consists of cylindrical detectors.

X data: 100 histogrammed bins, starting from 0.0 in steps of 1.0. Y data: 2 ToF events for every bin

Parameters
numBanks:: How many detector groups there should be
clearEvents:: Whether workspace should not contain any events
Returns
Workspace with described type of events (empty if clearEvents) and instrument set

Definition at line 521 of file WorkspaceCreationHelper.cpp.

References createEventWorkspace2(), and ComponentCreationHelper::createTestInstrumentCylindrical().

◆ createEventWorkspaceWithStartTime() [1/2]

EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspaceWithStartTime ( int  numPixels,
int  numBins,
int  numEvents,
double  x0,
double  binDelta,
int  eventPattern,
int  start_at_pixelID,
DateAndTime  run_start 
)

Create event workspace with defined start date time.

Definition at line 723 of file WorkspaceCreationHelper.cpp.

References Mantid::DataHandling::numEvents(), Mantid::API::ISpectrum::setDetectorID(), and Mantid::API::ISpectrum::setSpectrumNo().

◆ createEventWorkspaceWithStartTime() [2/2]

Mantid::DataObjects::EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspaceWithStartTime ( int  numPixels,
int  numBins,
int  numEvents = 100,
double  x0 = 0.0,
double  binDelta = 1.0,
int  eventPattern = 1,
int  start_at_pixelID = 0,
Mantid::Types::Core::DateAndTime  run_start = Mantid::Types::Core::DateAndTime("2010-01-01T00:00:00") 
)

Referenced by createEventWorkspace().

◆ createGroupedEventWorkspace()

EventWorkspace_sptr WorkspaceCreationHelper::createGroupedEventWorkspace ( std::vector< std::vector< int > >  groups,
int  numBins,
double  binDelta = 1.,
double  xOffset = 0. 
)

Create event workspace, with several detector IDs in one event list.

Definition at line 771 of file WorkspaceCreationHelper.cpp.

◆ createGroupedWorkspace2D()

MatrixWorkspace_sptr WorkspaceCreationHelper::createGroupedWorkspace2D ( size_t  numHist,
int  numBins,
double  binDelta 
)

Create Workspace2d, with numHist spectra, each with 9 detectors, with IDs 1-9, 10-18, 19-27.

Definition at line 843 of file WorkspaceCreationHelper.cpp.

References create2DWorkspaceBinned(), and ComponentCreationHelper::createTestInstrumentCylindrical().

◆ createGroupedWorkspace2DWithRingsAndBoxes()

MatrixWorkspace_sptr WorkspaceCreationHelper::createGroupedWorkspace2DWithRingsAndBoxes ( size_t  RootOfNumHist = 10,
int  numBins = 10,
double  binDelta = 1.0 
)

◆ createHisto() [1/2]

template<typename YType , typename EType >
Mantid::HistogramData::Histogram WorkspaceCreationHelper::createHisto ( bool  isHistogram,
YType &&  yAxis,
EType &&  eAxis 
)

Creates and returns point or bin based histograms with the data specified in parameters.

Creates and returns point or bin based histograms with the data specified in parameters.

Parameters
isHistogram:: Specifies whether the returned histogram should use points or bin edges for the x axis. True gives bin edges.
yAxis:: Takes an rvalue (move) of the y axis for the new histogram
eAxis:: Takes an rvalue (move) of the e axis for the new histogram
Returns
:: Returns a histogram with the user specified X axis type and the data the user passed in.

Definition at line 93 of file WorkspaceCreationHelper.cpp.

Referenced by create1DWorkspaceConstant(), create1DWorkspaceFib(), create1DWorkspaceRand(), create2DWorkspaceNonUniformlyBinned(), and create2DWorkspaceWithValues().

◆ createHisto() [2/2]

template<typename YType , typename EType >
Histogram WorkspaceCreationHelper::createHisto ( bool  isHistogram,
YType &&  yAxis,
EType &&  eAxis 
)

Creates bin or point based histograms based on the data passed in for Y and E values and the bool specified.

Creates and returns point or bin based histograms with the data specified in parameters.

Parameters
isHistogram:: Specifies whether the returned histogram should use points or bin edges for the x axis. True gives bin edges.
yAxis:: Takes an rvalue (move) of the y axis for the new histogram
eAxis:: Takes an rvalue (move) of the e axis for the new histogram
Returns
:: Returns a histogram with the user specified X axis type and the data the user passed in.

Definition at line 93 of file WorkspaceCreationHelper.cpp.

Referenced by create1DWorkspaceConstant(), create1DWorkspaceFib(), create1DWorkspaceRand(), create2DWorkspaceNonUniformlyBinned(), and create2DWorkspaceWithValues().

◆ createInstrumentForWorkspaceWithDistances()

void WorkspaceCreationHelper::createInstrumentForWorkspaceWithDistances ( const Mantid::API::MatrixWorkspace_sptr workspace,
const Mantid::Kernel::V3D samplePosition,
const Mantid::Kernel::V3D sourcePosition,
const std::vector< Mantid::Kernel::V3D > &  detectorPositions 
)

◆ createPeaksWorkspace() [1/2]

Mantid::DataObjects::PeaksWorkspace_sptr WorkspaceCreationHelper::createPeaksWorkspace ( const int  numPeaks,
const bool  createOrientedLattice = false 
)

Create a simple peaks workspace containing the given number of peaks.

Definition at line 1232 of file WorkspaceCreationHelper.cpp.

References ComponentCreationHelper::createTestInstrumentRectangular2().

Referenced by createPeaksWorkspace().

◆ createPeaksWorkspace() [2/2]

Mantid::DataObjects::PeaksWorkspace_sptr WorkspaceCreationHelper::createPeaksWorkspace ( const int  numPeaks,
const Mantid::Kernel::DblMatrix ubMat 
)

Create a simple peaks workspace containing the given number of peaks and UB matrix.

Definition at line 1248 of file WorkspaceCreationHelper.cpp.

References createPeaksWorkspace(), Mantid::Kernel::Matrix< T >::numCols(), and Mantid::Kernel::Matrix< T >::numRows().

◆ createProcessedInelasticWS()

Mantid::API::MatrixWorkspace_sptr WorkspaceCreationHelper::createProcessedInelasticWS ( const std::vector< double > &  L2,
const std::vector< double > &  polar,
const std::vector< double > &  azimutal,
size_t  numBins,
double  Emin,
double  Emax,
double  Ei 
)

Create a workspace with all components needed for inelastic analysis and 3 detectors in specific places.

Parameters
L2– the sample to detector flight path
polar– the detector polar angle
azimutal– the detector azimuthal
numBins– the number of histogram bins for the workspace
Emin– minimal energy transfer
Emax– maxinal energy transfer
Ei– input beam energy

Definition at line 997 of file WorkspaceCreationHelper.cpp.

References addTSPEntry(), create2DWorkspaceWithValues(), ComponentCreationHelper::createCylInstrumentWithDetInGivenPositions(), and Mantid::Geometry::Goniometer::makeUniversalGoniometer().

Referenced by Mantid::IndirectFitDataCreationHelper::createWorkspaceWithInelasticInstrument().

◆ createProcessedWorkspaceWithCylComplexInstrument()

Mantid::API::MatrixWorkspace_sptr WorkspaceCreationHelper::createProcessedWorkspaceWithCylComplexInstrument ( size_t  numPixels = 100,
size_t  numBins = 20,
bool  has_oriented_lattice = true 
)

◆ createRandomEventWorkspace()

EventWorkspace_sptr WorkspaceCreationHelper::createRandomEventWorkspace ( size_t  numbins,
size_t  numpixels,
double  bin_delta 
)

Create an event workspace with randomized TOF and pulsetimes.

Parameters
numbins:: # of bins to set. This is also = # of events per EventList
numpixels:: number of pixels
bin_delta:: a constant offset to shift the bin bounds by
Returns
EventWorkspace

Definition at line 808 of file WorkspaceCreationHelper.cpp.

References Mantid::API::ISpectrum::addDetectorID(), and Mantid::Kernel::MersenneTwister::nextValue().

◆ createRebinnedOutputWorkspace()

RebinnedOutput_sptr WorkspaceCreationHelper::createRebinnedOutputWorkspace ( )

◆ createWorkspaceGroup()

WorkspaceGroup_sptr WorkspaceCreationHelper::createWorkspaceGroup ( int  nEntries,
int  nHist,
int  nBins,
const std::string &  stem 
)

Create a WorkspaceGroup with N workspaces and the specified parameters.

Create a group with nEntries.

It is added to the ADS with the given stem

Definition at line 273 of file WorkspaceCreationHelper.cpp.

References create2DWorkspace(), and Mantid::Kernel::SingletonHolder< T >::Instance().

◆ createWorkspaceSingleValue()

WorkspaceSingleValue_sptr WorkspaceCreationHelper::createWorkspaceSingleValue ( double  value)

Definition at line 682 of file WorkspaceCreationHelper.cpp.

References value.

◆ createWorkspaceSingleValueWithError()

WorkspaceSingleValue_sptr WorkspaceCreationHelper::createWorkspaceSingleValueWithError ( double  value,
double  error 
)

Definition at line 686 of file WorkspaceCreationHelper.cpp.

References error, and value.

◆ displayData()

void WorkspaceCreationHelper::displayData ( const Mantid::API::MatrixWorkspace_const_sptr ws)

Definition at line 885 of file WorkspaceCreationHelper.cpp.

References displayDataX().

◆ displayDataE()

void WorkspaceCreationHelper::displayDataE ( const Mantid::API::MatrixWorkspace_const_sptr ws)

Definition at line 903 of file WorkspaceCreationHelper.cpp.

◆ displayDataX()

void WorkspaceCreationHelper::displayDataX ( const Mantid::API::MatrixWorkspace_const_sptr ws)

Definition at line 889 of file WorkspaceCreationHelper.cpp.

References Mantid::Geometry::x.

Referenced by displayData().

◆ displayDataY()

void WorkspaceCreationHelper::displayDataY ( const Mantid::API::MatrixWorkspace_const_sptr ws)

Definition at line 874 of file WorkspaceCreationHelper.cpp.

References Mantid::Geometry::y.

◆ eventWorkspace_Finalize()

void WorkspaceCreationHelper::eventWorkspace_Finalize ( const Mantid::DataObjects::EventWorkspace_sptr ew)

Perform some finalization on event workspace stuff.

Definition at line 691 of file WorkspaceCreationHelper.cpp.

◆ getWS()

template<typename T >
std::shared_ptr< T > WorkspaceCreationHelper::getWS ( const std::string &  name)

Returns a workspace of a given type.

Definition at line 124 of file WorkspaceCreationHelper.h.

References Mantid::Kernel::SingletonHolder< T >::Instance().

◆ maskSpectra()

Workspace2D_sptr WorkspaceCreationHelper::maskSpectra ( Mantid::DataObjects::Workspace2D_sptr  workspace,
const std::set< int64_t > &  maskedWorkspaceIndices 
)

◆ populateWsWithInitList()

template<typename T >
void WorkspaceCreationHelper::populateWsWithInitList ( T &  destination,
size_t  startingIndex,
const std::initializer_list< double > &  values 
)

Populates a mutable reference from initializer list starting at user specified index.

Populates the destination array (usually a mutable histogram) starting at the index specified with the doubles provided in an initializer list.

Note the caller is responsible for ensuring the destination has capacity for startingIndex + size(initializer list) number of values

Parameters
destination:: The array to populate with data
startingIndex:: The index to start populating data at
values:: The initializer list to populate the array with starting at the index specified

Definition at line 1224 of file WorkspaceCreationHelper.cpp.

References index.

Referenced by createRebinnedOutputWorkspace().

◆ reflectometryWorkspace()

DataObjects::Workspace2D_sptr WorkspaceCreationHelper::reflectometryWorkspace ( const double  startX,
const int  nSpectra,
const int  nBins,
const double  deltaX 
)

Creates a binned 2DWorkspace with title and TOF x-axis and counts y-axis.

Parameters
startX:: start TOF x-value
nSpectra:: number of spectra
nBins:: number of bins
deltaX:: TOF delta x-value
Returns
a Workspace2D

Definition at line 555 of file WorkspaceCreationHelper.cpp.

References create2DWorkspaceBinned(), nSpectra, and workspace.

Referenced by create2DWorkspaceWithReflectometryInstrument(), and create2DWorkspaceWithReflectometryInstrumentMultiDetector().

◆ removeWS()

void WorkspaceCreationHelper::removeWS ( const std::string &  name)

Deletes a workspace.

Parameters
name:: The name of the workspace

Definition at line 79 of file WorkspaceCreationHelper.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance().

◆ setGoniometer()

void WorkspaceCreationHelper::setGoniometer ( const Mantid::API::MatrixWorkspace_sptr ws,
double  phi,
double  chi,
double  omega 
)

Create a default universal goniometer and set its angles.

Parameters
ws:: workspace to set
phi:: +Y rotation angle (deg)
chi:: +X rotation angle (deg)
omega:: +Y rotation angle (deg)

Definition at line 950 of file WorkspaceCreationHelper.cpp.

References addTSPEntry(), and Mantid::Geometry::Goniometer::makeUniversalGoniometer().

Referenced by Mantid::DataObjects::MDEventsTestHelper::createDiffractionEventWorkspace().

◆ setOrientedLattice()

void WorkspaceCreationHelper::setOrientedLattice ( const Mantid::API::MatrixWorkspace_sptr ws,
double  a,
double  b,
double  c 
)

Sets the OrientedLattice in the crystal as an crystal with given lattice lengths, angles of 90 deg.

Parameters
ws:: workspace to set
a:: lattice length
b:: lattice length
c:: lattice length

Definition at line 938 of file WorkspaceCreationHelper.cpp.

Referenced by Mantid::DataObjects::MDEventsTestHelper::createDiffractionEventWorkspace().

◆ storeWS()

template<typename WSType >
void WorkspaceCreationHelper::storeWS ( const std::string &  name,
WSType &  ws 
)

Adds a workspace to the ADS.

Parameters
name:: The name of the workspace
ws:: The workspace object

Definition at line 118 of file WorkspaceCreationHelper.h.

References Mantid::Kernel::SingletonHolder< T >::Instance().