#7716 Ensemble Well Logs: improve statistics curves

This commit is contained in:
Kristian Bendiksen 2021-06-21 15:22:56 +02:00
parent 3c784e9549
commit e6043fa329
3 changed files with 37 additions and 21 deletions

View File

@ -91,7 +91,7 @@ void RimEnsembleWellLogStatistics::calculate( const std::vector<RimWellLogFile*>
}
}
}
curveMerger.computeInterpolatedValues( false );
curveMerger.computeInterpolatedValues( true );
clearData();

View File

@ -82,23 +82,6 @@ RimEnsembleWellLogStatistics::StatisticsType RimEnsembleWellLogStatisticsCurve::
return m_statisticsType();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEnsembleWellLogStatisticsCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
// RimWellLogExtractionCurve::fieldChangedByUi( changedField, oldValue, newValue );
// RimStimPlanModelPlot* ensembleWellLogCurveSetPlot;
// firstAncestorOrThisOfTypeAsserted( ensembleWellLogCurveSetPlot );
// if ( ensembleWellLogCurveSetPlot )
// {
// ensembleWellLogCurveSetPlot->loadDataAndUpdate();
// }
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -126,7 +109,7 @@ void RimEnsembleWellLogStatisticsCurve::performDataExtraction( bool* isUsingPseu
}
else if ( m_statisticsType == RimEnsembleWellLogStatistics::StatisticsType::P10 )
{
values = ensembleWellLogStatistics->mean();
values = ensembleWellLogStatistics->p10();
measuredDepthValues = ensembleWellLogStatistics->measuredDepths();
}
else if ( m_statisticsType == RimEnsembleWellLogStatistics::StatisticsType::P50 )
@ -143,6 +126,8 @@ void RimEnsembleWellLogStatisticsCurve::performDataExtraction( bool* isUsingPseu
bool performDataSmoothing = false;
if ( !values.empty() && !measuredDepthValues.empty() && measuredDepthValues.size() == values.size() )
{
addDatapointsForBottomOfSegment( measuredDepthValues, values );
this->setValuesAndDepths( values,
measuredDepthValues,
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
@ -161,3 +146,34 @@ QString RimEnsembleWellLogStatisticsCurve::createCurveAutoName()
{
return caf::AppEnum<RimEnsembleWellLogStatistics::StatisticsType>::uiText( m_statisticsType() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEnsembleWellLogStatisticsCurve::addDatapointsForBottomOfSegment( std::vector<double>& depthValues,
std::vector<double>& values )
{
std::vector<double> depthValuesWithBottomLayers;
std::vector<double> valuesWithBottomLayers;
for ( size_t i = 0; i < values.size(); i++ )
{
// Add the data point at top of the layer
double topLayerDepth = depthValues[i];
double value = values[i];
depthValuesWithBottomLayers.push_back( topLayerDepth );
valuesWithBottomLayers.push_back( value );
// Add extra data points for bottom part of the layer
if ( i < values.size() - 1 )
{
double bottomLayerDepth = depthValues[i + 1];
double bottomValue = value;
depthValuesWithBottomLayers.push_back( bottomLayerDepth );
valuesWithBottomLayers.push_back( bottomValue );
}
}
values = valuesWithBottomLayers;
depthValues = depthValuesWithBottomLayers;
}

View File

@ -45,12 +45,12 @@ public:
RimEnsembleWellLogStatistics::StatisticsType statisticsType() const;
protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void performDataExtraction( bool* isUsingPseudoLength ) override;
QString createCurveAutoName() override;
static void addDatapointsForBottomOfSegment( std::vector<double>& depthValues, std::vector<double>& values );
caf::PdmPtrField<RimEnsembleWellLogCurveSet*> m_ensembleWellLogCurveSet;
caf::PdmField<caf::AppEnum<RimEnsembleWellLogStatistics::StatisticsType>> m_statisticsType;
};