diff --git a/Framework/Algorithms/src/MonteCarloAbsorption.cpp b/Framework/Algorithms/src/MonteCarloAbsorption.cpp index d5856fcd0e7a312a99b3e259c45c9f5af6eb555a..2a9dbd204155350da233240d0c64aefbd536c639 100644 --- a/Framework/Algorithms/src/MonteCarloAbsorption.cpp +++ b/Framework/Algorithms/src/MonteCarloAbsorption.cpp @@ -318,7 +318,7 @@ MatrixWorkspace_uptr MonteCarloAbsorption::createOutputWorkspace( // be treated as a distribution outputWS->setDistribution(true); outputWS->setYUnit(""); - outputWS->setYUnitLabel("Attenuation factor"); + outputWS->setYUnitLabel("Attenuation Factor"); return outputWS; } diff --git a/Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py b/Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py index 5a9a27646600721dfb7ad46732d7b5166a9c793c..f76b805dfc30274552faeca8fc7856c70a0e50d1 100644 --- a/Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py +++ b/Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py @@ -272,6 +272,7 @@ class CylinderPaalmanPingsCorrection(PythonAlgorithm): DataY=dataA1, NSpec=len(self._angles), UnitX='Wavelength', + YUnitLabel='Attenuation Factor', ParentWorkspace=self._sample_ws_name, EnableLogging=False) workspaces = [ass_ws] @@ -285,6 +286,7 @@ class CylinderPaalmanPingsCorrection(PythonAlgorithm): DataY=dataA2, NSpec=len(self._angles), UnitX='Wavelength', + YUnitLabel='Attenuation Factor', ParentWorkspace=self._sample_ws_name, EnableLogging=False) @@ -296,6 +298,7 @@ class CylinderPaalmanPingsCorrection(PythonAlgorithm): DataY=dataA3, NSpec=len(self._angles), UnitX='Wavelength', + YUnitLabel='Attenuation Factor', ParentWorkspace=self._sample_ws_name, EnableLogging=False) @@ -307,6 +310,7 @@ class CylinderPaalmanPingsCorrection(PythonAlgorithm): DataY=dataA4, NSpec=len(self._angles), UnitX='Wavelength', + YUnitLabel='Attenuation Factor', ParentWorkspace=self._sample_ws_name, EnableLogging=False) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrection.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrection.py index bd605c63fc4ff1cca32f281c8653c97b498462e5..992afd1a29cbe170e3d60abbdf87be25761b8fe0 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrection.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrection.py @@ -309,6 +309,7 @@ class FlatPlatePaalmanPingsCorrection(PythonAlgorithm): NSpec=num_angles, UnitX='Wavelength', VerticalAxisUnit='SpectraNumber', + YUnitLabel='Attenuation Factor', ParentWorkspace=self._sample_ws_name, EnableLogging=False) log_prog.report('Adding sample logs') @@ -329,6 +330,7 @@ class FlatPlatePaalmanPingsCorrection(PythonAlgorithm): NSpec=num_angles, UnitX='Wavelength', VerticalAxisUnit='SpectraNumber', + YUnitLabel='Attenuation Factor', ParentWorkspace=self._sample_ws_name, EnableLogging=False) log_prog.report('Adding assc sample logs') @@ -344,6 +346,7 @@ class FlatPlatePaalmanPingsCorrection(PythonAlgorithm): NSpec=num_angles, UnitX='Wavelength', VerticalAxisUnit='SpectraNumber', + YUnitLabel='Attenuation Factor', ParentWorkspace=self._sample_ws_name, EnableLogging=False) log_prog.report('Adding acsc sample logs') @@ -359,6 +362,7 @@ class FlatPlatePaalmanPingsCorrection(PythonAlgorithm): NSpec=num_angles, UnitX='Wavelength', VerticalAxisUnit='SpectraNumber', + YUnitLabel='Attenuation Factor', ParentWorkspace=self._sample_ws_name, EnableLogging=False) log_prog.report('Adding acc sample logs') diff --git a/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.cpp b/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.cpp index 93f41d2461a560c98f6fd1b3e41266135558582f..ff6548e98b517a333491be37c9848fdda6e74d8c 100644 --- a/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.cpp +++ b/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.cpp @@ -397,7 +397,6 @@ void CalculatePaalmanPings::absCorComplete(bool error) { convertSpecAlgo->setProperty("EFixed", getEFixed(factorWs)); } catch (std::runtime_error &) { } - m_batchAlgoRunner->addAlgorithm(convertSpecAlgo); } } @@ -423,7 +422,18 @@ void CalculatePaalmanPings::postProcessComplete(bool error) { disconnect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(postProcessComplete(bool))); setRunIsRunning(false); - if (error) { + + if (!error) { + auto const group = + AnalysisDataService::Instance().retrieveWS<WorkspaceGroup>( + m_pythonExportWsName); + for (auto const &workspace : *group) { + auto correctionsWorkspace = + boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); + correctionsWorkspace->setYUnit(""); + correctionsWorkspace->setYUnitLabel("Attenuation Factor"); + } + } else { setPlotResultEnabled(false); setSaveResultEnabled(false); emit showMessageBox("Correction factor post processing failed.\nSee "