Commit d8fcdf18 authored by Janik Zikovsky's avatar Janik Zikovsky
Browse files

Refs #3720: Renamed a bunch of MDEW algorithms to MD.

parent 3d889b87
......@@ -1052,7 +1052,7 @@ public:
}
/** Demonstrate that calling "save" manually without using the MRU write buffer will slow things down
* due to seeking. Was an issue in LoadMDEW */
* due to seeking. Was an issue in LoadMD */
void test_withFakeSeeking_growingData_savingWithoutUsingMRU()
{
CPUTimer tim;
......
......@@ -4,6 +4,7 @@ set ( SRC_FILES
src/AffineMatrixParameterParser.cpp
src/BinToMDHistoWorkspace.cpp
src/BoxController.cpp
src/CentroidPeaksMD.cpp
src/CloneMDEventWorkspace.cpp
src/CoordTransformAffine.cpp
src/CoordTransformAffineParser.cpp
......@@ -12,25 +13,24 @@ set ( SRC_FILES
src/CoordTransformDistanceParser.cpp
src/CreateMDEventWorkspace.cpp
src/FakeMDEventData.cpp
src/FindPeaksMD.cpp
src/IMDBox.cpp
src/LoadMDEW.cpp
src/IntegratePeaksMD.cpp
src/LoadMD.cpp
src/LoadSQW.cpp
src/MDBin.cpp
src/MDBox.cpp
src/MDBoxIterator.cpp
src/MDCentroidPeaks.cpp
src/MDEWFindPeaks.cpp
src/MDEWPeakIntegration.cpp
src/MDEventFactory.cpp
src/MDEventWorkspace.cpp
src/MDGridBox.cpp
src/MDHistoWorkspace.cpp
src/MDLeanEvent.cpp
src/MakeDiffractionMDEventWorkspace.cpp
src/MergeMDEW.cpp
src/MergeMD.cpp
src/OneStepMDEW.cpp
src/PlusMDEW.cpp
src/SaveMDEW.cpp
src/PlusMD.cpp
src/SaveMD.cpp
)
set ( SRC_UNITY_IGNORE_FILES
......@@ -44,11 +44,11 @@ set ( SRC_UNITY_IGNORE_FILES
# Header files
set ( INC_FILES
inc/MantidMDEvents/MDEvent.h
inc/MantidMDEvents/AffineMatrixParameter.h
inc/MantidMDEvents/AffineMatrixParameterParser.h
inc/MantidMDEvents/BinToMDHistoWorkspace.h
inc/MantidMDEvents/BoxController.h
inc/MantidMDEvents/CentroidPeaksMD.h
inc/MantidMDEvents/CloneMDEventWorkspace.h
inc/MantidMDEvents/CoordTransformAffine.h
inc/MantidMDEvents/CoordTransformAffineParser.h
......@@ -57,26 +57,26 @@ set ( INC_FILES
inc/MantidMDEvents/CoordTransformDistanceParser.h
inc/MantidMDEvents/CreateMDEventWorkspace.h
inc/MantidMDEvents/FakeMDEventData.h
inc/MantidMDEvents/FindPeaksMD.h
inc/MantidMDEvents/IMDBox.h
inc/MantidMDEvents/LoadMDEW.h
inc/MantidMDEvents/IntegratePeaksMD.h
inc/MantidMDEvents/LoadMD.h
inc/MantidMDEvents/LoadSQW.h
inc/MantidMDEvents/MDBin.h
inc/MantidMDEvents/MDBox.h
inc/MantidMDEvents/MDBoxIterator.h
inc/MantidMDEvents/MDCentroidPeaks.h
inc/MantidMDEvents/MDDimensionStats.h
inc/MantidMDEvents/MDEWFindPeaks.h
inc/MantidMDEvents/MDEWPeakIntegration.h
inc/MantidMDEvents/MDEvent.h
inc/MantidMDEvents/MDEventFactory.h
inc/MantidMDEvents/MDEventWorkspace.h
inc/MantidMDEvents/MDGridBox.h
inc/MantidMDEvents/MDHistoWorkspace.h
inc/MantidMDEvents/MDLeanEvent.h
inc/MantidMDEvents/MakeDiffractionMDEventWorkspace.h
inc/MantidMDEvents/MergeMDEW.h
inc/MantidMDEvents/MergeMD.h
inc/MantidMDEvents/OneStepMDEW.h
inc/MantidMDEvents/PlusMDEW.h
inc/MantidMDEvents/SaveMDEW.h
inc/MantidMDEvents/PlusMD.h
inc/MantidMDEvents/SaveMD.h
)
# Test files. Other source files required.
......@@ -84,6 +84,7 @@ set ( TEST_FILES
test/AffineMatrixParameterParserTest.h
test/AffineMatrixParameterTest.h
test/BoxControllerTest.h
test/CentroidPeaksMDTest.h
test/CloneMDEventWorkspaceTest.h
test/CoordTransformAffineParserTest.h
test/CoordTransformAffineTest.h
......@@ -92,16 +93,15 @@ set ( TEST_FILES
test/CoordTransformDistanceTest.h
test/CreateMDEventWorkspaceTest.h
test/FakeMDEventDataTest.h
test/FindPeaksMDTest.h
test/IMDBoxTest.h
test/LoadMDEWTest.h
test/IntegratePeaksMDTest.h
test/LoadMDTest.h
test/LoadSQWTest.h
test/MDBinTest.h
test/MDBoxIteratorTest.h
test/MDBoxTest.h
test/MDCentroidPeaksTest.h
test/MDDimensionStatsTest.h
test/MDEWFindPeaksTest.h
test/MDEWPeakIntegrationTest.h
test/MDEventFactoryTest.h
test/MDEventTest.h
test/MDEventWorkspaceTest.h
......@@ -109,10 +109,10 @@ set ( TEST_FILES
test/MDHistoWorkspaceTest.h
test/MDLeanEventTest.h
test/MakeDiffractionMDEventWorkspaceTest.h
test/MergeMDEWTest.h
test/MergeMDTest.h
test/OneStepMDEWTest.h
test/PlusMDEWTest.h
test/SaveMDEWTest.h
test/PlusMDTest.h
test/SaveMDTest.h
)
set ( GMOCK_TEST_FILES
......
......@@ -17,14 +17,14 @@ namespace MDEvents
* @author Janik Zikovsky
* @date 2011-06-01
*/
class DLLExport MDCentroidPeaks : public API::Algorithm
class DLLExport CentroidPeaksMD : public API::Algorithm
{
public:
MDCentroidPeaks();
~MDCentroidPeaks();
CentroidPeaksMD();
~CentroidPeaksMD();
/// Algorithm's name for identification
virtual const std::string name() const { return "MDCentroidPeaks";};
virtual const std::string name() const { return "CentroidPeaksMD";};
/// Algorithm's version for identification
virtual int version() const { return 1;};
/// Algorithm's category for identification
......
......@@ -13,19 +13,19 @@ namespace Mantid
namespace MDEvents
{
/** MDEWFindPeaks : TODO: DESCRIPTION
/** FindPeaksMD : TODO: DESCRIPTION
*
* @author
* @date 2011-06-02
*/
class DLLExport MDEWFindPeaks : public API::Algorithm
class DLLExport FindPeaksMD : public API::Algorithm
{
public:
MDEWFindPeaks();
~MDEWFindPeaks();
FindPeaksMD();
~FindPeaksMD();
/// Algorithm's name for identification
virtual const std::string name() const { return "MDEWFindPeaks";};
virtual const std::string name() const { return "FindPeaksMD";};
/// Algorithm's version for identification
virtual int version() const { return 1;};
/// Algorithm's category for identification
......
......@@ -17,14 +17,14 @@ namespace MDEvents
* @author Janik Zikovsky
* @date 2011-04-13 18:11:53.496539
*/
class DLLExport MDEWPeakIntegration : public API::Algorithm
class DLLExport IntegratePeaksMD : public API::Algorithm
{
public:
MDEWPeakIntegration();
~MDEWPeakIntegration();
IntegratePeaksMD();
~IntegratePeaksMD();
/// Algorithm's name for identification
virtual const std::string name() const { return "MDEWPeakIntegration";};
virtual const std::string name() const { return "IntegratePeaksMD";};
/// Algorithm's version for identification
virtual int version() const { return 1;};
/// Algorithm's category for identification
......
......@@ -37,14 +37,14 @@ namespace MDEvents
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport LoadMDEW : public API::Algorithm
class DLLExport LoadMD : public API::Algorithm
{
public:
LoadMDEW();
~LoadMDEW();
LoadMD();
~LoadMD();
/// Algorithm's name for identification
virtual const std::string name() const { return "LoadMDEW";};
virtual const std::string name() const { return "LoadMD";};
/// Algorithm's version for identification
virtual int version() const { return 1;};
/// Algorithm's category for identification
......
......@@ -119,7 +119,7 @@ namespace MDEvents
bool getInMemory() const
{ return m_inMemory; }
/** Set whether the box data (from disk) is loaded in memory (for SaveMDEW with MakeFileBacked).
/** Set whether the box data (from disk) is loaded in memory (for SaveMD with MakeFileBacked).
* @param inMem :: true if it is in memory */
void setInMemory(const bool inMem)
{ m_inMemory = inMem; }
......
......@@ -38,14 +38,14 @@ namespace MDEvents
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport MergeMDEW : public API::Algorithm
class DLLExport MergeMD : public API::Algorithm
{
public:
MergeMDEW();
~MergeMDEW();
MergeMD();
~MergeMD();
/// Algorithm's name for identification
virtual const std::string name() const { return "MergeMDEW";};
virtual const std::string name() const { return "MergeMD";};
/// Algorithm's version for identification
virtual int version() const { return 1;};
/// Algorithm's category for identification
......
......@@ -11,7 +11,7 @@ namespace Mantid
namespace MDEvents
{
/** PlusMDEW : TODO: DESCRIPTION
/** PlusMD : TODO: DESCRIPTION
@author
@date 2011-08-12
......@@ -36,14 +36,14 @@ namespace MDEvents
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport PlusMDEW : public API::Algorithm
class DLLExport PlusMD : public API::Algorithm
{
public:
PlusMDEW();
~PlusMDEW();
PlusMD();
~PlusMD();
/// Algorithm's name for identification
virtual const std::string name() const { return "PlusMDEW";};
virtual const std::string name() const { return "PlusMD";};
/// Algorithm's version for identification
virtual int version() const { return 1;};
/// Algorithm's category for identification
......
......@@ -35,14 +35,14 @@ namespace MDEvents
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport SaveMDEW : public API::Algorithm
class DLLExport SaveMD : public API::Algorithm
{
public:
SaveMDEW();
~SaveMDEW();
SaveMD();
~SaveMD();
/// Algorithm's name for identification
virtual const std::string name() const { return "SaveMDEW";};
virtual const std::string name() const { return "SaveMD";};
/// Algorithm's version for identification
virtual int version() const { return 1;};
/// Algorithm's category for identification
......
......@@ -2,9 +2,9 @@
#include "MantidDataObjects/PeaksWorkspace.h"
#include "MantidKernel/System.h"
#include "MantidMDEvents/CoordTransformDistance.h"
#include "MantidMDEvents/MDCentroidPeaks.h"
#include "MantidMDEvents/CentroidPeaksMD.h"
#include "MantidMDEvents/MDEventFactory.h"
#include "MantidMDEvents/MDEWPeakIntegration.h"
#include "MantidMDEvents/IntegratePeaksMD.h"
using Mantid::DataObjects::PeaksWorkspace;
......@@ -14,7 +14,7 @@ namespace MDEvents
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(MDCentroidPeaks)
DECLARE_ALGORITHM(CentroidPeaksMD)
using namespace Mantid::API;
using namespace Mantid::DataObjects;
......@@ -26,21 +26,21 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Constructor
*/
MDCentroidPeaks::MDCentroidPeaks()
CentroidPeaksMD::CentroidPeaksMD()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
MDCentroidPeaks::~MDCentroidPeaks()
CentroidPeaksMD::~CentroidPeaksMD()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void MDCentroidPeaks::initDocs()
void CentroidPeaksMD::initDocs()
{
this->setWikiSummary("Find the centroid of single-crystal peaks in a MDEventWorkspace, in order to refine their positions.");
this->setOptionalMessage("Find the centroid of single-crystal peaks in a MDEventWorkspace, in order to refine their positions.");
......@@ -57,7 +57,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void MDCentroidPeaks::init()
void CentroidPeaksMD::init()
{
declareProperty(new WorkspaceProperty<IMDEventWorkspace>("InputWorkspace","",Direction::Input), "An input MDEventWorkspace.");
......@@ -85,7 +85,7 @@ namespace MDEvents
* @param ws :: MDEventWorkspace to integrate
*/
template<typename MDE, size_t nd>
void MDCentroidPeaks::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws)
void CentroidPeaksMD::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws)
{
if (nd != 3)
throw std::invalid_argument("For now, we expect the input MDEventWorkspace to have 3 dimensions only.");
......@@ -178,7 +178,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void MDCentroidPeaks::exec()
void CentroidPeaksMD::exec()
{
inWS = getProperty("InputWorkspace");
......
......@@ -100,7 +100,7 @@ namespace MDEvents
g_log.information() << "File copied successfully." << std::endl;
// Now load it back
IAlgorithm_sptr alg = createSubAlgorithm("LoadMDEW", 0.5, 1.0, false);
IAlgorithm_sptr alg = createSubAlgorithm("LoadMD", 0.5, 1.0, false);
alg->setPropertyValue("Filename", outFilename);
alg->setPropertyValue("FileBackEnd", "1");
alg->setPropertyValue("Memory", "0"); //TODO: How much memory?
......
......@@ -219,14 +219,14 @@ namespace MDEvents
if (!filename.empty())
{
// First save to the NXS file
g_log.notice() << "Running SaveMDEW" << std::endl;
IAlgorithm_sptr alg = createSubAlgorithm("SaveMDEW");
g_log.notice() << "Running SaveMD" << std::endl;
IAlgorithm_sptr alg = createSubAlgorithm("SaveMD");
alg->setPropertyValue("Filename", filename);
alg->setProperty("InputWorkspace", out);
alg->executeAsSubAlg();
// And now re-load it with this file as the backing.
g_log.notice() << "Running LoadMDEW" << std::endl;
alg = createSubAlgorithm("LoadMDEW");
g_log.notice() << "Running LoadMD" << std::endl;
alg = createSubAlgorithm("LoadMD");
alg->setPropertyValue("Filename", filename);
alg->setProperty("FileBackEnd", true);
alg->setPropertyValue("Memory", getPropertyValue("Memory"));
......
#include "MantidMDEvents/MDEWFindPeaks.h"
#include "MantidMDEvents/FindPeaksMD.h"
#include "MantidKernel/System.h"
#include "MantidDataObjects/PeaksWorkspace.h"
#include "MantidMDEvents/MDEventFactory.h"
......@@ -15,28 +15,28 @@ namespace MDEvents
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(MDEWFindPeaks)
DECLARE_ALGORITHM(FindPeaksMD)
//----------------------------------------------------------------------------------------------
/** Constructor
*/
MDEWFindPeaks::MDEWFindPeaks()
FindPeaksMD::FindPeaksMD()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
MDEWFindPeaks::~MDEWFindPeaks()
FindPeaksMD::~FindPeaksMD()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void MDEWFindPeaks::initDocs()
void FindPeaksMD::initDocs()
{
this->setWikiSummary("Find peaks in reciprocal space in a MDEventWorkspace.");
this->setOptionalMessage("Find peaks in reciprocal space in a MDEventWorkspace.");
......@@ -59,7 +59,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void MDEWFindPeaks::init()
void FindPeaksMD::init()
{
declareProperty(new WorkspaceProperty<IMDEventWorkspace>("InputWorkspace","",Direction::Input),
"An input MDEventWorkspace with at least 3 dimensions.");
......@@ -99,7 +99,7 @@ namespace MDEvents
* @param ws :: MDEventWorkspace to integrate
*/
template<typename MDE, size_t nd>
void MDEWFindPeaks::findPeaks(typename MDEventWorkspace<MDE, nd>::sptr ws)
void FindPeaksMD::findPeaks(typename MDEventWorkspace<MDE, nd>::sptr ws)
{
if (nd < 3)
throw std::invalid_argument("Workspace must have at least 3 dimensions.");
......@@ -321,7 +321,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void MDEWFindPeaks::exec()
void FindPeaksMD::exec()
{
bool AppendPeaks = getProperty("AppendPeaks");
......
......@@ -2,7 +2,7 @@
#include "MantidDataObjects/PeaksWorkspace.h"
#include "MantidKernel/System.h"
#include "MantidMDEvents/MDEventFactory.h"
#include "MantidMDEvents/MDEWPeakIntegration.h"
#include "MantidMDEvents/IntegratePeaksMD.h"
#include "MantidMDEvents/CoordTransformDistance.h"
namespace Mantid
......@@ -11,7 +11,7 @@ namespace MDEvents
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(MDEWPeakIntegration)
DECLARE_ALGORITHM(IntegratePeaksMD)
using namespace Mantid::Kernel;
using namespace Mantid::API;
......@@ -23,21 +23,21 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Constructor
*/
MDEWPeakIntegration::MDEWPeakIntegration()
IntegratePeaksMD::IntegratePeaksMD()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
MDEWPeakIntegration::~MDEWPeakIntegration()
IntegratePeaksMD::~IntegratePeaksMD()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void MDEWPeakIntegration::initDocs()
void IntegratePeaksMD::initDocs()
{
this->setWikiSummary("Integrate single-crystal peaks in reciprocal space, for [[MDEventWorkspace]]s.");
this->setOptionalMessage("Integrate single-crystal peaks in reciprocal space, for MDEventWorkspaces.");
......@@ -53,7 +53,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void MDEWPeakIntegration::init()
void IntegratePeaksMD::init()
{
declareProperty(new WorkspaceProperty<IMDEventWorkspace>("InputWorkspace","",Direction::Input), "An input MDEventWorkspace.");
......@@ -86,7 +86,7 @@ namespace MDEvents
* @param ws :: MDEventWorkspace to integrate
*/
template<typename MDE, size_t nd>
void MDEWPeakIntegration::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws)
void IntegratePeaksMD::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws)
{
if (nd != 3)
throw std::invalid_argument("For now, we expect the input MDEventWorkspace to have 3 dimensions only.");
......@@ -185,7 +185,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void MDEWPeakIntegration::exec()
void IntegratePeaksMD::exec()
{
inWS = getProperty("InputWorkspace");
......
......@@ -9,7 +9,7 @@
#include "MantidKernel/Memory.h"
#include "MantidKernel/PropertyWithValue.h"
#include "MantidKernel/System.h"
#include "MantidMDEvents/LoadMDEW.h"
#include "MantidMDEvents/LoadMD.h"
#include "MantidMDEvents/MDEventFactory.h"
#include <boost/algorithm/string.hpp>
#include <vector>
......@@ -24,27 +24,27 @@ namespace Mantid
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(LoadMDEW)
DECLARE_ALGORITHM(LoadMD)
//----------------------------------------------------------------------------------------------
/** Constructor
*/
LoadMDEW::LoadMDEW()
LoadMD::LoadMD()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
LoadMDEW::~LoadMDEW()
LoadMD::~LoadMD()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void LoadMDEW::initDocs()
void LoadMD::initDocs()
{
this->setWikiSummary("Load a .nxs file into a MDEventWorkspace.");
this->setOptionalMessage("Load a .nxs file into a MDEventWorkspace.");
......@@ -54,7 +54,7 @@ namespace Mantid
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void LoadMDEW::init()
void LoadMD::init()
{
std::vector<std::string> exts;
......@@ -85,7 +85,7 @@ namespace Mantid
*
* @param ws :: MDEventWorkspace to load
*/
void LoadMDEW::loadExperimentInfos(IMDEventWorkspace_sptr ws)
void LoadMD::loadExperimentInfos(IMDEventWorkspace_sptr ws)
{
// First, find how many experimentX blocks there are
std::map<std::string,std::string> entries;
......@@ -148,7 +148,7 @@ namespace Mantid
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void LoadMDEW::exec()
void LoadMD::exec()
{
m_filename = getPropertyValue("Filename");
......@@ -161,10 +161,10 @@ namespace Mantid
std::vector<int32_t> vecDims;
file->readData("dimensions", vecDims);
if (vecDims.empty())
throw std::runtime_error("LoadMDEW:: Error loading number of dimensions.");
throw std::runtime_error("LoadMD:: Error loading number of dimensions.");
size_t numDims = vecDims[0];
if (numDims <= 0)
throw std::runtime_error("LoadMDEW:: number of dimensions <= 0.");
throw std::runtime_error("LoadMD:: number of dimensions <= 0.");
//The type of event
std::string eventType;
...