diff --git a/Code/Mantid/Build/move_class.py b/Code/Mantid/Build/move_class.py index 5a48cd4d17e4fa1ea226f8bcd4555da1e907fe24..93624cbf0165c42568d13e259b1405d6f5644049 100644 --- a/Code/Mantid/Build/move_class.py +++ b/Code/Mantid/Build/move_class.py @@ -90,7 +90,7 @@ if __name__ == "__main__": parser.add_argument('subproject', metavar='SUBPROJECT', type=str, help='The subproject under Framework/; e.g. Kernel') parser.add_argument('classname', metavar='CLASSNAME', type=str, - help='Name of the class to create') + help='Name of the class to move') parser.add_argument('newproject', metavar='NEWPROJECT', type=str, help='Name of the project to which to move the class.') parser.add_argument('newclassname', metavar='NEWCLASSNAME', type=str, diff --git a/Code/Mantid/Framework/Algorithms/CMakeLists.txt b/Code/Mantid/Framework/Algorithms/CMakeLists.txt index 708fbbbd168866228495462fd061a4348126aa57..e8b586cf1d3f2eef6bc53fe14efd36e7deb472d9 100644 --- a/Code/Mantid/Framework/Algorithms/CMakeLists.txt +++ b/Code/Mantid/Framework/Algorithms/CMakeLists.txt @@ -4,6 +4,7 @@ set ( SRC_FILES src/AddLogDerivative.cpp src/AddSampleLog.cpp src/AlignDetectors.cpp + src/AlphaCalc.cpp src/AnyShapeAbsorption.cpp src/ApplyDetailedBalance.cpp src/ApplyTransmissionCorrection.cpp @@ -100,10 +101,9 @@ set ( SRC_FILES src/MergeRuns.cpp src/Minus.cpp src/MonteCarloAbsorption.cpp - src/MultipleScatteringAbsorption.cpp + src/MultipleScatteringCylinderAbsorption.cpp src/Multiply.cpp src/MultiplyRange.cpp - src/MuonAlphaCalc.cpp src/MuonAsymmetryCalc.cpp src/MuonRemoveExpDecay.cpp src/NormaliseByCurrent.cpp @@ -170,6 +170,7 @@ set ( INC_FILES inc/MantidAlgorithms/AddLogDerivative.h inc/MantidAlgorithms/AddSampleLog.h inc/MantidAlgorithms/AlignDetectors.h + inc/MantidAlgorithms/AlphaCalc.h inc/MantidAlgorithms/AnyShapeAbsorption.h inc/MantidAlgorithms/ApplyDetailedBalance.h inc/MantidAlgorithms/ApplyTransmissionCorrection.h @@ -267,10 +268,9 @@ set ( INC_FILES inc/MantidAlgorithms/MergeRuns.h inc/MantidAlgorithms/Minus.h inc/MantidAlgorithms/MonteCarloAbsorption.h - inc/MantidAlgorithms/MultipleScatteringAbsorption.h + inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h inc/MantidAlgorithms/Multiply.h inc/MantidAlgorithms/MultiplyRange.h - inc/MantidAlgorithms/MuonAlphaCalc.h inc/MantidAlgorithms/MuonAsymmetryCalc.h inc/MantidAlgorithms/MuonRemoveExpDecay.h inc/MantidAlgorithms/NormaliseByCurrent.h @@ -335,6 +335,7 @@ set ( TEST_FILES test/AddLogDerivativeTest.h test/AddSampleLogTest.h test/AlignDetectorsTest.h + test/AlphaCalcTest.h test/AnyShapeAbsorptionTest.h test/ApplyDetailedBalanceTest.h test/ApplyTransmissionCorrectionTest.h @@ -421,10 +422,9 @@ set ( TEST_FILES test/MergeRunsTest.h test/MinusTest.h test/MonteCarloAbsorptionTest.h - test/MultipleScatteringAbsorptionTest.h + test/MultipleScatteringCylinderAbsorptionTest.h test/MultiplyRangeTest.h test/MultiplyTest.h - test/MuonAlphaCalcTest.h test/MuonAsymmetryCalcTest.h test/MuonRemoveExpDecayTest.h test/NormaliseByCurrentTest.h diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MuonAlphaCalc.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/AlphaCalc.h similarity index 94% rename from Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MuonAlphaCalc.h rename to Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/AlphaCalc.h index b375c9aea5230f575f86333f4e7264c6970e492c..f1f9e9b05a4570987da644cee768a8cb77ed1e2c 100644 --- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MuonAlphaCalc.h +++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/AlphaCalc.h @@ -46,13 +46,13 @@ namespace Mantid 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 MuonAlphaCalc : public API::Algorithm + class DLLExport AlphaCalc : public API::Algorithm { public: /// Default constructor - MuonAlphaCalc() : API::Algorithm() {}; + AlphaCalc() : API::Algorithm() {}; /// Destructor - virtual ~MuonAlphaCalc() {}; + virtual ~AlphaCalc() {}; /// Algorithm's name for identification overriding a virtual method virtual const std::string name() const { return "AlphaCalc";} /// Algorithm's version for identification overriding a virtual method diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringAbsorption.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h similarity index 93% rename from Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringAbsorption.h rename to Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h index ccbfc971dd474c704837a5bff073801afc7e9e50..541b25bdf51a71a53ef3e8b5ef12a25088cded5c 100644 --- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringAbsorption.h +++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h @@ -42,15 +42,15 @@ namespace Algorithms <https://svn.mantidproject.org/mantid/trunk/Code/Mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -class DLLExport MultipleScatteringAbsorption : public API::Algorithm +class DLLExport MultipleScatteringCylinderAbsorption : public API::Algorithm { public: /// Default constructor - MultipleScatteringAbsorption() : API::Algorithm() {}; + MultipleScatteringCylinderAbsorption() : API::Algorithm() {}; /// Destructor - virtual ~MultipleScatteringAbsorption() {}; + virtual ~MultipleScatteringCylinderAbsorption() {}; /// Algorithm's name for identification overriding a virtual method virtual const std::string name() const { return "MultipleScatteringCylinderAbsorption";} @@ -76,7 +76,7 @@ private: // Wavelength function double wavelength( double path_length_m, double tof_us ); - /** MultipleScatteringAbsorption correction calculation. This + /** MultipleScatteringCylinderAbsorption correction calculation. This * method will change the values in the y_val array to correct for * multiple scattering absorption. * diff --git a/Code/Mantid/Framework/Algorithms/src/MuonAlphaCalc.cpp b/Code/Mantid/Framework/Algorithms/src/AlphaCalc.cpp similarity index 97% rename from Code/Mantid/Framework/Algorithms/src/MuonAlphaCalc.cpp rename to Code/Mantid/Framework/Algorithms/src/AlphaCalc.cpp index 8d78ca21d4bdc8f25b3de58aa864c5ab4d8cfcfd..901a00c3bb94d971fd2cc2c70a2fab5e726e38e6 100644 --- a/Code/Mantid/Framework/Algorithms/src/MuonAlphaCalc.cpp +++ b/Code/Mantid/Framework/Algorithms/src/AlphaCalc.cpp @@ -5,7 +5,7 @@ #include <vector> #include "MantidKernel/ArrayProperty.h" -#include "MantidAlgorithms/MuonAlphaCalc.h" +#include "MantidAlgorithms/AlphaCalc.h" namespace Mantid { @@ -16,12 +16,12 @@ using namespace Kernel; using API::Progress; // Register the class into the algorithm factory -DECLARE_ALGORITHM( MuonAlphaCalc) +DECLARE_ALGORITHM( AlphaCalc) /** Initialisation method. Declares properties to be used in algorithm. * */ -void MuonAlphaCalc::init() +void AlphaCalc::init() { declareProperty(new API::WorkspaceProperty<>("InputWorkspace", "", Direction::Input), "Name of the input workspace"); @@ -45,7 +45,7 @@ void MuonAlphaCalc::init() /** Executes the algorithm * */ -void MuonAlphaCalc::exec() +void AlphaCalc::exec() { std::vector<int> forwardSpectraList = getProperty("ForwardSpectra"); std::vector<int> backwardSpectraList = getProperty("BackwardSpectra"); diff --git a/Code/Mantid/Framework/Algorithms/src/MultipleScatteringAbsorption.cpp b/Code/Mantid/Framework/Algorithms/src/MultipleScatteringCylinderAbsorption.cpp similarity index 92% rename from Code/Mantid/Framework/Algorithms/src/MultipleScatteringAbsorption.cpp rename to Code/Mantid/Framework/Algorithms/src/MultipleScatteringCylinderAbsorption.cpp index 0ddd5de1930d27415917598bb95da0abde72609c..85d58310e7ce5d97d54737caafb12881fa175cdf 100644 --- a/Code/Mantid/Framework/Algorithms/src/MultipleScatteringAbsorption.cpp +++ b/Code/Mantid/Framework/Algorithms/src/MultipleScatteringCylinderAbsorption.cpp @@ -1,7 +1,7 @@ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidAlgorithms/MultipleScatteringAbsorption.h" +#include "MantidAlgorithms/MultipleScatteringCylinderAbsorption.h" #include "MantidAPI/WorkspaceValidators.h" #include "MantidKernel/Exception.h" #include "MantidKernel/PhysicalConstants.h" @@ -13,7 +13,7 @@ namespace Mantid { namespace Algorithms { -DECLARE_ALGORITHM(MultipleScatteringAbsorption) // Register the class into the algorithm factory +DECLARE_ALGORITHM(MultipleScatteringCylinderAbsorption) // Register the class into the algorithm factory using namespace Kernel; using namespace API; @@ -57,7 +57,7 @@ using std::vector; /** * Initialize the properties to default values */ -void MultipleScatteringAbsorption::init() +void MultipleScatteringCylinderAbsorption::init() { declareProperty(new WorkspaceProperty<API::MatrixWorkspace>("InputWorkspace", "",Direction::Input, new InstrumentValidator<>), "The name of the input workspace."); @@ -74,7 +74,7 @@ void MultipleScatteringAbsorption::init() /** * Execute the algorithm */ -void MultipleScatteringAbsorption::exec() +void MultipleScatteringCylinderAbsorption::exec() { // common information API::MatrixWorkspace_sptr in_WS = getProperty("InputWorkspace"); @@ -127,7 +127,7 @@ void MultipleScatteringAbsorption::exec() /** * Set up the Z table for the specified two theta angle (in degrees). */ -void MultipleScatteringAbsorption::ZSet(const double angle_rad, vector<double>& Z) +void MultipleScatteringCylinderAbsorption::ZSet(const double angle_rad, vector<double>& Z) { double theta_rad = angle_rad * .5; int l, J; @@ -160,7 +160,7 @@ void MultipleScatteringAbsorption::ZSet(const double angle_rad, vector<double>& /** * Evaluate the AttFac function for a given sigir and sigsr. */ -double MultipleScatteringAbsorption::AttFac(const double sigir, const double sigsr, +double MultipleScatteringCylinderAbsorption::AttFac(const double sigir, const double sigsr, const vector<double>& Z) { double facti = 1.0; @@ -188,7 +188,7 @@ double MultipleScatteringAbsorption::AttFac(const double sigir, const double sig * Calculate the wavelength at a specified total path in meters and * time-of-flight in microseconds. */ -inline double MultipleScatteringAbsorption::wavelength( double path_length_m, double tof_us ) +inline double MultipleScatteringCylinderAbsorption::wavelength( double path_length_m, double tof_us ) { return ANGST_PER_US_PER_M * tof_us / path_length_m; } @@ -198,7 +198,7 @@ inline double MultipleScatteringAbsorption::wavelength( double path_length_m, do * Alter the values in the y_vals[] to account for multiple scattering. * Parameter total_path is in meters, and the sample radius is in cm. */ -void MultipleScatteringAbsorption::apply_msa_correction( +void MultipleScatteringCylinderAbsorption::apply_msa_correction( double total_path, double angle_deg, double radius, double coeff1, double coeff2, double coeff3, vector<double>& tof, vector<double>& y_val) diff --git a/Code/Mantid/Framework/Algorithms/test/MuonAlphaCalcTest.h b/Code/Mantid/Framework/Algorithms/test/AlphaCalcTest.h similarity index 95% rename from Code/Mantid/Framework/Algorithms/test/MuonAlphaCalcTest.h rename to Code/Mantid/Framework/Algorithms/test/AlphaCalcTest.h index b68012b7cd98e2bb427a2d8778269fc2358d8b29..28f8404a74fa308a3f885386bd2f67f8c7a7ec56 100644 --- a/Code/Mantid/Framework/Algorithms/test/MuonAlphaCalcTest.h +++ b/Code/Mantid/Framework/Algorithms/test/AlphaCalcTest.h @@ -7,7 +7,7 @@ #include "MantidDataHandling/LoadInstrument.h" #include "MantidDataHandling/GroupDetectors.h" #include "MantidAPI/IAlgorithm.h" -#include "MantidAlgorithms/MuonAlphaCalc.h" +#include "MantidAlgorithms/AlphaCalc.h" #include "MantidAPI/Workspace.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidAPI/AnalysisDataService.h" @@ -16,7 +16,7 @@ using namespace Mantid::Algorithms; using namespace Mantid::API; -class MuonAlphaCalcTest : public CxxTest::TestSuite +class AlphaCalcTest : public CxxTest::TestSuite { public: @@ -92,7 +92,7 @@ public: private: - MuonAlphaCalc alphaCalc; + AlphaCalc alphaCalc; Mantid::DataHandling::LoadMuonNexus loader; }; diff --git a/Code/Mantid/Framework/Algorithms/test/MultipleScatteringAbsorptionTest.h b/Code/Mantid/Framework/Algorithms/test/MultipleScatteringCylinderAbsorptionTest.h similarity index 92% rename from Code/Mantid/Framework/Algorithms/test/MultipleScatteringAbsorptionTest.h rename to Code/Mantid/Framework/Algorithms/test/MultipleScatteringCylinderAbsorptionTest.h index 004142c13de68ee4d2db52cd370b09789bb4bd95..809f484930c7bde34056d10a282a9e20ad7bb56a 100644 --- a/Code/Mantid/Framework/Algorithms/test/MultipleScatteringAbsorptionTest.h +++ b/Code/Mantid/Framework/Algorithms/test/MultipleScatteringCylinderAbsorptionTest.h @@ -4,7 +4,7 @@ #include <cxxtest/TestSuite.h> #include <vector> -#include "MantidAlgorithms/MultipleScatteringAbsorption.h" +#include "MantidAlgorithms/MultipleScatteringCylinderAbsorption.h" #include "MantidAPI/AnalysisDataService.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include "MantidTestHelpers/ComponentCreationHelper.h" @@ -16,7 +16,7 @@ using namespace Mantid::Kernel; using Mantid::DataObjects::Workspace2D_sptr; using Mantid::MantidVec; -class MultipleScatteringAbsorptionTest : public CxxTest::TestSuite +class MultipleScatteringCylinderAbsorptionTest : public CxxTest::TestSuite { public: void testName() @@ -36,7 +36,7 @@ public: void testInit() { - Mantid::Algorithms::MultipleScatteringAbsorption algorithm_b; + Mantid::Algorithms::MultipleScatteringCylinderAbsorption algorithm_b; TS_ASSERT_THROWS_NOTHING( algorithm_b.initialize() ); TS_ASSERT( algorithm_b.isInitialized() ); @@ -78,7 +78,7 @@ public: AnalysisDataService::Instance().add("TestInputWS",wksp); // create and execute the algorithm - Mantid::Algorithms::MultipleScatteringAbsorption algorithm_c; + Mantid::Algorithms::MultipleScatteringCylinderAbsorption algorithm_c; TS_ASSERT_THROWS_NOTHING(algorithm_c.initialize() ); TS_ASSERT( algorithm_c.isInitialized() ); @@ -130,7 +130,7 @@ public: } private: - Mantid::Algorithms::MultipleScatteringAbsorption algorithm; + Mantid::Algorithms::MultipleScatteringCylinderAbsorption algorithm; };