Skip to content

Commit

Permalink
Re #8637. Add a scan_index=0 entry at the end time of each run.
Browse files Browse the repository at this point in the history
Will make the normalization and calculations of average log values more
correct.
  • Loading branch information
RussellTaylor committed Jan 31, 2014
1 parent 6dbd43b commit de9205b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/StepScan.cpp
Expand Up @@ -268,6 +268,14 @@ bool StepScan::mergeRuns()
addScanIndex->setProperty("LogType","Number Series");
addScanIndex->setProperty("LogText",Strings::toString(i+1));
if ( ! addScanIndex->execute() ) return true;

// Add a scan_index = 0 to the end time for each workspace
try
{
ws->run().getTimeSeriesProperty<int>("scan_index")->addValue(ws->run().endTime(),0);
} catch (std::runtime_error&) {
/* Swallow the error if there's no run end time. It shouldn't happen for real data. */
}
}

IAlgorithm_sptr merge = AlgorithmManager::Instance().create("MergeRuns");
Expand Down

0 comments on commit de9205b

Please sign in to comment.