From 3f6c5438ebf132fc79af1b0d6ac84b04c20908a0 Mon Sep 17 00:00:00 2001
From: Owen Arnold <owen.arnold@stfc.ac.uk>
Date: Fri, 20 Jun 2014 16:11:18 +0100
Subject: [PATCH] refs #8948. Rename to PolarizationCorrection.

---
 .../Framework/Algorithms/CMakeLists.txt       |  6 +-
 ...nCorrection.h => PolarizationCorrection.h} | 14 ++---
 ...rection.cpp => PolarizationCorrection.cpp} | 38 ++++++------
 ...ionTest.h => PolarizationCorrectionTest.h} | 58 +++++++++----------
 ...n-v1.rst => PolarizationCorrection-v1.rst} |  0
 5 files changed, 58 insertions(+), 58 deletions(-)
 rename Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/{PolarisationCorrection.h => PolarizationCorrection.h} (86%)
 rename Code/Mantid/Framework/Algorithms/src/{PolarisationCorrection.cpp => PolarizationCorrection.cpp} (92%)
 rename Code/Mantid/Framework/Algorithms/test/{PolarisationCorrectionTest.h => PolarizationCorrectionTest.h} (82%)
 rename Code/Mantid/docs/source/algorithms/{PolarisationCorrection-v1.rst => PolarizationCorrection-v1.rst} (100%)

diff --git a/Code/Mantid/Framework/Algorithms/CMakeLists.txt b/Code/Mantid/Framework/Algorithms/CMakeLists.txt
index dc493e0ba74..fa4f99c8ccb 100644
--- a/Code/Mantid/Framework/Algorithms/CMakeLists.txt
+++ b/Code/Mantid/Framework/Algorithms/CMakeLists.txt
@@ -158,7 +158,7 @@ set ( SRC_FILES
 	src/Plus.cpp
 	src/PointByPointVCorrection.cpp
 	src/PoissonErrors.cpp
-	src/PolarisationCorrection.cpp
+	src/PolarizationCorrection.cpp
 	src/PolynomialCorrection.cpp
 	src/Power.cpp
 	src/PowerLawCorrection.cpp
@@ -396,7 +396,7 @@ set ( INC_FILES
 	inc/MantidAlgorithms/Plus.h
 	inc/MantidAlgorithms/PointByPointVCorrection.h
 	inc/MantidAlgorithms/PoissonErrors.h
-	inc/MantidAlgorithms/PolarisationCorrection.h
+	inc/MantidAlgorithms/PolarizationCorrection.h
 	inc/MantidAlgorithms/PolynomialCorrection.h
 	inc/MantidAlgorithms/Power.h
 	inc/MantidAlgorithms/PowerLawCorrection.h
@@ -630,7 +630,7 @@ set ( TEST_FILES
 	PlusTest.h
 	PointByPointVCorrectionTest.h
 	PoissonErrorsTest.h
-	PolarisationCorrectionTest.h
+	PolarizationCorrectionTest.h
 	PolynomialCorrectionTest.h
 	PowerLawCorrectionTest.h
 	PowerTest.h
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PolarisationCorrection.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrection.h
similarity index 86%
rename from Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PolarisationCorrection.h
rename to Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrection.h
index 696070cf97c..adb0d5de039 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PolarisationCorrection.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrection.h
@@ -1,5 +1,5 @@
-#ifndef MANTID_ALGORITHMS_POLARISATIONCORRECTION_H_
-#define MANTID_ALGORITHMS_POLARISATIONCORRECTION_H_
+#ifndef MANTID_ALGORITHMS_POLARIZATIONCORRECTION_H_
+#define MANTID_ALGORITHMS_POLARIZATIONCORRECTION_H_
 
 #include "MantidKernel/System.h"
 #include "MantidAPI/Algorithm.h"
@@ -16,7 +16,7 @@ namespace Mantid
   namespace Algorithms
   {
 
-    /** PolarisationCorrection : Algorithm to perform polarisation corrections on multi-period group workspaces.
+    /** PolarizationCorrection : Algorithm to perform polarisation corrections on multi-period group workspaces.
 
      Copyright &copy; 2014 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
 
@@ -38,11 +38,11 @@ namespace Mantid
      File change history is stored at: <https://github.com/mantidproject/mantid>
      Code Documentation is available at: <http://doxygen.mantidproject.org>
      */
-    class DLLExport PolarisationCorrection: public API::Algorithm
+    class DLLExport PolarizationCorrection: public API::Algorithm
     {
     public:
-      PolarisationCorrection();
-      virtual ~PolarisationCorrection();
+      PolarizationCorrection();
+      virtual ~PolarizationCorrection();
       virtual const std::string name() const;
       virtual int version() const;
       virtual const std::string category() const;
@@ -62,4 +62,4 @@ namespace Mantid
   } // namespace Algorithms
 } // namespace Mantid
 
-#endif  /* MANTID_ALGORITHMS_POLARISATIONCORRECTION_H_ */
+#endif  /* MANTID_ALGORITHMS_POLARIZATIONCORRECTION_H_ */
diff --git a/Code/Mantid/Framework/Algorithms/src/PolarisationCorrection.cpp b/Code/Mantid/Framework/Algorithms/src/PolarizationCorrection.cpp
similarity index 92%
rename from Code/Mantid/Framework/Algorithms/src/PolarisationCorrection.cpp
rename to Code/Mantid/Framework/Algorithms/src/PolarizationCorrection.cpp
index 1e81d48c49e..2a0e77df27b 100644
--- a/Code/Mantid/Framework/Algorithms/src/PolarisationCorrection.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/PolarizationCorrection.cpp
@@ -1,4 +1,4 @@
-#include "MantidAlgorithms/PolarisationCorrection.h"
+#include "MantidAlgorithms/PolarizationCorrection.h"
 #include "MantidAPI/WorkspaceGroup.h"
 #include "MantidAPI/WorkspaceFactory.h"
 #include "MantidKernel/Unit.h"
@@ -131,44 +131,44 @@ namespace Mantid
   {
 
     // Register the algorithm into the AlgorithmFactory
-    DECLARE_ALGORITHM(PolarisationCorrection)
+    DECLARE_ALGORITHM(PolarizationCorrection)
 
     //----------------------------------------------------------------------------------------------
     /** Constructor
      */
-    PolarisationCorrection::PolarisationCorrection()
+    PolarizationCorrection::PolarizationCorrection()
     {
     }
 
     //----------------------------------------------------------------------------------------------
     /** Destructor
      */
-    PolarisationCorrection::~PolarisationCorrection()
+    PolarizationCorrection::~PolarizationCorrection()
     {
     }
 
     //----------------------------------------------------------------------------------------------
     /// Algorithm's name for identification. @see Algorithm::name
-    const std::string PolarisationCorrection::name() const
+    const std::string PolarizationCorrection::name() const
     {
-      return "PolarisationCorrection";
+      return "PolarizationCorrection";
     }
     ;
 
     /// Algorithm's version for identification. @see Algorithm::version
-    int PolarisationCorrection::version() const
+    int PolarizationCorrection::version() const
     {
       return 1;
     }
     ;
 
     /// Algorithm's category for identification. @see Algorithm::category
-    const std::string PolarisationCorrection::category() const
+    const std::string PolarizationCorrection::category() const
     {
       return "ISIS//Reflectometry";
     }
 
-    bool PolarisationCorrection::isPropertyDefault(const std::string& propertyName) const
+    bool PolarizationCorrection::isPropertyDefault(const std::string& propertyName) const
     {
       Property* prop = this->getProperty(propertyName);
       return prop->isDefault();
@@ -177,7 +177,7 @@ namespace Mantid
     /**
      * @return Return the algorithm summary.
      */
-    const std::string PolarisationCorrection::summary() const
+    const std::string PolarizationCorrection::summary() const
     {
       return "Makes corrections for polarization efficiencies of the polarizer and analyzer in a reflectometry neutron spectrometer.";
     }
@@ -188,7 +188,7 @@ namespace Mantid
      * @param rhs : Value to add
      * @return  Summed workspace
      */
-    MatrixWorkspace_sptr PolarisationCorrection::add(MatrixWorkspace_sptr& lhsWS, const double& rhs)
+    MatrixWorkspace_sptr PolarizationCorrection::add(MatrixWorkspace_sptr& lhsWS, const double& rhs)
     {
       auto plus = this->createChildAlgorithm("Plus");
       auto rhsWS = boost::make_shared<DataObjects::WorkspaceSingleValue>(rhs);
@@ -203,14 +203,14 @@ namespace Mantid
     //----------------------------------------------------------------------------------------------
     /** Initialize the algorithm's properties.
      */
-    void PolarisationCorrection::init()
+    void PolarizationCorrection::init()
     {
       declareProperty(
           new WorkspaceProperty<Mantid::API::WorkspaceGroup>("InputWorkspace", "", Direction::Input),
           "An input workspace to process.");
 
       auto propOptions = modes();
-      declareProperty("PolarisationAnalysis", "PA", boost::make_shared<StringListValidator>(propOptions),
+      declareProperty("PolarizationAnalysis", "PA", boost::make_shared<StringListValidator>(propOptions),
           "What Polarization mode will be used?\n"
               "PNR: Polarized Neutron Reflectivity mode\n"
               "PA: Full Polarization Analysis PNR-PA");
@@ -235,7 +235,7 @@ namespace Mantid
           "An output workspace.");
     }
 
-    MatrixWorkspace_sptr PolarisationCorrection::execPolynomialCorrection(MatrixWorkspace_sptr& input,
+    MatrixWorkspace_sptr PolarizationCorrection::execPolynomialCorrection(MatrixWorkspace_sptr& input,
         const VecDouble& coefficients)
     {
       auto polyCorr = this->createChildAlgorithm("PolynomialCorrection");
@@ -247,7 +247,7 @@ namespace Mantid
       return corrected;
     }
 
-    MatrixWorkspace_sptr PolarisationCorrection::copyShapeAndFill(MatrixWorkspace_sptr& base,
+    MatrixWorkspace_sptr PolarizationCorrection::copyShapeAndFill(MatrixWorkspace_sptr& base,
         const double& value)
     {
       MatrixWorkspace_sptr wsTemplate = WorkspaceFactory::Instance().create(base);
@@ -260,7 +260,7 @@ namespace Mantid
       return filled;
     }
 
-    WorkspaceGroup_sptr PolarisationCorrection::execPA(WorkspaceGroup_sptr inWS)
+    WorkspaceGroup_sptr PolarizationCorrection::execPA(WorkspaceGroup_sptr inWS)
     {
 
       if (isPropertyDefault(cAlphaLabel()))
@@ -322,7 +322,7 @@ namespace Mantid
       return dataOut;
     }
 
-    WorkspaceGroup_sptr PolarisationCorrection::execPNR(WorkspaceGroup_sptr inWS)
+    WorkspaceGroup_sptr PolarizationCorrection::execPNR(WorkspaceGroup_sptr inWS)
     {
       size_t itemIndex = 0;
       MatrixWorkspace_sptr Ip = boost::dynamic_pointer_cast<MatrixWorkspace>(inWS->getItem(itemIndex++));
@@ -351,10 +351,10 @@ namespace Mantid
     //----------------------------------------------------------------------------------------------
     /** Execute the algorithm.
      */
-    void PolarisationCorrection::exec()
+    void PolarizationCorrection::exec()
     {
       WorkspaceGroup_sptr inWS = getProperty("InputWorkspace");
-      const std::string analysisMode = getProperty("PolarisationAnalysis");
+      const std::string analysisMode = getProperty("PolarizationAnalysis");
       const size_t nWorkspaces = inWS->size();
 
       validateInputWorkspace(inWS);
diff --git a/Code/Mantid/Framework/Algorithms/test/PolarisationCorrectionTest.h b/Code/Mantid/Framework/Algorithms/test/PolarizationCorrectionTest.h
similarity index 82%
rename from Code/Mantid/Framework/Algorithms/test/PolarisationCorrectionTest.h
rename to Code/Mantid/Framework/Algorithms/test/PolarizationCorrectionTest.h
index 6ad17b64c76..06128f9018b 100644
--- a/Code/Mantid/Framework/Algorithms/test/PolarisationCorrectionTest.h
+++ b/Code/Mantid/Framework/Algorithms/test/PolarizationCorrectionTest.h
@@ -1,8 +1,8 @@
-#ifndef MANTID_ALGORITHMS_POLARISATIONCORRECTIONTEST_H_
-#define MANTID_ALGORITHMS_POLARISATIONCORRECTIONTEST_H_
+#ifndef MANTID_ALGORITHMS_POLARIZATIONCORRECTION_TEST_H_
+#define MANTID_ALGORITHMS_POLARIZATIONCORRECTION_TEST_H_
 
 #include <cxxtest/TestSuite.h>
-#include "MantidAlgorithms/PolarisationCorrection.h"
+#include "MantidAlgorithms/PolarizationCorrection.h"
 #include "MantidDataObjects/Workspace2D.h"
 #include "MantidDataObjects/TableWorkspace.h"
 #include <boost/make_shared.hpp>
@@ -14,23 +14,23 @@ using namespace Mantid::Algorithms;
 using namespace Mantid::DataObjects;
 using namespace WorkspaceCreationHelper;
 
-class PolarisationCorrectionTest: public CxxTest::TestSuite
+class PolarizationCorrectionTest: public CxxTest::TestSuite
 {
 public:
   // This pair of boilerplate methods prevent the suite being created statically
   // This means the constructor isn't called when running other tests
-  static PolarisationCorrectionTest *createSuite()
+  static PolarizationCorrectionTest *createSuite()
   {
-    return new PolarisationCorrectionTest();
+    return new PolarizationCorrectionTest();
   }
-  static void destroySuite(PolarisationCorrectionTest *suite)
+  static void destroySuite(PolarizationCorrectionTest *suite)
   {
     delete suite;
   }
 
   void test_Init()
   {
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     TS_ASSERT_THROWS_NOTHING( alg.initialize())
     TS_ASSERT( alg.isInitialized())
   }
@@ -38,30 +38,30 @@ public:
   void test_set_wrong_workspace_type_throws()
   {
     MatrixWorkspace_sptr ws = boost::make_shared<Workspace2D>();
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     TS_ASSERT_THROWS_NOTHING( alg.initialize());
     TS_ASSERT_THROWS( alg.setProperty("InputWorkspace", ws), std::invalid_argument&);
   }
 
   void test_set_analysis_to_PA()
   {
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     TS_ASSERT_THROWS_NOTHING( alg.initialize());
-    TS_ASSERT_THROWS_NOTHING( alg.setProperty("PolarisationAnalysis", "PA"));
+    TS_ASSERT_THROWS_NOTHING( alg.setProperty("PolarizationAnalysis", "PA"));
   }
 
   void test_set_analysis_to_PNR()
   {
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     TS_ASSERT_THROWS_NOTHING( alg.initialize())
-    TS_ASSERT_THROWS_NOTHING( alg.setProperty("PolarisationAnalysis", "PNR"));
+    TS_ASSERT_THROWS_NOTHING( alg.setProperty("PolarizationAnalysis", "PNR"));
   }
 
   void test_set_analysis_to_invalid_throws()
   {
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     TS_ASSERT_THROWS_NOTHING( alg.initialize())
-    TS_ASSERT_THROWS( alg.setProperty("PolarisationAnalysis", "_"), std::invalid_argument&);
+    TS_ASSERT_THROWS( alg.setProperty("PolarizationAnalysis", "_"), std::invalid_argument&);
   }
 
   Mantid::API::WorkspaceGroup_sptr makeWorkspaceGroup(const size_t n_workspaces)
@@ -75,14 +75,14 @@ public:
     Mantid::API::WorkspaceGroup_sptr inWS = boost::make_shared<WorkspaceGroup>(); // Empty group ws.
 
     // Name of the output workspace.
-    std::string outWSName("PolarisationCorrectionTest_OutputWS");
+    std::string outWSName("PolarizationCorrectionTest_OutputWS");
 
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     alg.setChild(true);
     alg.setRethrows(true);
     alg.initialize();
     alg.setProperty("InputWorkspace", inWS);
-    alg.setProperty("PolarisationAnalysis", "PA");
+    alg.setProperty("PolarizationAnalysis", "PA");
     alg.setPropertyValue("crho", "1,1,1,1");
     alg.setPropertyValue("calpha", "1,1,1,1");
     alg.setPropertyValue("cAp", "1,1,1,1");
@@ -98,14 +98,14 @@ public:
     Mantid::API::WorkspaceGroup_sptr inWS = boost::make_shared<WorkspaceGroup>(); // Empty group ws.
 
     // Name of the output workspace.
-    std::string outWSName("PolarisationCorrectionTest_OutputWS");
+    std::string outWSName("PolarizationCorrectionTest_OutputWS");
 
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     alg.setChild(true);
     alg.setRethrows(true);
     alg.initialize();
     alg.setProperty("InputWorkspace", inWS);
-    alg.setProperty("PolarisationAnalysis", "PNR");
+    alg.setProperty("PolarizationAnalysis", "PNR");
     alg.setPropertyValue("OutputWorkspace", outWSName);
     alg.setPropertyValue("crho", "1,1,1,1");
     alg.setPropertyValue("calpha", "1,1,1,1");
@@ -122,14 +122,14 @@ public:
     inWS->addWorkspace(boost::make_shared<TableWorkspace>()); // Group now contains a table workspace
 
     // Name of the output workspace.
-    std::string outWSName("PolarisationCorrectionTest_OutputWS");
+    std::string outWSName("PolarizationCorrectionTest_OutputWS");
 
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     alg.setChild(true);
     alg.setRethrows(true);
     alg.initialize();
     alg.setProperty("InputWorkspace", inWS);
-    alg.setProperty("PolarisationAnalysis", "PNR");
+    alg.setProperty("PolarizationAnalysis", "PNR");
     alg.setPropertyValue("OutputWorkspace", outWSName);
     alg.setPropertyValue("crho", "1,1,1,1");
     alg.setPropertyValue("calpha", "1,1,1,1");
@@ -154,13 +154,13 @@ public:
     groupWS->addWorkspace(create1DWorkspace(4, 1, 1));
     groupWS->addWorkspace(create1DWorkspace(4, 1, 1));
 
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     alg.setChild(true);
     alg.setRethrows(true);
     alg.initialize();
     alg.setProperty("InputWorkspace", groupWS);
     alg.setPropertyValue("OutputWorkspace", "dummy");
-    alg.setProperty("PolarisationAnalysis", "PA");
+    alg.setProperty("PolarizationAnalysis", "PA");
     alg.setPropertyValue("crho", "1,0,0,0");
     alg.setPropertyValue("calpha", "1,0,0,0");
     alg.setPropertyValue("cAp", "1,0,0,0");
@@ -191,13 +191,13 @@ public:
     groupWS->addWorkspace(create1DWorkspace(4, 1, 1));
     groupWS->addWorkspace(create1DWorkspace(4, 1, 1));
 
-    PolarisationCorrection alg;
+    PolarizationCorrection alg;
     alg.setChild(true);
     alg.setRethrows(true);
     alg.initialize();
     alg.setProperty("InputWorkspace", groupWS);
     alg.setPropertyValue("OutputWorkspace", "dummy");
-    alg.setProperty("PolarisationAnalysis", "PNR");
+    alg.setProperty("PolarizationAnalysis", "PNR");
     alg.setPropertyValue("crho", "1,0,0,0");
     alg.setPropertyValue("cPp", "1,0,0,0");
     alg.execute();
@@ -222,4 +222,4 @@ public:
 
 };
 
-#endif /* MANTID_ALGORITHMS_POLARISATIONCORRECTIONTEST_H_ */
+#endif /* MANTID_ALGORITHMS_POLARIZATIONCORRECTION_TEST_H_ */
diff --git a/Code/Mantid/docs/source/algorithms/PolarisationCorrection-v1.rst b/Code/Mantid/docs/source/algorithms/PolarizationCorrection-v1.rst
similarity index 100%
rename from Code/Mantid/docs/source/algorithms/PolarisationCorrection-v1.rst
rename to Code/Mantid/docs/source/algorithms/PolarizationCorrection-v1.rst
-- 
GitLab