Mantid
Loading...
Searching...
No Matches
Namespaces | Functions
MDEventsTestHelper.h File Reference
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/BoxController.h"
#include "MantidAPI/IMDEventWorkspace_fwd.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidDataObjects/MDEventFactory.h"
#include "MantidDataObjects/MDEventWorkspace.h"
#include "MantidDataObjects/MDLeanEvent.h"
#include "MantidKernel/DateAndTime.h"
#include "MantidKernel/Utils.h"

Go to the source code of this file.

Namespaces

namespace  Mantid
 Helper class which provides the Collimation Length for SANS instruments.
 
namespace  Mantid::DataObjects
 
namespace  Mantid::DataObjects::MDEventsTestHelper
 Set of helper methods for testing MDEventWorkspace things.
 

Functions

void Mantid::DataObjects::MDEventsTestHelper::checkAndDeleteFile (const std::string &filename)
 Delete a file from disk. More...
 
Mantid::DataObjects::EventWorkspace_sptr Mantid::DataObjects::MDEventsTestHelper::createDiffractionEventWorkspace (int numEvents, int numPixels=400, int numBins=160)
 Create an EventWorkspace containing fake data of single-crystal diffraction. More...
 
template<typename MDBOX >
static void Mantid::DataObjects::MDEventsTestHelper::extents_match (MDBOX box, size_t dim, double min, double max)
 Helper function compares the extents of the given box. More...
 
template<size_t nd>
static void Mantid::DataObjects::MDEventsTestHelper::feedMDBox (MDBoxBase< MDLeanEvent< nd >, nd > *box, size_t repeat=1, size_t numPerSide=10, coord_t start=0.5, coord_t step=1.0)
 Feed a MDGridBox with evenly-spaced events. More...
 
template<typename MDE , size_t nd>
std::shared_ptr< Mantid::DataObjects::MDEventWorkspace< MDE, nd > > Mantid::DataObjects::MDEventsTestHelper::makeAnyMDEW (size_t splitInto, coord_t min, coord_t max, size_t numEventsPerBox=0, const std::string &wsName="", const std::string &axisNameFormat="Axis%d", const std::string &axisIdFormat="Axis%d")
 Create a test MDEventWorkspace<nd> . More...
 
template<typename MDE , size_t nd>
std::shared_ptr< Mantid::DataObjects::MDEventWorkspace< MDE, nd > > Mantid::DataObjects::MDEventsTestHelper::makeAnyMDEWWithFrames (size_t splitInto, coord_t min, coord_t max, const Mantid::Geometry::MDFrame &frame, size_t numEventsPerBox=0, const std::string &wsName="", const std::string &axisNameFormat="Axis%d", const std::string &axisIdFormat="Axis%d")
 Create a test MDEventWorkspace<nd> . More...
 
template<typename MDE , size_t nd>
std::shared_ptr< Mantid::DataObjects::MDEventWorkspace< MDE, nd > > Mantid::DataObjects::MDEventsTestHelper::makeAnyMDEWWithIndividualFrames (size_t splitInto, coord_t min, coord_t max, std::vector< Mantid::Geometry::MDFrame_sptr > frames, size_t numEventsPerBox=0, const std::string &wsName="", std::string axisNameFormat="Axis%d", std::string axisIdFormat="Axis%d")
 Create a test MDEventWorkspace<nd> . More...
 
MDEventWorkspace3Lean::sptr Mantid::DataObjects::MDEventsTestHelper::makeFakeMDEventWorkspace (const std::string &wsName, long numEvents=10000, Kernel::SpecialCoordinateSystem coord=Kernel::None)
 Make a (optionally) file backed MDEventWorkspace with 10000 fake random data points. More...
 
MDHistoWorkspace_sptr Mantid::DataObjects::MDEventsTestHelper::makeFakeMDHistoWorkspace (double signal, size_t numDims, size_t numBins=10, coord_t max=10.0, double errorSquared=1.0, const std::string &name="", double numEvents=1.0)
 Make a fake n-dimensional MDHistoWorkspace. More...
 
Mantid::DataObjects::MDHistoWorkspace_sptr Mantid::DataObjects::MDEventsTestHelper::makeFakeMDHistoWorkspaceGeneral (size_t numDims, double signal, double errorSquared, size_t *numBins, coord_t *min, coord_t *max, const std::string &name="")
 More general fake n-dimensionsal MDHistoWorkspace. More...
 
Mantid::DataObjects::MDHistoWorkspace_sptr Mantid::DataObjects::MDEventsTestHelper::makeFakeMDHistoWorkspaceGeneral (size_t numDims, double signal, double errorSquared, size_t *numBins, coord_t *min, coord_t *max, std::vector< std::string > names, const std::string &name="")
 More general fake n-dimensionsal MDHistoWorkspace. More...
 
Mantid::DataObjects::MDHistoWorkspace_sptr Mantid::DataObjects::MDEventsTestHelper::makeFakeMDHistoWorkspaceWithMDFrame (double signal, size_t numDims, const Mantid::Geometry::MDFrame &frame, size_t numBins, coord_t max, double errorSquared, const std::string &name, double numEvents)
 Creates a fake MDHistoWorkspace with MDFrame selection. More...
 
MDBox< MDLeanEvent< 1 >, 1 > * Mantid::DataObjects::MDEventsTestHelper::makeMDBox1 (size_t splitInto=10, API::BoxController *splitter=nullptr)
 Generate an empty MDBox. More...
 
MDBox< MDLeanEvent< 3 >, 3 > * Mantid::DataObjects::MDEventsTestHelper::makeMDBox3 ()
 Generate an empty MDBox with 3 dimensions, split 10x5x2. More...
 
std::vector< MDLeanEvent< 1 > > Mantid::DataObjects::MDEventsTestHelper::makeMDEvents1 (size_t num)
 Return a vector with this many MDEvents, spaced evenly from 0.5, 1.5, etc. More...
 
template<size_t nd>
std::shared_ptr< MDEventWorkspace< MDLeanEvent< nd >, nd > > Mantid::DataObjects::MDEventsTestHelper::makeMDEW (size_t splitInto, coord_t min, coord_t max, size_t numEventsPerBox=0)
 Make a MDEventWorkspace with MDLeanEvents. More...
 
template<size_t nd>
std::shared_ptr< MDEventWorkspace< MDEvent< nd >, nd > > Mantid::DataObjects::MDEventsTestHelper::makeMDEWFull (size_t splitInto, coord_t min, coord_t max, size_t numEventsPerBox=0)
 Make a MDEventWorkspace with MDEvents - updated to split dims by splitInto, not 10. More...
 
template<size_t nd>
std::shared_ptr< MDEventWorkspace< MDLeanEvent< nd >, nd > > Mantid::DataObjects::MDEventsTestHelper::makeMDEWWithFrames (size_t splitInto, coord_t min, coord_t max, const Mantid::Geometry::MDFrame &frame, size_t numEventsPerBox=0)
 Make a MDEventWorkspace with MDLeanEvents nad MDFrames. More...
 
template<size_t nd>
std::shared_ptr< MDEventWorkspace< MDLeanEvent< nd >, nd > > Mantid::DataObjects::MDEventsTestHelper::makeMDEWWithIndividualFrames (size_t splitInto, coord_t min, coord_t max, const std::vector< Mantid::Geometry::MDFrame_sptr > &frame, size_t numEventsPerBox=0)
 Make a MDEventWorkspace with MDLeanEvents and individual MDFrames. More...
 
template<size_t nd>
static MDGridBox< MDLeanEvent< nd >, nd > * Mantid::DataObjects::MDEventsTestHelper::makeMDGridBox (size_t split0=10, size_t split1=10, coord_t dimensionMin=0.0, coord_t dimensionMax=10.0)
 Generate an empty MDBox with 2 dimensions, splitting in (default) 10x10 boxes. More...
 
template<size_t nd>
static MDGridBox< MDLeanEvent< nd >, nd > * Mantid::DataObjects::MDEventsTestHelper::makeRecursiveMDGridBox (size_t splitInto, size_t levels)
 Generate a recursively gridded MDGridBox. More...
 
template<size_t nd>
static void Mantid::DataObjects::MDEventsTestHelper::recurseSplit (MDGridBox< MDLeanEvent< nd >, nd > *box, size_t atRecurseLevel, size_t recurseLimit)
 Recursively split an existing MDGridBox. More...