Skip to content

Commit

Permalink
refs #9428. Swap in PeakClusterProjection into integration.
Browse files Browse the repository at this point in the history
refactoring step. Common code usage.
  • Loading branch information
OwenArnold committed May 12, 2014
1 parent 4a5a430 commit 88d62a6
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -256,10 +256,10 @@ namespace Mantid
ConnectedComponentMappingTypes::ClusterMap& clusterMap = clusters.get<1>();
// Extract the labeled image
IMDHistoWorkspace_sptr outHistoWS = clusters.get<0>();
// Make a peak transform so that we can understand a peak in the context of the mdworkspace coordinate setup.
PeakTransform_sptr peakTransform = makePeakTransform(mdWS.get());
// Labels taken by peaks.
std::map<size_t, size_t> labelsTakenByPeaks;
// Make a peak transform so that we can understand a peak in the context of the mdworkspace coordinate setup.
PeakClusterProjection projection(outHistoWS); // Projection of PeaksWorkspace over labelled cluster workspace.

progress.doReport("Performing Peak Integration");
g_log.information("Starting Integration");
Expand All @@ -269,8 +269,7 @@ namespace Mantid
{
PARALLEL_START_INTERUPT_REGION
IPeak& peak = peakWS->getPeak(i);
const V3D& peakCenterInMDFrame = peakTransform->transformPeak(peak);
const Mantid::signal_t signalValue = outHistoWS->getSignalAtVMD(peakCenterInMDFrame, NoNormalization); // No normalization when extracting label ids!
const Mantid::signal_t signalValue = projection.signalAtPeakCenter(peak); // No normalization when extracting label ids!
if(boost::math::isnan(signalValue))
{
g_log.warning() << "Warning: image for integration is off edge of detector for peak " << i << std::endl;
Expand Down

0 comments on commit 88d62a6

Please sign in to comment.