Skip to content
Snippets Groups Projects
Commit 988d1192 authored by Elliot Oram's avatar Elliot Oram
Browse files

Updated naming convention in sample log files for result Ws

Refs #14090
parent 571e47d8
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,7 @@ class ApplyPaalmanPingsCorrection(PythonAlgorithm):
doc='The output corrections workspace.')
def PyExec(self):
self._setup()
......@@ -89,15 +90,17 @@ class ApplyPaalmanPingsCorrection(PythonAlgorithm):
self._subtract()
correction_type = 'can_subtraction'
# Add container filename to log values
can_cut = self._can_ws_name.index('_')
can_base = self._can_ws_name[:can_cut]
AddSampleLog(Workspace=self._output_ws_name,
LogName='container_filename',
LogType='String',
LogText=self._can_ws_name)
LogText=can_base)
# Record the container scale factor
if self._use_can and self._scale_can:
AddSampleLog(Workspace=self._output_ws_name,
LogName='apply_corr_can_scale_factor',
LogName='container_scale',
LogType='Number',
LogText=str(self._can_scale_factor))
......@@ -108,10 +111,12 @@ class ApplyPaalmanPingsCorrection(PythonAlgorithm):
LogText=correction_type)
# Add original sample as log entry
sam_cut = self._sample_ws_name.index('_')
sam_base = self._sample_ws_name[:sam_cut]
AddSampleLog(Workspace=self._output_ws_name,
LogName='sample_filename',
LogType='String',
LogText=self._sample_ws_name)
LogText=sam_base)
self.setPropertyValue('OutputWorkspace', self._output_ws_name)
......
......@@ -300,6 +300,19 @@ void ContainerSubtraction::absCorComplete(bool error) {
if (save)
addSaveWorkspaceToQueue(QString::fromStdString(m_pythonExportWsName));
if (m_uiForm.ckShiftCan->isChecked()) {
IAlgorithm_sptr shiftLog =
AlgorithmManager::Instance().create("AddSampleLog");
shiftLog->initialize();
shiftLog->setProperty("Workspace", m_pythonExportWsName);
shiftLog->setProperty("LogName", "container_shift");
shiftLog->setProperty("LogType", "Number");
shiftLog->setProperty(
"LogText", boost::lexical_cast<std::string>(m_uiForm.spShift->value()));
m_batchAlgoRunner->addAlgorithm(shiftLog);
}
// Run algorithm queue
connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this,
SLOT(postProcessComplete(bool)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment