From 09f15445531ea22eae20bea7c98cfdfe84f98e5a Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Wed, 27 Oct 2021 11:39:34 +0200 Subject: [PATCH] #8110 Ensemble Well Log: Missing curves for "Show Plot Data" --- .../WellLog/RimEnsembleWellLogStatistics.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogStatistics.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogStatistics.cpp index 212a7ed5a3..1e271adf7d 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogStatistics.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogStatistics.cpp @@ -133,13 +133,11 @@ void RimEnsembleWellLogStatistics::calculate( const std::vector clearData(); const std::vector& allDepths = curveMerger.allXValues(); - if ( !allDepths.empty() ) + for ( size_t depthIdx = 0; depthIdx < allDepths.size(); depthIdx++ ) { - // Make sure we end up with approximately the same amount of points as originally - // Since allDepths contain *valid* values, it can potentially be smaller than the mean. - // Thus we need to ensure sizeMultiplier is at least 1. - size_t sizeMultiplier = std::max( (size_t)1, allDepths.size() / dataSetSizeCalc.weightedMean() ); - for ( size_t depthIdx = 0; depthIdx < allDepths.size(); depthIdx += sizeMultiplier ) + std::vector valuesAtDepth; + valuesAtDepth.reserve( curveMerger.curveCount() ); + for ( size_t curveIdx = 0; curveIdx < curveMerger.curveCount(); ++curveIdx ) { std::vector valuesAtDepth; valuesAtDepth.reserve( curveMerger.curveCount() );