diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h b/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h index 32197537396b1a44d6ca2e644c9aa3be834ec996..b8a093260fd85ce14c8e8fe27abcabacf85d808c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h @@ -54,7 +54,8 @@ public: virtual const std::string category() const { return "DataHandling\\Logs"; } static Mantid::Kernel::TimeSeriesProperty<double> * - makeDerivative(API::Progress &progress, Mantid::Kernel::TimeSeriesProperty<double> *input, + makeDerivative(API::Progress &progress, + Mantid::Kernel::TimeSeriesProperty<double> *input, const std::string &name, int numDerivatives); private: diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h index c7c57ccc62a183681859b53c38f6b739870fe68e..4aaaaa0e5b2dbbecbee428c77c4149433a8b2458 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h @@ -57,8 +57,10 @@ private: void exec(); /// Calculate the DIFC for every pixel - void calculate(API::Progress &progress, API::MatrixWorkspace_sptr &outputWs, DataObjects::OffsetsWorkspace_sptr &offsetsWs, - double l1, double beamlineNorm, Kernel::V3D &beamline, Kernel::V3D &samplePos, detid2det_map &allDetectors); + void calculate(API::Progress &progress, API::MatrixWorkspace_sptr &outputWs, + DataObjects::OffsetsWorkspace_sptr &offsetsWs, double l1, + double beamlineNorm, Kernel::V3D &beamline, + Kernel::V3D &samplePos, detid2det_map &allDetectors); }; } // namespace Algorithms diff --git a/Framework/Algorithms/src/AddLogDerivative.cpp b/Framework/Algorithms/src/AddLogDerivative.cpp index 9dd883c01a2ace5bee0135a9e4cee87917e687ed..448e0a2770566c0f3c615c42d82768651a01bfea 100644 --- a/Framework/Algorithms/src/AddLogDerivative.cpp +++ b/Framework/Algorithms/src/AddLogDerivative.cpp @@ -56,8 +56,8 @@ void AddLogDerivative::init() { * @return */ Mantid::Kernel::TimeSeriesProperty<double> *AddLogDerivative::makeDerivative( - API::Progress &progress, Mantid::Kernel::TimeSeriesProperty<double> *input, const std::string &name, - int numDerivatives) { + API::Progress &progress, Mantid::Kernel::TimeSeriesProperty<double> *input, + const std::string &name, int numDerivatives) { if (input->size() < numDerivatives + 1) throw std::runtime_error( "Log " + input->name() + " only has " + @@ -91,7 +91,7 @@ Mantid::Kernel::TimeSeriesProperty<double> *AddLogDerivative::makeDerivative( times = dTime; values = dVal; - progress.report("Add Log Derivative"); + progress.report("Add Log Derivative"); } if (times.empty()) diff --git a/Framework/Algorithms/src/CalculateDIFC.cpp b/Framework/Algorithms/src/CalculateDIFC.cpp index 1e500898a6f9a287e4ffb687e88b06632544ecea..02c60b51c7c44417bcc00e20844af62545e2fa80 100644 --- a/Framework/Algorithms/src/CalculateDIFC.cpp +++ b/Framework/Algorithms/src/CalculateDIFC.cpp @@ -5,15 +5,6 @@ namespace Mantid { namespace Algorithms { -//using Mantid::API::MatrixWorkspace; -//using Mantid::API::WorkspaceProperty; -//using Mantid::DataObjects::OffsetsWorkspace; -//using Mantid::DataObjects::OffsetsWorkspace_sptr; -//using Mantid::DataObjects::SpecialWorkspace2D; -//using Mantid::DataObjects::SpecialWorkspace2D_sptr; -//using Mantid::Geometry::Instrument_const_sptr; -//using Mantid::Kernel::Direction; - // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(CalculateDIFC) @@ -65,17 +56,19 @@ void CalculateDIFC::init() { /** Execute the algorithm. */ void CalculateDIFC::exec() { - - DataObjects::OffsetsWorkspace_sptr offsetsWs = getProperty("OffsetsWorkspace"); - API::MatrixWorkspace_sptr inputWs = getProperty("InputWorkspace"); - API::MatrixWorkspace_sptr outputWs = boost::dynamic_pointer_cast<MatrixWorkspace>(SpecialWorkspace2D_sptr( + + DataObjects::OffsetsWorkspace_sptr offsetsWs = + getProperty("OffsetsWorkspace"); + API::MatrixWorkspace_sptr inputWs = getProperty("InputWorkspace"); + API::MatrixWorkspace_sptr outputWs = + boost::dynamic_pointer_cast<MatrixWorkspace>(SpecialWorkspace2D_sptr( new SpecialWorkspace2D(inputWs->getInstrument()))); - + outputWs->setTitle("DIFC workspace"); Instrument_const_sptr instrument = inputWs->getInstrument(); - double l1; + double l1; Kernel::V3D beamline, samplePos; double beamlineNorm; @@ -86,14 +79,18 @@ void CalculateDIFC::exec() { instrument->getDetectors(allDetectors); API::Progress progress(this, 0, 1, allDetectors.size()); - calculate(progress, outputWs, offsetsWs, l1, beamlineNorm, beamline, samplePos, allDetectors); + calculate(progress, outputWs, offsetsWs, l1, beamlineNorm, beamline, + samplePos, allDetectors); setProperty("OutputWorkspace", outputWs); } -void CalculateDIFC::calculate(API::Progress &progress, API::MatrixWorkspace_sptr &outputWs, DataObjects::OffsetsWorkspace_sptr &offsetsWS, - double l1, double beamlineNorm, Kernel::V3D &beamline, Kernel::V3D &samplePos, detid2det_map &allDetectors) -{ +void CalculateDIFC::calculate(API::Progress &progress, + API::MatrixWorkspace_sptr &outputWs, + DataObjects::OffsetsWorkspace_sptr &offsetsWS, + double l1, double beamlineNorm, + Kernel::V3D &beamline, Kernel::V3D &samplePos, + detid2det_map &allDetectors) { SpecialWorkspace2D_sptr localWS = boost::dynamic_pointer_cast<SpecialWorkspace2D>(outputWs); @@ -110,10 +107,10 @@ void CalculateDIFC::calculate(API::Progress &progress, API::MatrixWorkspace_sptr double difc = Geometry::Instrument::calcConversion( l1, beamline, beamlineNorm, samplePos, det, offset); difc = 1. / difc; // calcConversion gives 1/DIFC - localWS->setValue(detID, difc); + localWS->setValue(detID, difc); } - progress.report("Calculate DIFC"); + progress.report("Calculate DIFC"); } } diff --git a/Framework/Algorithms/src/CalculateZscore.cpp b/Framework/Algorithms/src/CalculateZscore.cpp index 0fbec49c88ad33d9cef51ef0e556f6188f731118..173bda3482c371e1b91d8cd23308e81e1bac4215 100644 --- a/Framework/Algorithms/src/CalculateZscore.cpp +++ b/Framework/Algorithms/src/CalculateZscore.cpp @@ -112,7 +112,7 @@ void CalculateZscore::exec() { vecY = yzscores; vecE = ezscores; - progress.report("Calculating Z Score"); + progress.report("Calculating Z Score"); } // ENDFOR // 4. Set the output diff --git a/Framework/Algorithms/src/ChopData.cpp b/Framework/Algorithms/src/ChopData.cpp index 0082a18b0d0adf03f39f402abd85b34ea9a038cc..e91cfd667fdea8c167369e2b6cb0f9bf5fad8b2b 100644 --- a/Framework/Algorithms/src/ChopData.cpp +++ b/Framework/Algorithms/src/ChopData.cpp @@ -58,7 +58,7 @@ void ChopData::exec() { if (rLower != EMPTY_DBL() && rUpper != EMPTY_DBL() && monitorWi != EMPTY_INT()) { - progress = boost::make_shared<Progress>(this, 0, 1, chops * 2); + progress = boost::make_shared<Progress>(this, 0, 1, chops * 2); // Select the spectrum that is to be used to compare the sections of the // workspace @@ -87,16 +87,15 @@ void ChopData::exec() { lowest = i; } - progress->report(); + progress->report(); } std::map<int, double>::iterator nlow = intMap.find(lowest - 1); if (nlow != intMap.end() && intMap[lowest] < (0.1 * nlow->second)) { prelow = nlow->first; } - } - else - progress = boost::make_shared<Progress>(this, 0, 1, chops); + } else + progress = boost::make_shared<Progress>(this, 0, 1, chops); int wsCounter(1); @@ -158,7 +157,7 @@ void ChopData::exec() { workspaces.push_back(workspace); - progress->report(); + progress->report(); } // Create workspace group that holds output workspaces