|
Mantid
|
Namespaces | |
| namespace | impl |
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 a 2D workspace. | |
| void | addTSPEntry (Run &runInfo, const std::string &name, double val) |
| Utility function to add a TimeSeriesProperty with a name and value. | |
| std::shared_ptr< Mantid::DataObjects::TableWorkspace > | buildPreprocessedDetectorsWorkspace (const Mantid::API::MatrixWorkspace_sptr &ws) |
| Build table workspace with preprocessed detectors for existing workspace with instrument. | |
| 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. | |
| 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. | |
| 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. | |
| template<typename... Args> | |
| Mantid::DataObjects::Workspace2D_sptr | create2DWorkspaceFromFunctionAndArgsList (impl::HistogramFunc< Args... > spectrumFunc, std::initializer_list< std::tuple< Args... > > argss) |
| Creates a 2D workspace from a function object, and a list of args instantiations. | |
| template<typename... Args> | |
| Mantid::DataObjects::Workspace2D_sptr | create2DWorkspaceFromFunctionAndArgsList_ (impl::HistogramFunc< Args... > spectrumFunc, const std::vector< std::tuple< Args... > > &argss) |
| 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. | |
| 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. | |
| Mantid::API::MatrixWorkspace_sptr | create2DWorkspaceRagged (int version=0) |
| Create a 2D ragged workspace. | |
| 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. | |
| Mantid::DataObjects::Workspace2D_sptr | create2DWorkspaceWhereYIsWorkspaceIndex (int nhist, int numBoundaries) |
| Create a Workspace2D where the Y value at each bin is == to the workspace index. | |
| 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. | |
| 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. | |
| Mantid::DataObjects::Workspace2D_sptr | create2DWorkspaceWithRectangularInstrument (int numBanks, int numPixels, int numBins, const std::string &instrumentName) |
| Create an Workspace2D with an instrument that contains RectangularDetector's. | |
| 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. | |
| 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. | |
| 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 | |
| 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. | |
| Mantid::DataObjects::EventWorkspace_sptr | createEventWorkspace () |
| Create event workspace with: 500 pixels 1000 histogrammed bins. | |
| Mantid::DataObjects::EventWorkspace_sptr | createEventWorkspace (int numPixels, int numBins, int numEvents, double x0, double binDelta, int eventPattern, int start_at_pixelID) |
| Create event workspace. | |
| 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. | |
| 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. | |
| Mantid::DataObjects::EventWorkspace_sptr | createEventWorkspaceWithFullInstrument2 (int numBanks, int numPixels, bool clearEvents=true) |
| Create an Eventworkspace with instrument 2.0 that contains RectangularDetector's. | |
| Mantid::DataObjects::EventWorkspace_sptr | createEventWorkspaceWithNonUniformInstrument (int numBanks, bool clearEvents) |
| Creates an event workspace with instrument which consists of cylindrical detectors. | |
| 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. | |
| 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::API::MatrixWorkspace_sptr | createFocusedSNAPLiteInstrument (const std::string &wkspName, const std::string &groupingAlg, const std::string &groupingDescr, const double ang1=-65.3, const double ang2=104.95) |
| Mantid::DataObjects::EventWorkspace_sptr | createGroupedEventWorkspace (std::vector< std::vector< int > > const &groups, int numBins, double binDelta, double xOffset) |
| Create event workspace, with several detector IDs in one event list. | |
| 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. | |
| 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. | |
| 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. | |
| 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::LeanElasticPeaksWorkspace > | createLeanPeaksWorkspace (const int numPeaks, const bool createOrientedLattice=false) |
| Create a simple lean peaks workspace containing the given number of peaks. | |
| std::shared_ptr< Mantid::DataObjects::LeanElasticPeaksWorkspace > | createLeanPeaksWorkspace (const int numPeaks, const Mantid::Kernel::DblMatrix &ubMat) |
| Create a simple lean peaks workspace containing the given number of peaks and UB matrix. | |
| std::shared_ptr< Mantid::DataObjects::PeaksWorkspace > | createPeaksWorkspace (const int numPeaks, const bool createOrientedLattice=false) |
| Create a simple peaks workspace containing the given number of peaks. | |
| std::shared_ptr< Mantid::DataObjects::PeaksWorkspace > | createPeaksWorkspace (const int numPeaks, const Mantid::Kernel::DblMatrix &ubMat) |
| Create a simple peaks workspace containing the given number of peaks and UB matrix. | |
| 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. | |
| 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. | |
| Mantid::DataObjects::RebinnedOutput_sptr | createRebinnedOutputWorkspace () |
| Function to create a fixed RebinnedOutput workspace. | |
| Mantid::API::MatrixWorkspace_sptr | createSNAPLiteInstrument (const std::string &wkspName, const double ang1=-65.3, const double ang2=104.95) |
| Create a copy of the SNAP "lite" instrument. | |
| 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. | |
| 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. | |
| template<typename T > | |
| std::shared_ptr< T > | getWS (const std::string &name) |
| Returns a workspace of a given type. | |
| 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. | |
| 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. | |
| void | removeWS (const std::string &name) |
| Deletes a workspace. | |
| void | setGoniometer (const Mantid::API::MatrixWorkspace_sptr &ws, double phi, double chi, double omega) |
| Create a default universal goniometer and set its angles. | |
| 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. | |
| template<typename WSType > | |
| void | storeWS (const std::string &name, WSType &ws) |
| Adds a workspace to the ADS. | |
| void WorkspaceCreationHelper::addNoise | ( | const Mantid::API::MatrixWorkspace_sptr & | ws, |
| double | noise, | ||
| const double | lower, | ||
| const double | upper | ||
| ) |
Add random noise to a 2D workspace.
Add random noise to the signal.
| 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 393 of file WorkspaceCreationHelper.cpp.
References lower, Mantid::Kernel::MersenneTwister::nextValue(), and upper.
| void WorkspaceCreationHelper::addTSPEntry | ( | Run & | runInfo, |
| const std::string & | name, | ||
| double | val | ||
| ) |
Utility function to add a TimeSeriesProperty with a name and value.
| runInfo | :: Run to add to |
| name | :: property name |
| val | :: value |
Definition at line 982 of file WorkspaceCreationHelper.cpp.
References Mantid::API::LogManager::addProperty(), Mantid::Kernel::TimeSeriesProperty< TYPE >::addValue(), and name.
Referenced by createProcessedInelasticWS(), createProcessedWorkspaceWithCylComplexInstrument(), and setGoniometer().
| 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.
| Workspace2D_sptr WorkspaceCreationHelper::create1DWorkspaceConstant | ( | int | size, |
| double | value, | ||
| double | error, | ||
| bool | isHisto | ||
| ) |
Definition at line 125 of file WorkspaceCreationHelper.cpp.
References createHisto(), error, and value.
Referenced by create1DWorkspaceConstantWithXerror().
| Workspace2D_sptr WorkspaceCreationHelper::create1DWorkspaceConstantWithXerror | ( | int | size, |
| double | value, | ||
| double | error, | ||
| double | xError, | ||
| bool | isHisto = true |
||
| ) |
Definition at line 134 of file WorkspaceCreationHelper.cpp.
References create1DWorkspaceConstant(), error, and value.
| Workspace2D_sptr WorkspaceCreationHelper::create1DWorkspaceFib | ( | int | size, |
| bool | isHisto | ||
| ) |
Definition at line 142 of file WorkspaceCreationHelper.cpp.
References createHisto().
| Workspace2D_sptr WorkspaceCreationHelper::create1DWorkspaceRand | ( | int | size, |
| bool | isHisto | ||
| ) |
Definition at line 112 of file WorkspaceCreationHelper.cpp.
References createHisto(), and Mantid::Kernel::MersenneTwister::nextValue().
| 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 1339 of file WorkspaceCreationHelper.cpp.
| 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 439 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceWithFullInstrument().
| Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspace | ( | size_t | nhist, |
| size_t | numBoundaries | ||
| ) |
Definition at line 152 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceBinned().
Referenced by create2DWorkspaceRagged(), Mantid::IndirectFitDataCreationHelper::createWorkspace(), and createWorkspaceGroup().
| 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 |
||
| ) |
Definition at line 233 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceWithValues().
Referenced by create2DWorkspace123WithMaskedBin(), create2DWorkspaceWithFullInstrument(), and SANSInstrumentCreationHelper::createSANSInstrumentWorkspace().
| Mantid::DataObjects::Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspace123WithMaskedBin | ( | int | numHist, |
| int | numBins, | ||
| int | maskedWorkspaceIndex, | ||
| int | maskedBinIndex | ||
| ) |
Definition at line 1385 of file WorkspaceCreationHelper.cpp.
References create2DWorkspace123().
| 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 238 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceWithValues().
| Workspace2D_sptr WorkspaceCreationHelper::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.
Filled with Y = 2.0 and E = sqrt(2.0)w
Filled with Y = 2.0 and E = M_SQRT2
Definition at line 346 of file WorkspaceCreationHelper.cpp.
References Mantid::Geometry::x, and Mantid::Geometry::y.
Referenced by create2DWorkspace(), create2DWorkspaceThetaVsTOF(), create2DWorkspaceWhereYIsWorkspaceIndex(), create2DWorkspaceWithFullInstrument(), create2DWorkspaceWithGeographicalDetectors(), create2DWorkspaceWithRectangularInstrument(), createGroupedWorkspace2D(), createGroupedWorkspace2DWithRingsAndBoxes(), and reflectometryWorkspace().
| 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 function type must define operator()(double, int)
| 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 |
Definition at line 197 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().
| Mantid::DataObjects::Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceFromFunctionAndArgsList | ( | impl::HistogramFunc< Args... > | spectrumFunc, |
| std::initializer_list< std::tuple< Args... > > | argss | ||
| ) |
Creates a 2D workspace from a function object, and a list of args instantiations.
The number of spectra in the resulting workspace corresponds to the number of entries in the provided list.
| spectrumFunc | :: A function to use to calculate the histogram of each spectrum |
| argss | :: a list of argument instantiations to the function, each element of the list provides the required arguments to produce a single spectrum |
Definition at line 54 of file WorkspaceCreationHelper.hxx.
References WorkspaceCreationHelper::impl::call_function(), and n.
| Mantid::DataObjects::Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceFromFunctionAndArgsList_ | ( | impl::HistogramFunc< Args... > | spectrumFunc, |
| const std::vector< std::tuple< Args... > > & | argss | ||
| ) |
Definition at line 73 of file WorkspaceCreationHelper.hxx.
References WorkspaceCreationHelper::impl::call_function(), and n.
| 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_SQRT2 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 369 of file WorkspaceCreationHelper.cpp.
References createHisto(), Mantid::Geometry::x, and Mantid::Geometry::y.
| 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
Definition at line 356 of file WorkspaceCreationHelper.cpp.
References Mantid::Geometry::x, and Mantid::Geometry::y.
| MatrixWorkspace_sptr WorkspaceCreationHelper::create2DWorkspaceRagged | ( | int | version = 0 | ) |
Create a 2D ragged workspace.
Create a ragged 2D workspace.
Definition at line 295 of file WorkspaceCreationHelper.cpp.
References create2DWorkspace().
| 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 172 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceBinned().
| Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceWhereYIsWorkspaceIndex | ( | int | nhist, |
| int | numBoundaries | ||
| ) |
Create a Workspace2D where the Y value at each bin is == to the workspace index.
| nhist | :: # histograms |
| numBoundaries | :: # of bins |
Definition at line 162 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceBinned().
| 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 412 of file WorkspaceCreationHelper.cpp.
References InstrumentCreationHelper::addFullInstrumentToWorkspace(), create2DWorkspace123(), and create2DWorkspaceBinned().
Referenced by create2DDetectorScanWorkspaceWithFullInstrument(), and Mantid::IndirectFitDataCreationHelper::createInstrumentWorkspace().
| 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 466 of file WorkspaceCreationHelper.cpp.
References InstrumentCreationHelper::addInstrumentWithGeographicalDetectorsToWorkspace(), and create2DWorkspaceBinned().
| Mantid::DataObjects::Workspace2D_sptr WorkspaceCreationHelper::create2DWorkspaceWithRectangularInstrument | ( | int | numBanks, |
| int | numPixels, | ||
| int | numBins, | ||
| const std::string & | instrumentName | ||
| ) |
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
| numBanks | :: number of rectangular banks |
| numPixels | :: each bank will be numPixels*numPixels |
| numBins | :: each spectrum will have this # of bins |
| instrumentName | :: the name of the new instrument |
Definition at line 490 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceBinned(), and ComponentCreationHelper::createTestInstrumentRectangular().
| 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.
| 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 641 of file WorkspaceCreationHelper.cpp.
References InstrumentCreationHelper::addComponent(), InstrumentCreationHelper::addDetector(), InstrumentCreationHelper::addMonitor(), InstrumentCreationHelper::addSample(), InstrumentCreationHelper::addSource(), reflectometryWorkspace(), and workspace.
| 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.
| 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 689 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(), and Mantid::FrameworkTestHelpers::createWorkspaceSingle().
| 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
| 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) |
Definition at line 200 of file WorkspaceCreationHelper.cpp.
References createHisto(), and maskSpectra().
Referenced by create2DWorkspace123(), create2DWorkspace154(), create2DWorkspaceWithValuesAndXerror(), and createProcessedInelasticWS().
| 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 222 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceWithValues().
| ITableWorkspace_sptr WorkspaceCreationHelper::createEPPTableWorkspace | ( | const std::vector< EPPTableRow > & | rows = {} | ) |
Create a table workspace corresponding to what the FindEPP algorithm gives.
Definition at line 1356 of file WorkspaceCreationHelper.cpp.
References WorkspaceCreationHelper::EPPTableRow::SUCCESS.
| EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspace | ( | ) |
Create event workspace with: 500 pixels 1000 histogrammed bins.
Definition at line 760 of file WorkspaceCreationHelper.cpp.
References createEventWorkspace().
Referenced by createEventWorkspace(), and createEventWorkspace2().
| 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 774 of file WorkspaceCreationHelper.cpp.
References createEventWorkspaceWithStartTime(), and Mantid::DataHandling::numEvents().
| 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 768 of file WorkspaceCreationHelper.cpp.
References createEventWorkspace().
Referenced by createEventWorkspaceWithFullInstrument(), createEventWorkspaceWithFullInstrument2(), and createEventWorkspaceWithNonUniformInstrument().
| Mantid::DataObjects::EventWorkspace_sptr WorkspaceCreationHelper::createEventWorkspace3 | ( | const Mantid::DataObjects::EventWorkspace_const_sptr & | sourceWS, |
| const std::string & | wsname, | ||
| Mantid::API::Algorithm * | alg | ||
| ) |
Definition at line 1129 of file WorkspaceCreationHelper.cpp.
References Mantid::API::Algorithm::createChildAlgorithm(), and UNUSED_ARG.
| 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.
| numBanks | :: number of rectangular banks |
| numPixels | :: each bank will be numPixels*numPixels |
| clearEvents | :: if true, erase the events from list |
Definition at line 517 of file WorkspaceCreationHelper.cpp.
References createEventWorkspace2(), and ComponentCreationHelper::createTestInstrumentRectangular().
| 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.
| numBanks | :: number of rectangular banks |
| numPixels | :: each bank will be numPixels*numPixels |
| clearEvents | :: if true, erase the events from list |
Definition at line 554 of file WorkspaceCreationHelper.cpp.
References createEventWorkspace2(), and ComponentCreationHelper::createTestInstrumentRectangular2().
| 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
| numBanks | :: How many detector groups there should be |
| clearEvents | :: Whether workspace should not contain any events |
Definition at line 581 of file WorkspaceCreationHelper.cpp.
References createEventWorkspace2(), and ComponentCreationHelper::createTestInstrumentCylindrical().
| 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 783 of file WorkspaceCreationHelper.cpp.
References Mantid::DataHandling::numEvents(), Mantid::API::ISpectrum::setDetectorID(), and Mantid::API::ISpectrum::setSpectrumNo().
| 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().
| MatrixWorkspace_sptr WorkspaceCreationHelper::createFocusedSNAPLiteInstrument | ( | const std::string & | wkspName, |
| const std::string & | groupingAlg, | ||
| const std::string & | groupingDescr, | ||
| const double | ang1 = -65.3, |
||
| const double | ang2 = 104.95 |
||
| ) |
Definition at line 1440 of file WorkspaceCreationHelper.cpp.
References createSNAPLiteInstrument().
| EventWorkspace_sptr WorkspaceCreationHelper::createGroupedEventWorkspace | ( | std::vector< std::vector< int > > const & | groups, |
| int | numBins, | ||
| double | binDelta = 1., |
||
| double | xOffset = 0. |
||
| ) |
Create event workspace, with several detector IDs in one event list.
Definition at line 831 of file WorkspaceCreationHelper.cpp.
| 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 903 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceBinned(), and ComponentCreationHelper::createTestInstrumentCylindrical().
| MatrixWorkspace_sptr WorkspaceCreationHelper::createGroupedWorkspace2DWithRingsAndBoxes | ( | size_t | RootOfNumHist = 10, |
| int | numBins = 10, |
||
| double | binDelta = 1.0 |
||
| ) |
Definition at line 918 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceBinned(), and ComponentCreationHelper::createTestInstrumentCylindrical().
Referenced by createProcessedWorkspaceWithCylComplexInstrument().
| 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.
| 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 |
Definition at line 97 of file WorkspaceCreationHelper.cpp.
Referenced by create1DWorkspaceConstant(), create1DWorkspaceFib(), create1DWorkspaceRand(), create2DWorkspaceNonUniformlyBinned(), and create2DWorkspaceWithValues().
| 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.
| 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 |
Definition at line 97 of file WorkspaceCreationHelper.cpp.
Referenced by create1DWorkspaceConstant(), create1DWorkspaceFib(), create1DWorkspaceRand(), create2DWorkspaceNonUniformlyBinned(), and create2DWorkspaceWithValues().
| 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 | ||
| ) |
Definition at line 722 of file WorkspaceCreationHelper.cpp.
References InstrumentCreationHelper::addDetector(), InstrumentCreationHelper::addSample(), InstrumentCreationHelper::addSource(), Mantid::Geometry::Left, workspace, Mantid::Geometry::X, and Mantid::Geometry::Y.
| Mantid::DataObjects::LeanElasticPeaksWorkspace_sptr WorkspaceCreationHelper::createLeanPeaksWorkspace | ( | const int | numPeaks, |
| const bool | createOrientedLattice = false |
||
| ) |
Create a simple lean peaks workspace containing the given number of peaks.
Definition at line 1312 of file WorkspaceCreationHelper.cpp.
References ComponentCreationHelper::createTestInstrumentRectangular2().
Referenced by createLeanPeaksWorkspace().
| Mantid::DataObjects::LeanElasticPeaksWorkspace_sptr WorkspaceCreationHelper::createLeanPeaksWorkspace | ( | const int | numPeaks, |
| const Mantid::Kernel::DblMatrix & | ubMat | ||
| ) |
Create a simple lean peaks workspace containing the given number of peaks and UB matrix.
Definition at line 1328 of file WorkspaceCreationHelper.cpp.
References createLeanPeaksWorkspace(), Mantid::Kernel::Matrix< T >::numCols(), and Mantid::Kernel::Matrix< T >::numRows().
| 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 1285 of file WorkspaceCreationHelper.cpp.
References ComponentCreationHelper::createTestInstrumentRectangular2().
Referenced by createPeaksWorkspace().
| 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 1301 of file WorkspaceCreationHelper.cpp.
References createPeaksWorkspace(), Mantid::Kernel::Matrix< T >::numCols(), and Mantid::Kernel::Matrix< T >::numRows().
| 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.
| 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 1057 of file WorkspaceCreationHelper.cpp.
References addTSPEntry(), create2DWorkspaceWithValues(), ComponentCreationHelper::createCylInstrumentWithDetInGivenPositions(), and Mantid::Geometry::Goniometer::makeUniversalGoniometer().
Referenced by Mantid::IndirectFitDataCreationHelper::createWorkspaceWithInelasticInstrument().
| Mantid::API::MatrixWorkspace_sptr WorkspaceCreationHelper::createProcessedWorkspaceWithCylComplexInstrument | ( | size_t | numPixels = 100, |
| size_t | numBins = 20, |
||
| bool | has_oriented_lattice = true |
||
| ) |
Definition at line 1020 of file WorkspaceCreationHelper.cpp.
References addTSPEntry(), createGroupedWorkspace2DWithRingsAndBoxes(), and Mantid::Geometry::Goniometer::makeUniversalGoniometer().
| EventWorkspace_sptr WorkspaceCreationHelper::createRandomEventWorkspace | ( | size_t | numbins, |
| size_t | numpixels, | ||
| double | bin_delta | ||
| ) |
Create an event workspace with randomized TOF and pulsetimes.
| 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 |
Definition at line 868 of file WorkspaceCreationHelper.cpp.
References Mantid::API::ISpectrum::addDetectorID(), and Mantid::Kernel::MersenneTwister::nextValue().
| RebinnedOutput_sptr WorkspaceCreationHelper::createRebinnedOutputWorkspace | ( | ) |
Function to create a fixed RebinnedOutput workspace.
Definition at line 1182 of file WorkspaceCreationHelper.cpp.
References Mantid::Kernel::VectorHelper::createAxisFromRebinParams(), and populateWsWithInitList().
| MatrixWorkspace_sptr WorkspaceCreationHelper::createSNAPLiteInstrument | ( | const std::string & | wkspName, |
| const double | ang1 = -65.3, |
||
| const double | ang2 = 104.95 |
||
| ) |
Create a copy of the SNAP "lite" instrument.
This is the normal instrument with the 8x8 pixels added together. The default values for the detector positions are taken from SNAP_57514.
Definition at line 1392 of file WorkspaceCreationHelper.cpp.
References Mantid::Kernel::TimeSeriesProperty< TYPE >::addValue().
Referenced by createFocusedSNAPLiteInstrument().
| 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 279 of file WorkspaceCreationHelper.cpp.
References create2DWorkspace(), and group.
| WorkspaceSingleValue_sptr WorkspaceCreationHelper::createWorkspaceSingleValue | ( | double | value | ) |
Definition at line 742 of file WorkspaceCreationHelper.cpp.
References value.
| WorkspaceSingleValue_sptr WorkspaceCreationHelper::createWorkspaceSingleValueWithError | ( | double | value, |
| double | error | ||
| ) |
Definition at line 746 of file WorkspaceCreationHelper.cpp.
| void WorkspaceCreationHelper::displayData | ( | const Mantid::API::MatrixWorkspace_const_sptr & | ws | ) |
Definition at line 945 of file WorkspaceCreationHelper.cpp.
References displayDataX().
| void WorkspaceCreationHelper::displayDataE | ( | const Mantid::API::MatrixWorkspace_const_sptr & | ws | ) |
Definition at line 963 of file WorkspaceCreationHelper.cpp.
| void WorkspaceCreationHelper::displayDataX | ( | const Mantid::API::MatrixWorkspace_const_sptr & | ws | ) |
Definition at line 949 of file WorkspaceCreationHelper.cpp.
References Mantid::Geometry::x.
Referenced by displayData().
| void WorkspaceCreationHelper::displayDataY | ( | const Mantid::API::MatrixWorkspace_const_sptr & | ws | ) |
Definition at line 934 of file WorkspaceCreationHelper.cpp.
References Mantid::Geometry::y.
| void WorkspaceCreationHelper::eventWorkspace_Finalize | ( | const Mantid::DataObjects::EventWorkspace_sptr & | ew | ) |
Perform some finalization on event workspace stuff.
Definition at line 751 of file WorkspaceCreationHelper.cpp.
| std::shared_ptr< T > WorkspaceCreationHelper::getWS | ( | const std::string & | name | ) |
Returns a workspace of a given type.
Definition at line 125 of file WorkspaceCreationHelper.h.
References name.
| Workspace2D_sptr WorkspaceCreationHelper::maskSpectra | ( | Mantid::DataObjects::Workspace2D_sptr | workspace, |
| const std::set< int64_t > & | maskedWorkspaceIndices | ||
| ) |
Definition at line 243 of file WorkspaceCreationHelper.cpp.
References Mantid::Geometry::ShapeFactory::createShape(), index, Mantid::Geometry::Component::setPos(), and workspace.
Referenced by create2DWorkspaceWithValues().
| 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
| 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 1277 of file WorkspaceCreationHelper.cpp.
References index.
Referenced by createRebinnedOutputWorkspace().
| 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.
| startX | :: start TOF x-value |
| nSpectra | :: number of spectra |
| nBins | :: number of bins |
| deltaX | :: TOF delta x-value |
Definition at line 615 of file WorkspaceCreationHelper.cpp.
References create2DWorkspaceBinned(), nSpectra, and workspace.
Referenced by create2DWorkspaceWithReflectometryInstrument(), and create2DWorkspaceWithReflectometryInstrumentMultiDetector().
| void WorkspaceCreationHelper::removeWS | ( | const std::string & | name | ) |
Deletes a workspace.
| name | :: The name of the workspace |
Definition at line 83 of file WorkspaceCreationHelper.cpp.
References name.
| void WorkspaceCreationHelper::setGoniometer | ( | const Mantid::API::MatrixWorkspace_sptr & | ws, |
| double | phi, | ||
| double | chi, | ||
| double | omega | ||
| ) |
Create a default universal goniometer and set its angles.
| ws | :: workspace to set |
| phi | :: +Y rotation angle (deg) |
| chi | :: +X rotation angle (deg) |
| omega | :: +Y rotation angle (deg) |
Definition at line 1010 of file WorkspaceCreationHelper.cpp.
References addTSPEntry(), and Mantid::Geometry::Goniometer::makeUniversalGoniometer().
Referenced by Mantid::DataObjects::MDEventsTestHelper::createDiffractionEventWorkspace().
| 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.
| ws | :: workspace to set |
| a | :: lattice length |
| b | :: lattice length |
| c | :: lattice length |
Definition at line 998 of file WorkspaceCreationHelper.cpp.
Referenced by Mantid::DataObjects::MDEventsTestHelper::createDiffractionEventWorkspace().
| void WorkspaceCreationHelper::storeWS | ( | const std::string & | name, |
| WSType & | ws | ||
| ) |
Adds a workspace to the ADS.
| name | :: The name of the workspace |
| ws | :: The workspace object |
Definition at line 119 of file WorkspaceCreationHelper.h.
References name.