mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make P10/P90 calculation style more explicit
This commit is contained in:
committed by
GitHub
parent
0bfa6ae2d1
commit
1e83254e9e
@@ -1131,7 +1131,12 @@ void RimEnsembleFractureStatistics::generateStatisticsGrids(
|
||||
double p50;
|
||||
double p90;
|
||||
double mean;
|
||||
RigStatisticsMath::calculateStatisticsCurves( samples[idx], &p10, &p50, &p90, &mean );
|
||||
RigStatisticsMath::calculateStatisticsCurves( samples[idx],
|
||||
&p10,
|
||||
&p50,
|
||||
&p90,
|
||||
&mean,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
|
||||
if ( calculateP10 )
|
||||
setValueNoInf( statisticsGrids[RimEnsembleFractureStatistics::StatisticsType::P10], x, y, p10 );
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
#include "RiaStatisticsTools.h"
|
||||
#include "RiuGroupedBarChartBuilder.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
#include "RiuQwtPlotWidget.h"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
#include "RiaStatisticsTools.h"
|
||||
#include "RiaTextStringTools.h"
|
||||
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "RiaColorTools.h"
|
||||
#include "RiaDateStringParser.h"
|
||||
#include "RiaSimWellBranchTools.h"
|
||||
#include "RiaStatisticsTools.h"
|
||||
|
||||
#include "RifReaderEclipseRft.h"
|
||||
|
||||
@@ -582,7 +581,6 @@ void RimWellRftPlot::updateCurvesInPlot( const std::set<RiaRftPltCurveDefinition
|
||||
QString uiText =
|
||||
caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText( rftAddress.wellLogChannel() );
|
||||
QString label = uiText.replace( ": Pressure", "" );
|
||||
label = RiaStatisticsTools::replacePercentileByPValueText( label );
|
||||
curve->setSymbolLabel( label );
|
||||
curve->setLineThickness( 3 );
|
||||
}
|
||||
|
||||
@@ -481,9 +481,9 @@ QString Rim3dOverlayInfoConfig::resultInfoText( const RigHistogramData& histData
|
||||
"<tr> <td>%1</td> <td> %2</td> <td> %3</td> <td> %4</td> <td> %5</td> <td> %6</td> </tr>"
|
||||
"</table>" )
|
||||
.arg( histData.min )
|
||||
.arg( histData.p10 )
|
||||
.arg( histData.mean )
|
||||
.arg( histData.p90 )
|
||||
.arg( histData.mean )
|
||||
.arg( histData.p10 )
|
||||
.arg( histData.max )
|
||||
.arg( histData.sum );
|
||||
}
|
||||
@@ -652,9 +652,9 @@ QString Rim3dOverlayInfoConfig::resultInfoText( const RigHistogramData& histData
|
||||
"<tr> <td>%1</td> <td> %2</td> <td> %3</td> <td> %4</td> <td> %5</td> <td> %6</td> </tr>"
|
||||
"</table>" )
|
||||
.arg( histData.min )
|
||||
.arg( histData.p10 )
|
||||
.arg( histData.mean )
|
||||
.arg( histData.p90 )
|
||||
.arg( histData.mean )
|
||||
.arg( histData.p10 )
|
||||
.arg( histData.max )
|
||||
.arg( histData.sum );
|
||||
}
|
||||
@@ -863,7 +863,7 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo( RimEclipseView* eclipseView )
|
||||
{
|
||||
eclipseView->viewer()->showHistogram( true );
|
||||
eclipseView->viewer()->setHistogram( histData.min, histData.max, histData.histogram );
|
||||
eclipseView->viewer()->setHistogramPercentiles( histData.p10, histData.p90, histData.mean );
|
||||
eclipseView->viewer()->setHistogramPercentiles( histData.p90, histData.p10, histData.mean );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -912,7 +912,7 @@ void Rim3dOverlayInfoConfig::updateGeoMech3DInfo( RimGeoMechView* geoMechView )
|
||||
{
|
||||
geoMechView->viewer()->showHistogram( true );
|
||||
geoMechView->viewer()->setHistogram( histData.min, histData.max, histData.histogram );
|
||||
geoMechView->viewer()->setHistogramPercentiles( histData.p10, histData.p90, histData.mean );
|
||||
geoMechView->viewer()->setHistogramPercentiles( histData.p90, histData.p10, histData.mean );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,10 +97,7 @@ QString createResultNameRange( const QString& resultName )
|
||||
}
|
||||
QString createResultNamePVal( const QString& resultName, double pValPos )
|
||||
{
|
||||
// Invert the number for display text
|
||||
double valueForDisplay = 100.0 - pValPos;
|
||||
|
||||
return resultName + "_P" + QString::number( valueForDisplay );
|
||||
return resultName + "_P" + QString::number( pValPos );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -296,7 +293,9 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults( const QList<ResSpec>
|
||||
pValPoss.push_back( m_statisticsConfig.m_pMidPos );
|
||||
pValPoss.push_back( m_statisticsConfig.m_pMaxPos );
|
||||
std::vector<double> pVals =
|
||||
RigStatisticsMath::calculateNearestRankPercentiles( values, pValPoss );
|
||||
RigStatisticsMath::calculateNearestRankPercentiles( values,
|
||||
pValPoss,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
statParams[PMIN] = pVals[0];
|
||||
statParams[PMID] = pVals[1];
|
||||
statParams[PMAX] = pVals[2];
|
||||
@@ -306,9 +305,15 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults( const QList<ResSpec>
|
||||
std::vector<size_t> histogram;
|
||||
RigHistogramCalculator histCalc( statParams[MIN], statParams[MAX], 100, &histogram );
|
||||
histCalc.addData( values );
|
||||
statParams[PMIN] = histCalc.calculatePercentil( m_statisticsConfig.m_pMinPos / 100.0 );
|
||||
statParams[PMID] = histCalc.calculatePercentil( m_statisticsConfig.m_pMidPos / 100.0 );
|
||||
statParams[PMAX] = histCalc.calculatePercentil( m_statisticsConfig.m_pMaxPos / 100.0 );
|
||||
statParams[PMIN] =
|
||||
histCalc.calculatePercentil( m_statisticsConfig.m_pMinPos / 100.0,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
statParams[PMID] =
|
||||
histCalc.calculatePercentil( m_statisticsConfig.m_pMidPos / 100.0,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
statParams[PMAX] =
|
||||
histCalc.calculatePercentil( m_statisticsConfig.m_pMaxPos / 100.0,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
}
|
||||
else if ( m_statisticsConfig.m_pValMethod ==
|
||||
RimEclipseStatisticsCase::INTERPOLATED_OBSERVATION )
|
||||
@@ -318,7 +323,9 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults( const QList<ResSpec>
|
||||
pValPoss.push_back( m_statisticsConfig.m_pMidPos );
|
||||
pValPoss.push_back( m_statisticsConfig.m_pMaxPos );
|
||||
std::vector<double> pVals =
|
||||
RigStatisticsMath::calculateInterpolatedPercentiles( values, pValPoss );
|
||||
RigStatisticsMath::calculateInterpolatedPercentiles( values,
|
||||
pValPoss,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
statParams[PMIN] = pVals[0];
|
||||
statParams[PMID] = pVals[1];
|
||||
statParams[PMAX] = pVals[2];
|
||||
|
||||
@@ -365,7 +365,7 @@ void RimStatisticsPlot::updatePlots()
|
||||
p10series->attachAxis( axisY );
|
||||
}
|
||||
|
||||
if ( !std::isinf( histogramData.p10 ) )
|
||||
if ( !std::isinf( histogramData.p90 ) )
|
||||
{
|
||||
QLineSeries* p90series = new QLineSeries();
|
||||
chart->addSeries( p90series );
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaResultNames.h"
|
||||
#include "RiaStatisticsTools.h"
|
||||
#include "RiaSummaryCurveAnalyzer.h"
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
#include "RiaTimeTTools.h"
|
||||
@@ -31,8 +30,6 @@
|
||||
|
||||
#include "RifEnsembleStatisticsReader.h"
|
||||
|
||||
#include "RigStatisticsMath.h"
|
||||
|
||||
#include "RimCustomObjectiveFunction.h"
|
||||
#include "RimCustomObjectiveFunctionCollection.h"
|
||||
#include "RimDerivedEnsembleCaseCollection.h"
|
||||
@@ -1804,8 +1801,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
curve->setSymbolSkipDistance( 150 );
|
||||
if ( m_statistics->showCurveLabels() )
|
||||
{
|
||||
curve->setSymbolLabel( RiaStatisticsTools::replacePercentileByPValueText(
|
||||
QString::fromStdString( address.ensembleStatisticsQuantityName() ) ) );
|
||||
curve->setSymbolLabel( QString::fromStdString( address.ensembleStatisticsQuantityName() ) );
|
||||
}
|
||||
curve->setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_SOLID );
|
||||
curve->setSummaryCaseY( m_ensembleStatCase.get() );
|
||||
|
||||
@@ -37,9 +37,9 @@ RimEnsembleStatistics::RimEnsembleStatistics( RimEnsembleCurveSetInterface* pare
|
||||
CAF_PDM_InitField( &m_active, "Active", true, "Show Statistics Curves", "", "", "" );
|
||||
CAF_PDM_InitField( &m_hideEnsembleCurves, "HideEnsembleCurves", false, "Hide Ensemble Curves", "", "", "" );
|
||||
CAF_PDM_InitField( &m_basedOnFilteredCases, "BasedOnFilteredCases", false, "Based on Filtered Cases", "", "", "" );
|
||||
CAF_PDM_InitField( &m_showP10Curve, "ShowP10Curve", true, "P90", "", "", "" ); // Yes, P90
|
||||
CAF_PDM_InitField( &m_showP10Curve, "ShowP10Curve", true, "P10", "", "", "" );
|
||||
CAF_PDM_InitField( &m_showP50Curve, "ShowP50Curve", false, "P50", "", "", "" );
|
||||
CAF_PDM_InitField( &m_showP90Curve, "ShowP90Curve", true, "P10", "", "", "" ); // Yes, P10
|
||||
CAF_PDM_InitField( &m_showP90Curve, "ShowP90Curve", true, "P90", "", "", "" );
|
||||
CAF_PDM_InitField( &m_showMeanCurve, "ShowMeanCurve", true, "Mean", "", "", "" );
|
||||
CAF_PDM_InitField( &m_showCurveLabels, "ShowCurveLabels", true, "Show Curve Labels", "", "", "" );
|
||||
CAF_PDM_InitField( &m_includeIncompleteCurves, "IncludeIncompleteCurves", false, "Include Incomplete Curves", "", "", "" );
|
||||
@@ -149,8 +149,8 @@ void RimEnsembleStatistics::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
m_showCurveLabels.uiCapability()->setUiReadOnly( !m_active );
|
||||
m_color.uiCapability()->setUiReadOnly( !m_active );
|
||||
|
||||
m_showP10Curve.uiCapability()->setUiName( curveSet->hasP10Data() ? "P90" : "P90 (Needs > 8 curves)" );
|
||||
m_showP90Curve.uiCapability()->setUiName( curveSet->hasP90Data() ? "P10" : "P10 (Needs > 8 curves)" );
|
||||
m_showP10Curve.uiCapability()->setUiName( curveSet->hasP10Data() ? "P10" : "P10 (Needs > 8 curves)" );
|
||||
m_showP90Curve.uiCapability()->setUiName( curveSet->hasP90Data() ? "P90" : "P90 (Needs > 8 curves)" );
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
|
||||
@@ -188,8 +188,12 @@ void RimEnsembleStatisticsCase::calculate( const std::vector<RimSummaryCase*> su
|
||||
}
|
||||
|
||||
double p10, p50, p90, mean;
|
||||
RigStatisticsMath::calculateStatisticsCurves( valuesAtTimeStep, &p10, &p50, &p90, &mean );
|
||||
|
||||
RigStatisticsMath::calculateStatisticsCurves( valuesAtTimeStep,
|
||||
&p10,
|
||||
&p50,
|
||||
&p90,
|
||||
&mean,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
m_p10Data.push_back( p10 );
|
||||
m_p50Data.push_back( p50 );
|
||||
m_p90Data.push_back( p90 );
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesSummary.h"
|
||||
#include "RiaResultNames.h"
|
||||
#include "RiaStatisticsTools.h"
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
|
||||
@@ -941,11 +940,6 @@ QString RimSummaryCurve::curveExportDescription( const RifEclipseSummaryAddress&
|
||||
auto group = curveSet ? curveSet->summaryCaseCollection() : nullptr;
|
||||
|
||||
auto addressUiText = addr.uiText();
|
||||
if ( addr.category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
{
|
||||
addressUiText =
|
||||
RiaStatisticsTools::replacePercentileByPValueText( QString::fromStdString( addressUiText ) ).toStdString();
|
||||
}
|
||||
|
||||
if ( group && group->isEnsemble() )
|
||||
{
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#include "RimSummaryCurveAutoName.h"
|
||||
|
||||
#include "RiaStatisticsTools.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
@@ -196,9 +194,7 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress&
|
||||
|
||||
if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
{
|
||||
text = RiaStatisticsTools::replacePercentileByPValueText(
|
||||
QString::fromStdString( summaryAddress.quantityName() ) )
|
||||
.toStdString();
|
||||
text = summaryAddress.quantityName();
|
||||
}
|
||||
else if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED )
|
||||
{
|
||||
|
||||
@@ -145,7 +145,12 @@ void RimEnsembleWellLogStatistics::calculate( const std::vector<RimWellLogFile*>
|
||||
valuesAtDepth.push_back( curveValues[depthIdx] );
|
||||
}
|
||||
double p10, p50, p90, mean;
|
||||
RigStatisticsMath::calculateStatisticsCurves( valuesAtDepth, &p10, &p50, &p90, &mean );
|
||||
RigStatisticsMath::calculateStatisticsCurves( valuesAtDepth,
|
||||
&p10,
|
||||
&p50,
|
||||
&p90,
|
||||
&mean,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
|
||||
m_measuredDepths.push_back( allDepths[depthIdx] );
|
||||
m_p10Data.push_back( p10 );
|
||||
@@ -216,7 +221,12 @@ void RimEnsembleWellLogStatistics::calculateByKLayer( const std::vector<RimWellL
|
||||
{
|
||||
std::vector<double> valuesAtDepth = topValues[kIndex];
|
||||
double p10, p50, p90, mean;
|
||||
RigStatisticsMath::calculateStatisticsCurves( valuesAtDepth, &p10, &p50, &p90, &mean );
|
||||
RigStatisticsMath::calculateStatisticsCurves( valuesAtDepth,
|
||||
&p10,
|
||||
&p50,
|
||||
&p90,
|
||||
&mean,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
m_measuredDepths.push_back( offsets->getTopDepth( kIndex ) );
|
||||
m_p10Data.push_back( p10 );
|
||||
m_p50Data.push_back( p50 );
|
||||
@@ -230,7 +240,12 @@ void RimEnsembleWellLogStatistics::calculateByKLayer( const std::vector<RimWellL
|
||||
{
|
||||
std::vector<double> valuesAtDepth = bottomValues[kIndex];
|
||||
double p10, p50, p90, mean;
|
||||
RigStatisticsMath::calculateStatisticsCurves( valuesAtDepth, &p10, &p50, &p90, &mean );
|
||||
RigStatisticsMath::calculateStatisticsCurves( valuesAtDepth,
|
||||
&p10,
|
||||
&p50,
|
||||
&p90,
|
||||
&mean,
|
||||
RigStatisticsMath::PercentileStyle::SWITCHED );
|
||||
m_measuredDepths.push_back( offsets->getBottomDepth( kIndex ) );
|
||||
m_p10Data.push_back( p10 );
|
||||
m_p50Data.push_back( p50 );
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
#include "RiaSimWellBranchTools.h"
|
||||
#include "RiaStatisticsTools.h"
|
||||
|
||||
#include "RifEclipseRftAddress.h"
|
||||
#include "RifReaderEclipseRft.h"
|
||||
@@ -359,7 +358,6 @@ QString RimWellLogRftCurve::createCurveAutoName()
|
||||
RifEclipseRftAddress::RftWellLogChannelType channelNameEnum =
|
||||
caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::fromText( wellLogChannelUiName() );
|
||||
QString channelName = caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText( channelNameEnum );
|
||||
channelName = RiaStatisticsTools::replacePercentileByPValueText( channelName );
|
||||
name.push_back( channelName );
|
||||
}
|
||||
if ( !m_timeStep().isNull() )
|
||||
|
||||
Reference in New Issue
Block a user