mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7716 Ensemble Well Logs: improve statistics curves
This commit is contained in:
parent
3c784e9549
commit
e6043fa329
@ -91,7 +91,7 @@ void RimEnsembleWellLogStatistics::calculate( const std::vector<RimWellLogFile*>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
curveMerger.computeInterpolatedValues( false );
|
curveMerger.computeInterpolatedValues( true );
|
||||||
|
|
||||||
clearData();
|
clearData();
|
||||||
|
|
||||||
|
@ -82,23 +82,6 @@ RimEnsembleWellLogStatistics::StatisticsType RimEnsembleWellLogStatisticsCurve::
|
|||||||
return m_statisticsType();
|
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 )
|
else if ( m_statisticsType == RimEnsembleWellLogStatistics::StatisticsType::P10 )
|
||||||
{
|
{
|
||||||
values = ensembleWellLogStatistics->mean();
|
values = ensembleWellLogStatistics->p10();
|
||||||
measuredDepthValues = ensembleWellLogStatistics->measuredDepths();
|
measuredDepthValues = ensembleWellLogStatistics->measuredDepths();
|
||||||
}
|
}
|
||||||
else if ( m_statisticsType == RimEnsembleWellLogStatistics::StatisticsType::P50 )
|
else if ( m_statisticsType == RimEnsembleWellLogStatistics::StatisticsType::P50 )
|
||||||
@ -143,6 +126,8 @@ void RimEnsembleWellLogStatisticsCurve::performDataExtraction( bool* isUsingPseu
|
|||||||
bool performDataSmoothing = false;
|
bool performDataSmoothing = false;
|
||||||
if ( !values.empty() && !measuredDepthValues.empty() && measuredDepthValues.size() == values.size() )
|
if ( !values.empty() && !measuredDepthValues.empty() && measuredDepthValues.size() == values.size() )
|
||||||
{
|
{
|
||||||
|
addDatapointsForBottomOfSegment( measuredDepthValues, values );
|
||||||
|
|
||||||
this->setValuesAndDepths( values,
|
this->setValuesAndDepths( values,
|
||||||
measuredDepthValues,
|
measuredDepthValues,
|
||||||
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
||||||
@ -161,3 +146,34 @@ QString RimEnsembleWellLogStatisticsCurve::createCurveAutoName()
|
|||||||
{
|
{
|
||||||
return caf::AppEnum<RimEnsembleWellLogStatistics::StatisticsType>::uiText( m_statisticsType() );
|
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;
|
||||||
|
}
|
||||||
|
@ -45,12 +45,12 @@ public:
|
|||||||
RimEnsembleWellLogStatistics::StatisticsType statisticsType() const;
|
RimEnsembleWellLogStatistics::StatisticsType statisticsType() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
|
||||||
|
|
||||||
void performDataExtraction( bool* isUsingPseudoLength ) override;
|
void performDataExtraction( bool* isUsingPseudoLength ) override;
|
||||||
|
|
||||||
QString createCurveAutoName() override;
|
QString createCurveAutoName() override;
|
||||||
|
|
||||||
|
static void addDatapointsForBottomOfSegment( std::vector<double>& depthValues, std::vector<double>& values );
|
||||||
|
|
||||||
caf::PdmPtrField<RimEnsembleWellLogCurveSet*> m_ensembleWellLogCurveSet;
|
caf::PdmPtrField<RimEnsembleWellLogCurveSet*> m_ensembleWellLogCurveSet;
|
||||||
caf::PdmField<caf::AppEnum<RimEnsembleWellLogStatistics::StatisticsType>> m_statisticsType;
|
caf::PdmField<caf::AppEnum<RimEnsembleWellLogStatistics::StatisticsType>> m_statisticsType;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user