mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add regression curves to ensemble statistics curves
* Add statistics enum * Support ensemble statistics curve as data source for regression curves * Allow creation of regression curves from statistics curves * Make sure regression curves are updated after source curves * Add state to use full or user defined range for regression source data * Add isRegressionCurve * Make sure source stepping works when regression curves are present
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#include "RiaSummaryTools.h"
|
||||
#include "RiaTimeHistoryCurveResampler.h"
|
||||
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "RigStatisticsMath.h"
|
||||
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
@@ -49,13 +51,13 @@ bool RimEnsembleCrossPlotStatisticsCase::values( const RifEclipseSummaryAddress&
|
||||
|
||||
auto quantityName = resultAddress.ensembleStatisticsVectorName();
|
||||
|
||||
if ( quantityName == ENSEMBLE_STAT_P10_QUANTITY_NAME )
|
||||
if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP10() )
|
||||
*values = m_p10Data;
|
||||
else if ( quantityName == ENSEMBLE_STAT_P50_QUANTITY_NAME )
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP50() )
|
||||
*values = m_p50Data;
|
||||
else if ( quantityName == ENSEMBLE_STAT_P90_QUANTITY_NAME )
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP90() )
|
||||
*values = m_p90Data;
|
||||
else if ( quantityName == ENSEMBLE_STAT_MEAN_QUANTITY_NAME )
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameMean() )
|
||||
*values = m_meanData;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -473,6 +473,14 @@ bool RimEnsembleCurveSet::isXAxisSummaryVector() const
|
||||
return m_xAxisType() == RiaDefines::HorizontalAxisType::SUMMARY_VECTOR;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::HorizontalAxisType RimEnsembleCurveSet::xAxisType() const
|
||||
{
|
||||
return m_xAxisType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -2093,13 +2101,13 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
};
|
||||
|
||||
if ( m_statistics->showP10Curve() && m_ensembleStatCaseXY->hasP10Data() )
|
||||
addresses.push_back( getStatisticsAddress( ENSEMBLE_STAT_P10_QUANTITY_NAME, dataAddressX, dataAddressY ) );
|
||||
addresses.push_back( getStatisticsAddress( RifEclipseSummaryAddressDefines::statisticsNameP10(), dataAddressX, dataAddressY ) );
|
||||
if ( m_statistics->showP50Curve() && m_ensembleStatCaseXY->hasP50Data() )
|
||||
addresses.push_back( getStatisticsAddress( ENSEMBLE_STAT_P50_QUANTITY_NAME, dataAddressX, dataAddressY ) );
|
||||
addresses.push_back( getStatisticsAddress( RifEclipseSummaryAddressDefines::statisticsNameP50(), dataAddressX, dataAddressY ) );
|
||||
if ( m_statistics->showP90Curve() && m_ensembleStatCaseXY->hasP90Data() )
|
||||
addresses.push_back( getStatisticsAddress( ENSEMBLE_STAT_P90_QUANTITY_NAME, dataAddressX, dataAddressY ) );
|
||||
addresses.push_back( getStatisticsAddress( RifEclipseSummaryAddressDefines::statisticsNameP90(), dataAddressX, dataAddressY ) );
|
||||
if ( m_statistics->showMeanCurve() && m_ensembleStatCaseXY->hasMeanData() )
|
||||
addresses.push_back( getStatisticsAddress( ENSEMBLE_STAT_MEAN_QUANTITY_NAME, dataAddressX, dataAddressY ) );
|
||||
addresses.push_back( getStatisticsAddress( RifEclipseSummaryAddressDefines::statisticsNameMean(), dataAddressX, dataAddressY ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2114,13 +2122,13 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
};
|
||||
|
||||
if ( m_statistics->showP10Curve() && m_ensembleStatCaseY->hasP10Data() )
|
||||
addresses.push_back( getStatisticsAddress( ENSEMBLE_STAT_P10_QUANTITY_NAME, dataAddressY ) );
|
||||
addresses.push_back( getStatisticsAddress( RifEclipseSummaryAddressDefines::statisticsNameP10(), dataAddressY ) );
|
||||
if ( m_statistics->showP50Curve() && m_ensembleStatCaseY->hasP50Data() )
|
||||
addresses.push_back( getStatisticsAddress( ENSEMBLE_STAT_P50_QUANTITY_NAME, dataAddressY ) );
|
||||
addresses.push_back( getStatisticsAddress( RifEclipseSummaryAddressDefines::statisticsNameP50(), dataAddressY ) );
|
||||
if ( m_statistics->showP90Curve() && m_ensembleStatCaseY->hasP90Data() )
|
||||
addresses.push_back( getStatisticsAddress( ENSEMBLE_STAT_P90_QUANTITY_NAME, dataAddressY ) );
|
||||
addresses.push_back( getStatisticsAddress( RifEclipseSummaryAddressDefines::statisticsNameP90(), dataAddressY ) );
|
||||
if ( m_statistics->showMeanCurve() && m_ensembleStatCaseY->hasMeanData() )
|
||||
addresses.push_back( getStatisticsAddress( ENSEMBLE_STAT_MEAN_QUANTITY_NAME, dataAddressY ) );
|
||||
addresses.push_back( getStatisticsAddress( RifEclipseSummaryAddressDefines::statisticsNameMean(), dataAddressY ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2453,11 +2461,15 @@ void RimEnsembleCurveSet::updateLegendMappingMode()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotCurveSymbol::PointSymbolEnum statisticsCurveSymbolFromAddress( const RifEclipseSummaryAddress& address )
|
||||
{
|
||||
auto qName = QString::fromStdString( address.vectorName() );
|
||||
auto qName = address.vectorName();
|
||||
|
||||
if ( qName.find( RifEclipseSummaryAddressDefines::statisticsNameP10() ) != std::string::npos )
|
||||
return RiuPlotCurveSymbol::SYMBOL_DOWN_TRIANGLE;
|
||||
if ( qName.find( RifEclipseSummaryAddressDefines::statisticsNameP50() ) != std::string::npos )
|
||||
return RiuPlotCurveSymbol::SYMBOL_DIAMOND;
|
||||
if ( qName.find( RifEclipseSummaryAddressDefines::statisticsNameP90() ) != std::string::npos )
|
||||
return RiuPlotCurveSymbol::SYMBOL_TRIANGLE;
|
||||
|
||||
if ( qName.contains( ENSEMBLE_STAT_P10_QUANTITY_NAME ) ) return RiuPlotCurveSymbol::SYMBOL_DOWN_TRIANGLE;
|
||||
if ( qName.contains( ENSEMBLE_STAT_P90_QUANTITY_NAME ) ) return RiuPlotCurveSymbol::SYMBOL_TRIANGLE;
|
||||
if ( qName.contains( ENSEMBLE_STAT_P50_QUANTITY_NAME ) ) return RiuPlotCurveSymbol::SYMBOL_DIAMOND;
|
||||
return RiuPlotCurveSymbol::SYMBOL_ELLIPSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -189,10 +189,12 @@ public:
|
||||
|
||||
std::vector<cvf::Color3f> generateColorsForCases( const std::vector<RimSummaryCase*>& summaryCases ) const;
|
||||
|
||||
RiuPlotAxis axisY() const;
|
||||
RiuPlotAxis axisX() const;
|
||||
void setLeftOrRightAxisY( RiuPlotAxis plotAxis );
|
||||
void setBottomOrTopAxisX( RiuPlotAxis plotAxis );
|
||||
RiuPlotAxis axisY() const;
|
||||
RiuPlotAxis axisX() const;
|
||||
void setLeftOrRightAxisY( RiuPlotAxis plotAxis );
|
||||
void setBottomOrTopAxisX( RiuPlotAxis plotAxis );
|
||||
bool isXAxisSummaryVector() const;
|
||||
RiaDefines::HorizontalAxisType xAxisType() const;
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
@@ -237,7 +239,6 @@ private:
|
||||
void onColorTagClicked( const SignalEmitter* emitter, size_t index );
|
||||
|
||||
void setSummaryAddressX( RifEclipseSummaryAddress address );
|
||||
bool isXAxisSummaryVector() const;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showCurves;
|
||||
|
||||
@@ -77,13 +77,13 @@ bool RimEnsembleStatisticsCase::values( const RifEclipseSummaryAddress& resultAd
|
||||
{
|
||||
auto quantityName = resultAddress.ensembleStatisticsVectorName();
|
||||
|
||||
if ( quantityName == ENSEMBLE_STAT_P10_QUANTITY_NAME )
|
||||
if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP10() )
|
||||
*values = m_p10Data;
|
||||
else if ( quantityName == ENSEMBLE_STAT_P50_QUANTITY_NAME )
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP50() )
|
||||
*values = m_p50Data;
|
||||
else if ( quantityName == ENSEMBLE_STAT_P90_QUANTITY_NAME )
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP90() )
|
||||
*values = m_p90Data;
|
||||
else if ( quantityName == ENSEMBLE_STAT_MEAN_QUANTITY_NAME )
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameMean() )
|
||||
*values = m_meanData;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -689,52 +689,54 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
||||
{
|
||||
auto reader = summaryCaseY()->summaryReader();
|
||||
if ( reader )
|
||||
RifEclipseSummaryAddress errAddress;
|
||||
std::vector<double> errValues;
|
||||
|
||||
if ( summaryCaseY() && summaryCaseY()->summaryReader() )
|
||||
{
|
||||
auto errAddress = reader->errorAddress( summaryAddressY() );
|
||||
if ( errAddress.isValid() )
|
||||
auto reader = summaryCaseY()->summaryReader();
|
||||
errAddress = reader->errorAddress( summaryAddressY() );
|
||||
reader->values( errAddress, &errValues );
|
||||
}
|
||||
|
||||
if ( errAddress.isValid() )
|
||||
{
|
||||
auto timeSteps = RiuQwtPlotCurve::fromTime_t( curveTimeStepsY );
|
||||
|
||||
if ( !errValues.empty() )
|
||||
{
|
||||
std::vector<double> errValues;
|
||||
reader->values( errAddress, &errValues );
|
||||
setSamplesFromXYErrorValues( timeSteps, curveValuesY, errValues, useLogarithmicScale );
|
||||
}
|
||||
else
|
||||
{
|
||||
setSamplesFromXYValues( timeSteps, curveValuesY, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_yValuesResampling() != RiaDefines::DateTimePeriod::NONE )
|
||||
{
|
||||
auto [resampledTimeSteps, resampledValues] =
|
||||
RiaSummaryTools::resampledValuesForPeriod( m_yValuesSummaryAddress->address(),
|
||||
curveTimeStepsY,
|
||||
curveValuesY,
|
||||
m_yValuesResampling() );
|
||||
|
||||
auto timeSteps = RiuQwtPlotCurve::fromTime_t( curveTimeStepsY );
|
||||
if ( !resampledValues.empty() && !resampledTimeSteps.empty() )
|
||||
{
|
||||
// When values are resampled, each time step value is reported at the end of each
|
||||
// resampling period. Insert a duplicate of the first value at the start of the time
|
||||
// series to make curve start at the very first reported time step.
|
||||
|
||||
if ( !errValues.empty() )
|
||||
{
|
||||
setSamplesFromXYErrorValues( timeSteps, curveValuesY, errValues, useLogarithmicScale );
|
||||
}
|
||||
else
|
||||
{
|
||||
setSamplesFromXYValues( timeSteps, curveValuesY, useLogarithmicScale );
|
||||
resampledTimeSteps.insert( resampledTimeSteps.begin(), curveTimeStepsY.front() );
|
||||
resampledValues.insert( resampledValues.begin(), resampledValues.front() );
|
||||
|
||||
setSamplesFromTimeTAndYValues( resampledTimeSteps, resampledValues, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_yValuesResampling() != RiaDefines::DateTimePeriod::NONE )
|
||||
{
|
||||
auto [resampledTimeSteps, resampledValues] =
|
||||
RiaSummaryTools::resampledValuesForPeriod( m_yValuesSummaryAddress->address(),
|
||||
curveTimeStepsY,
|
||||
curveValuesY,
|
||||
m_yValuesResampling() );
|
||||
|
||||
if ( !resampledValues.empty() && !resampledTimeSteps.empty() )
|
||||
{
|
||||
// When values are resampled, each time step value is reported at the end of each
|
||||
// resampling period. Insert a duplicate of the first value at the start of the time
|
||||
// series to make curve start at the very first reported time step.
|
||||
|
||||
resampledTimeSteps.insert( resampledTimeSteps.begin(), curveTimeStepsY.front() );
|
||||
resampledValues.insert( resampledValues.begin(), resampledValues.front() );
|
||||
|
||||
setSamplesFromTimeTAndYValues( resampledTimeSteps, resampledValues, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setSamplesFromTimeTAndYValues( curveTimeStepsY, curveValuesY, useLogarithmicScale );
|
||||
}
|
||||
setSamplesFromTimeTAndYValues( curveTimeStepsY, curveValuesY, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -993,6 +995,14 @@ RiaDefines::PhaseType RimSummaryCurve::phaseType() const
|
||||
return m_yValuesSummaryAddress->addressPhaseType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryCurve::isRegressionCurve() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -105,6 +105,8 @@ public:
|
||||
|
||||
RiaDefines::PhaseType phaseType() const override;
|
||||
|
||||
virtual bool isRegressionCurve() const;
|
||||
|
||||
protected:
|
||||
// RimPlotCurve overrides
|
||||
QString createCurveAutoName() override;
|
||||
|
||||
@@ -1958,6 +1958,19 @@ void RimSummaryPlot::onLoadDataAndUpdate()
|
||||
curve->loadDataAndUpdate( false );
|
||||
}
|
||||
|
||||
// Load data for regression curves, as they depend on data loaded by curves updated previously in this function
|
||||
if ( m_summaryCurveCollection )
|
||||
{
|
||||
auto curves = m_summaryCurveCollection->curves();
|
||||
for ( auto c : curves )
|
||||
{
|
||||
if ( c->isRegressionCurve() )
|
||||
{
|
||||
c->loadDataAndUpdate( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( plotWidget() )
|
||||
{
|
||||
plotWidget()->setInternalLegendVisible( m_showPlotLegends && !isSubPlot() );
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
#include "RiaRegressionTextTools.h"
|
||||
#include "RiaTimeTTools.h"
|
||||
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimEnsembleCurveSetCollection.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimTimeAxisAnnotation.h"
|
||||
|
||||
@@ -56,7 +59,7 @@ void caf::AppEnum<RimSummaryRegressionAnalysisCurve::RegressionType>::setUp()
|
||||
addItem( RimSummaryRegressionAnalysisCurve::RegressionType::POWER_FIT, "POWER_FIT", "Power Fit" );
|
||||
addItem( RimSummaryRegressionAnalysisCurve::RegressionType::EXPONENTIAL, "EXPONENTIAL", "Exponential" );
|
||||
addItem( RimSummaryRegressionAnalysisCurve::RegressionType::LOGARITHMIC, "LOGARITHMIC", "Logarithmic" );
|
||||
setDefault( RimSummaryRegressionAnalysisCurve::RegressionType::LINEAR );
|
||||
setDefault( RimSummaryRegressionAnalysisCurve::RegressionType::POLYNOMIAL );
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -68,6 +71,22 @@ void caf::AppEnum<RimSummaryRegressionAnalysisCurve::ForecastUnit>::setUp()
|
||||
setDefault( RimSummaryRegressionAnalysisCurve::ForecastUnit::YEARS );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RimSummaryRegressionAnalysisCurve::DataSource>::setUp()
|
||||
{
|
||||
addItem( RimSummaryRegressionAnalysisCurve::DataSource::SUMMARY_ADDRESS, "SUMMARY_ADDRESS", "Summary Address" );
|
||||
addItem( RimSummaryRegressionAnalysisCurve::DataSource::ENSEMBLE, "ENSEMBLE", "Ensemble" );
|
||||
setDefault( RimSummaryRegressionAnalysisCurve::DataSource::SUMMARY_ADDRESS );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RimSummaryRegressionAnalysisCurve::RangeType>::setUp()
|
||||
{
|
||||
addItem( RimSummaryRegressionAnalysisCurve::RangeType::FULL_RANGE, "FULL_RANGE", "Full Range" );
|
||||
addItem( RimSummaryRegressionAnalysisCurve::RangeType::USER_DEFINED_RANGE, "USER_DEFINED_RANGE", "Custom Range" );
|
||||
setDefault( RimSummaryRegressionAnalysisCurve::RangeType::FULL_RANGE );
|
||||
}
|
||||
|
||||
}; // namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -77,12 +96,17 @@ RimSummaryRegressionAnalysisCurve::RimSummaryRegressionAnalysisCurve()
|
||||
{
|
||||
CAF_PDM_InitObject( "Regression Analysis Curve", ":/regression-curve.svg" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_dataSourceForRegression, "DataSourceForRegression", "Data Source" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_ensembleCurveSet, "SourceCurveSet", "Source Curve Set" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_ensembleStatisticsType, "EnsembleStatisticsType", "Ensemble Statistics Type" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_regressionType, "RegressionType", "Type" );
|
||||
CAF_PDM_InitField( &m_forecastForward, "ForecastForward", 0, "Forward" );
|
||||
CAF_PDM_InitField( &m_forecastBackward, "ForecastBackward", 0, "Backward" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_forecastUnit, "ForecastUnit", "Unit" );
|
||||
CAF_PDM_InitField( &m_polynomialDegree, "PolynomialDegree", 3, "Degree" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_timeRangeSelection, "TimeRangeSelection", "Time Range" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_minTimeStep, "MinTimeStep", "From" );
|
||||
m_minTimeStep.uiCapability()->setUiEditorTypeName( caf::PdmUiSliderEditor::uiEditorTypeName() );
|
||||
|
||||
@@ -97,9 +121,11 @@ RimSummaryRegressionAnalysisCurve::RimSummaryRegressionAnalysisCurve()
|
||||
m_expressionText.uiCapability()->setUiReadOnly( true );
|
||||
m_expressionText.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_xRangeSelection, "XRangeSelection", "X Value Range" );
|
||||
CAF_PDM_InitField( &m_valueRangeX, "ValueRangeX", std::make_pair( 0.0, 0.0 ), "Value Range X" );
|
||||
m_valueRangeX.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_yRangeSelection, "YRangeSelection", "Y Value Range" );
|
||||
CAF_PDM_InitField( &m_valueRangeY, "ValueRangeY", std::make_pair( 0.0, 0.0 ), "Value Range Y" );
|
||||
m_valueRangeY.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
}
|
||||
@@ -113,15 +139,33 @@ RimSummaryRegressionAnalysisCurve::~RimSummaryRegressionAnalysisCurve()
|
||||
if ( plot && m_timeRangeAnnotation ) plot->removeTimeAnnotation( m_timeRangeAnnotation );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryRegressionAnalysisCurve::setEnsembleCurveSet( RimEnsembleCurveSet* ensembleCurveSet )
|
||||
{
|
||||
m_dataSourceForRegression = DataSource::ENSEMBLE;
|
||||
m_ensembleCurveSet = ensembleCurveSet;
|
||||
m_ensembleStatisticsType = RifEclipseSummaryAddressDefines::StatisticsType::P10;
|
||||
|
||||
setSummaryAddressY( {} );
|
||||
setSummaryAddressX( {} );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryRegressionAnalysisCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
auto xValues = RimSummaryCurve::valuesX();
|
||||
auto yValues = RimSummaryCurve::valuesY();
|
||||
auto timeStepsX = RimSummaryCurve::timeStepsX();
|
||||
auto timeStepsY = RimSummaryCurve::timeStepsY();
|
||||
extractSourceCurveData();
|
||||
updateDefaultValues();
|
||||
|
||||
std::vector<double> xValues = m_sourceValuesX;
|
||||
std::vector<double> yValues = m_sourceValuesY;
|
||||
std::vector<time_t> timeStepsX = m_sourceTimeStepsX;
|
||||
std::vector<time_t> timeStepsY = m_sourceTimeStepsY;
|
||||
|
||||
if ( yValues.empty() ) return;
|
||||
|
||||
if ( axisTypeX() == RiaDefines::HorizontalAxisType::SUMMARY_VECTOR )
|
||||
{
|
||||
@@ -135,11 +179,12 @@ void RimSummaryRegressionAnalysisCurve::onLoadDataAndUpdate( bool updateParentPl
|
||||
"Differences in time steps for X and Y axis detected. This is currently not supported. Make sure that the same "
|
||||
"case is used for both axis." );
|
||||
}
|
||||
}
|
||||
|
||||
// NB! Assume that time stamps for X and Y are the same
|
||||
std::vector<size_t> indicesToRemove;
|
||||
std::vector<size_t> indicesToRemove;
|
||||
|
||||
// Step 1: Find indices of values which are outside the specified range
|
||||
if ( axisTypeX() == RiaDefines::HorizontalAxisType::SUMMARY_VECTOR )
|
||||
{
|
||||
for ( size_t i = 0; i < xValues.size(); i++ )
|
||||
{
|
||||
if ( xValues[i] < m_valueRangeX().first || xValues[i] > m_valueRangeX().second )
|
||||
@@ -147,31 +192,35 @@ void RimSummaryRegressionAnalysisCurve::onLoadDataAndUpdate( bool updateParentPl
|
||||
indicesToRemove.push_back( i );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( size_t i = 0; i < yValues.size(); i++ )
|
||||
for ( size_t i = 0; i < yValues.size(); i++ )
|
||||
{
|
||||
if ( yValues[i] < m_valueRangeY().first || yValues[i] > m_valueRangeY().second )
|
||||
{
|
||||
if ( yValues[i] < m_valueRangeY().first || yValues[i] > m_valueRangeY().second )
|
||||
{
|
||||
indicesToRemove.push_back( i );
|
||||
}
|
||||
indicesToRemove.push_back( i );
|
||||
}
|
||||
}
|
||||
|
||||
// Sort indices in descending order
|
||||
std::sort( indicesToRemove.rbegin(), indicesToRemove.rend() );
|
||||
|
||||
// There might be duplicates, remove them
|
||||
indicesToRemove.erase( std::unique( indicesToRemove.begin(), indicesToRemove.end() ), indicesToRemove.end() );
|
||||
|
||||
// Remove elements at the specified indices
|
||||
for ( auto index : indicesToRemove )
|
||||
{
|
||||
if ( index < yValues.size() )
|
||||
{
|
||||
yValues.erase( yValues.begin() + index );
|
||||
timeStepsY.erase( timeStepsY.begin() + index );
|
||||
}
|
||||
|
||||
// Step 2: Sort indices in descending order
|
||||
std::sort( indicesToRemove.rbegin(), indicesToRemove.rend() );
|
||||
|
||||
// There might be duplicates, remove them
|
||||
indicesToRemove.erase( std::unique( indicesToRemove.begin(), indicesToRemove.end() ), indicesToRemove.end() );
|
||||
|
||||
// Step 3: Remove elements at the specified indices
|
||||
for ( auto index : indicesToRemove )
|
||||
if ( index < xValues.size() )
|
||||
{
|
||||
if ( index < xValues.size() )
|
||||
{
|
||||
xValues.erase( xValues.begin() + index );
|
||||
yValues.erase( yValues.begin() + index );
|
||||
timeStepsX.erase( timeStepsX.begin() + index );
|
||||
timeStepsY.erase( timeStepsY.begin() + index );
|
||||
}
|
||||
xValues.erase( xValues.begin() + index );
|
||||
timeStepsX.erase( timeStepsX.begin() + index );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +235,80 @@ void RimSummaryRegressionAnalysisCurve::onLoadDataAndUpdate( bool updateParentPl
|
||||
RimSummaryCurve::onLoadDataAndUpdate( updateParentPlot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryRegressionAnalysisCurve::extractSourceCurveData()
|
||||
{
|
||||
std::vector<double> xValues;
|
||||
std::vector<double> yValues;
|
||||
std::vector<time_t> xTimeSteps;
|
||||
std::vector<time_t> yTimeSteps;
|
||||
|
||||
if ( m_dataSourceForRegression() == DataSource::ENSEMBLE )
|
||||
{
|
||||
auto findStatisticsCurve = []( RimEnsembleCurveSet* curveSet, const QString& statisticsCurveName ) -> RimSummaryCurve*
|
||||
{
|
||||
if ( curveSet == nullptr ) return nullptr;
|
||||
|
||||
auto allCurves = curveSet->curves();
|
||||
for ( auto curve : allCurves )
|
||||
{
|
||||
auto yAddr = curve->summaryAddressY();
|
||||
|
||||
if ( yAddr.category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_ENSEMBLE_STATISTICS )
|
||||
{
|
||||
auto statisticsName = QString::fromStdString( yAddr.ensembleStatisticsVectorName() );
|
||||
if ( statisticsName == statisticsCurveName )
|
||||
{
|
||||
return curve;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
auto curve = findStatisticsCurve( m_ensembleCurveSet(), m_ensembleStatisticsType().uiText() );
|
||||
if ( curve )
|
||||
{
|
||||
yValues = curve->valuesY();
|
||||
xValues = curve->valuesX();
|
||||
|
||||
auto curveTimeY = curve->timeStepsY();
|
||||
if ( curveTimeY.size() == yValues.size() )
|
||||
{
|
||||
yTimeSteps = curveTimeY;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback to use time steps from summary case
|
||||
// The time steps are used for reference, not used when computing the regression curve
|
||||
auto summaryCase = m_ensembleCurveSet->summaryCaseCollection()->allSummaryCases().back();
|
||||
auto allTimeSteps = summaryCase->summaryReader()->timeSteps( {} );
|
||||
yTimeSteps = allTimeSteps;
|
||||
|
||||
yTimeSteps.resize( yValues.size() );
|
||||
}
|
||||
|
||||
if ( xValues.size() == yValues.size() ) xTimeSteps = yTimeSteps;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get curve data from the summary data defined by X and Y axis data
|
||||
|
||||
xValues = RimSummaryCurve::valuesX();
|
||||
yValues = RimSummaryCurve::valuesY();
|
||||
xTimeSteps = RimSummaryCurve::timeStepsX();
|
||||
yTimeSteps = RimSummaryCurve::timeStepsY();
|
||||
}
|
||||
|
||||
m_sourceTimeStepsX = xTimeSteps;
|
||||
m_sourceTimeStepsY = yTimeSteps;
|
||||
m_sourceValuesX = xValues;
|
||||
m_sourceValuesY = yValues;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -310,6 +433,14 @@ void RimSummaryRegressionAnalysisCurve::defineUiOrdering( QString uiConfigName,
|
||||
{
|
||||
RimPlotCurve::updateFieldUiState();
|
||||
|
||||
uiOrdering.add( &m_dataSourceForRegression );
|
||||
|
||||
if ( m_dataSourceForRegression() == DataSource::ENSEMBLE )
|
||||
{
|
||||
uiOrdering.add( &m_ensembleCurveSet );
|
||||
uiOrdering.add( &m_ensembleStatisticsType );
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* regressionCurveGroup = uiOrdering.addNewGroup( "Regression Analysis" );
|
||||
regressionCurveGroup->add( &m_regressionType );
|
||||
|
||||
@@ -320,18 +451,32 @@ void RimSummaryRegressionAnalysisCurve::defineUiOrdering( QString uiConfigName,
|
||||
|
||||
regressionCurveGroup->add( &m_expressionText );
|
||||
|
||||
caf::PdmUiGroup* timeSelectionGroup = uiOrdering.addNewGroup( "Time Selection" );
|
||||
timeSelectionGroup->add( &m_minTimeStep );
|
||||
timeSelectionGroup->add( &m_maxTimeStep );
|
||||
timeSelectionGroup->add( &m_showTimeSelectionInPlot );
|
||||
caf::PdmUiGroup* valueRangeYGroup = uiOrdering.addNewGroup( "Value Range Y" );
|
||||
valueRangeYGroup->add( &m_yRangeSelection );
|
||||
if ( m_yRangeSelection() == RangeType::USER_DEFINED_RANGE )
|
||||
{
|
||||
valueRangeYGroup->add( &m_valueRangeY );
|
||||
}
|
||||
|
||||
if ( axisTypeX() == RiaDefines::HorizontalAxisType::SUMMARY_VECTOR )
|
||||
{
|
||||
caf::PdmUiGroup* valueRangeXGroup = uiOrdering.addNewGroup( "Value Range X" );
|
||||
valueRangeXGroup->add( &m_valueRangeX );
|
||||
|
||||
caf::PdmUiGroup* valueRangeYGroup = uiOrdering.addNewGroup( "Value Range Y" );
|
||||
valueRangeYGroup->add( &m_valueRangeY );
|
||||
valueRangeXGroup->add( &m_xRangeSelection );
|
||||
if ( m_xRangeSelection() == RangeType::USER_DEFINED_RANGE )
|
||||
{
|
||||
valueRangeXGroup->add( &m_valueRangeX );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
caf::PdmUiGroup* timeSelectionGroup = uiOrdering.addNewGroup( "Time Selection" );
|
||||
timeSelectionGroup->add( &m_timeRangeSelection );
|
||||
if ( m_timeRangeSelection() == RangeType::USER_DEFINED_RANGE )
|
||||
{
|
||||
timeSelectionGroup->add( &m_minTimeStep );
|
||||
timeSelectionGroup->add( &m_maxTimeStep );
|
||||
}
|
||||
timeSelectionGroup->add( &m_showTimeSelectionInPlot );
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* forecastingGroup = uiOrdering.addNewGroup( "Forecasting" );
|
||||
@@ -339,7 +484,22 @@ void RimSummaryRegressionAnalysisCurve::defineUiOrdering( QString uiConfigName,
|
||||
forecastingGroup->add( &m_forecastBackward );
|
||||
forecastingGroup->add( &m_forecastUnit );
|
||||
|
||||
RimSummaryCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
if ( m_dataSourceForRegression() == DataSource::ENSEMBLE )
|
||||
{
|
||||
caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup( "Appearance" );
|
||||
RimPlotCurve::appearanceUiOrdering( *appearanceGroup );
|
||||
|
||||
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup( "Curve Name" );
|
||||
nameGroup->setCollapsedByDefault();
|
||||
nameGroup->add( &m_showLegend );
|
||||
RimPlotCurve::curveNameUiOrdering( *nameGroup );
|
||||
}
|
||||
else
|
||||
{
|
||||
RimSummaryCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -349,6 +509,8 @@ void RimSummaryRegressionAnalysisCurve::fieldChangedByUi( const caf::PdmFieldHan
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
RimSummaryCurve::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
|
||||
if ( &m_minTimeStep == changedField && m_minTimeStep > m_maxTimeStep )
|
||||
{
|
||||
m_maxTimeStep = m_minTimeStep;
|
||||
@@ -359,17 +521,10 @@ void RimSummaryRegressionAnalysisCurve::fieldChangedByUi( const caf::PdmFieldHan
|
||||
m_minTimeStep = m_maxTimeStep;
|
||||
}
|
||||
|
||||
RimSummaryCurve::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
if ( changedField == &m_regressionType || changedField == &m_polynomialDegree || changedField == &m_forecastBackward ||
|
||||
changedField == &m_forecastForward || changedField == &m_forecastUnit || changedField == &m_minTimeStep ||
|
||||
changedField == &m_maxTimeStep || changedField == &m_showTimeSelectionInPlot || changedField == &m_valueRangeX ||
|
||||
changedField == &m_valueRangeY )
|
||||
{
|
||||
loadAndUpdateDataAndPlot();
|
||||
loadAndUpdateDataAndPlot();
|
||||
|
||||
auto plot = firstAncestorOrThisOfTypeAsserted<RimSummaryPlot>();
|
||||
if ( plot ) plot->zoomAll();
|
||||
}
|
||||
auto plot = firstAncestorOrThisOfTypeAsserted<RimSummaryPlot>();
|
||||
if ( plot ) plot->zoomAll();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -401,7 +556,7 @@ void RimSummaryRegressionAnalysisCurve::defineEditorAttribute( const caf::PdmFie
|
||||
{
|
||||
if ( auto* myAttr = dynamic_cast<caf::PdmUiSliderEditorAttribute*>( attribute ) )
|
||||
{
|
||||
auto timeSteps = RimSummaryCurve::timeStepsY();
|
||||
auto timeSteps = m_sourceTimeStepsY;
|
||||
if ( !timeSteps.empty() )
|
||||
{
|
||||
myAttr->m_minimum = *timeSteps.begin();
|
||||
@@ -431,7 +586,7 @@ void RimSummaryRegressionAnalysisCurve::defineEditorAttribute( const caf::PdmFie
|
||||
attr->m_decimals = 2;
|
||||
attr->m_sliderTickCount = 100;
|
||||
|
||||
auto values = RimSummaryCurve::valuesX();
|
||||
auto values = m_sourceValuesX;
|
||||
if ( !values.empty() )
|
||||
{
|
||||
attr->m_minimum = *std::min_element( values.begin(), values.end() );
|
||||
@@ -446,7 +601,7 @@ void RimSummaryRegressionAnalysisCurve::defineEditorAttribute( const caf::PdmFie
|
||||
attr->m_decimals = 2;
|
||||
attr->m_sliderTickCount = 100;
|
||||
|
||||
auto values = RimSummaryCurve::valuesY();
|
||||
auto values = m_sourceValuesY;
|
||||
if ( !values.empty() )
|
||||
{
|
||||
attr->m_minimum = *std::min_element( values.begin(), values.end() );
|
||||
@@ -456,12 +611,52 @@ void RimSummaryRegressionAnalysisCurve::defineEditorAttribute( const caf::PdmFie
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimSummaryRegressionAnalysisCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_ensembleCurveSet )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
options.append( { "None", nullptr } );
|
||||
|
||||
auto plot = firstAncestorOrThisOfType<RimSummaryPlot>();
|
||||
if ( plot )
|
||||
{
|
||||
auto curveSets = plot->ensembleCurveSetCollection()->curveSets();
|
||||
|
||||
for ( auto curveSet : curveSets )
|
||||
{
|
||||
options.append( { curveSet->name(), curveSet } );
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
return RimSummaryCurve::calculateValueOptions( fieldNeedingOptions );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimSummaryRegressionAnalysisCurve::createCurveAutoName()
|
||||
{
|
||||
return RimSummaryCurve::createCurveAutoName() + " " + m_regressionType().uiText() + " Regression";
|
||||
QString sourceCurveName;
|
||||
if ( m_dataSourceForRegression() == DataSource::ENSEMBLE )
|
||||
{
|
||||
if ( m_ensembleCurveSet() )
|
||||
{
|
||||
sourceCurveName = m_ensembleCurveSet()->name();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sourceCurveName = RimSummaryCurve::createCurveAutoName();
|
||||
}
|
||||
|
||||
return sourceCurveName + " " + m_regressionType().uiText() + " Regression";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -562,6 +757,14 @@ std::vector<time_t> RimSummaryRegressionAnalysisCurve::getOutputTimeSteps( const
|
||||
return outputTimeSteps;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryRegressionAnalysisCurve::isRegressionCurve() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -650,25 +853,22 @@ void RimSummaryRegressionAnalysisCurve::updateTimeAnnotations()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryRegressionAnalysisCurve::updateDefaultValues()
|
||||
{
|
||||
auto timeSteps = RimSummaryCurve::timeStepsY();
|
||||
if ( !timeSteps.empty() )
|
||||
if ( !m_sourceTimeStepsY.empty() && m_timeRangeSelection() == RangeType::FULL_RANGE )
|
||||
{
|
||||
m_minTimeStep = timeSteps.front();
|
||||
m_maxTimeStep = timeSteps.back();
|
||||
m_minTimeStep = m_sourceTimeStepsY.front();
|
||||
m_maxTimeStep = m_sourceTimeStepsY.back();
|
||||
}
|
||||
|
||||
auto allValuesX = RimSummaryCurve::valuesX();
|
||||
if ( !allValuesX.empty() )
|
||||
if ( !m_sourceValuesX.empty() && m_xRangeSelection() == RangeType::FULL_RANGE )
|
||||
{
|
||||
m_valueRangeX = std::make_pair( *std::min_element( allValuesX.begin(), allValuesX.end() ),
|
||||
*std::max_element( allValuesX.begin(), allValuesX.end() ) );
|
||||
m_valueRangeX = std::make_pair( *std::min_element( m_sourceValuesX.begin(), m_sourceValuesX.end() ),
|
||||
*std::max_element( m_sourceValuesX.begin(), m_sourceValuesX.end() ) );
|
||||
}
|
||||
|
||||
auto allValuesY = RimSummaryCurve::valuesY();
|
||||
if ( !allValuesY.empty() )
|
||||
if ( !m_sourceValuesY.empty() && m_yRangeSelection() == RangeType::FULL_RANGE )
|
||||
{
|
||||
m_valueRangeY = std::make_pair( *std::min_element( allValuesY.begin(), allValuesY.end() ),
|
||||
*std::max_element( allValuesY.begin(), allValuesY.end() ) );
|
||||
m_valueRangeY = std::make_pair( *std::min_element( m_sourceValuesY.begin(), m_sourceValuesY.end() ),
|
||||
*std::max_element( m_sourceValuesY.begin(), m_sourceValuesY.end() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class PowerFitRegression;
|
||||
} // namespace regression
|
||||
|
||||
class RimTimeAxisAnnotation;
|
||||
class RimEnsembleCurveSet;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -63,9 +64,23 @@ public:
|
||||
YEARS,
|
||||
};
|
||||
|
||||
enum class DataSource
|
||||
{
|
||||
SUMMARY_ADDRESS,
|
||||
ENSEMBLE
|
||||
};
|
||||
|
||||
enum class RangeType
|
||||
{
|
||||
FULL_RANGE,
|
||||
USER_DEFINED_RANGE
|
||||
};
|
||||
|
||||
RimSummaryRegressionAnalysisCurve();
|
||||
~RimSummaryRegressionAnalysisCurve() override;
|
||||
|
||||
void setEnsembleCurveSet( RimEnsembleCurveSet* ensembleCurveSet );
|
||||
|
||||
// Y Axis functions
|
||||
std::vector<double> valuesY() const override;
|
||||
std::vector<time_t> timeStepsY() const override;
|
||||
@@ -76,7 +91,7 @@ public:
|
||||
static std::vector<time_t>
|
||||
getOutputTimeSteps( const std::vector<time_t>& timeSteps, int forecastBackward, int forecastForward, ForecastUnit forecastUnit );
|
||||
|
||||
void updateDefaultValues();
|
||||
bool isRegressionCurve() const override;
|
||||
|
||||
protected:
|
||||
void updateTimeAnnotations() override;
|
||||
@@ -84,6 +99,9 @@ protected:
|
||||
private:
|
||||
void onLoadDataAndUpdate( bool updateParentPlot ) override;
|
||||
|
||||
void extractSourceCurveData();
|
||||
void updateDefaultValues();
|
||||
|
||||
QString createCurveAutoName() override;
|
||||
QString curveExportDescription( const RifEclipseSummaryAddress& address ) const override;
|
||||
|
||||
@@ -91,6 +109,7 @@ private:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
|
||||
std::tuple<std::vector<time_t>, std::vector<double>, QString> computeRegressionCurve( const std::vector<time_t>& timeSteps,
|
||||
const std::vector<double>& values ) const;
|
||||
@@ -115,10 +134,16 @@ private:
|
||||
static void appendTimeSteps( std::vector<time_t>& destinationTimeSteps, const std::set<QDateTime>& sourceTimeSteps );
|
||||
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum<DataSource>> m_dataSourceForRegression;
|
||||
caf::PdmPtrField<RimEnsembleCurveSet*> m_ensembleCurveSet;
|
||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddressDefines::StatisticsType>> m_ensembleStatisticsType;
|
||||
|
||||
caf::PdmField<caf::AppEnum<RegressionType>> m_regressionType;
|
||||
caf::PdmField<time_t> m_minTimeStep;
|
||||
caf::PdmField<time_t> m_maxTimeStep;
|
||||
caf::PdmField<bool> m_showTimeSelectionInPlot;
|
||||
|
||||
caf::PdmField<caf::AppEnum<RangeType>> m_timeRangeSelection;
|
||||
caf::PdmField<time_t> m_minTimeStep;
|
||||
caf::PdmField<time_t> m_maxTimeStep;
|
||||
caf::PdmField<bool> m_showTimeSelectionInPlot;
|
||||
|
||||
caf::PdmField<int> m_polynomialDegree;
|
||||
caf::PdmField<QString> m_expressionText;
|
||||
@@ -126,7 +151,10 @@ private:
|
||||
caf::PdmField<int> m_forecastBackward;
|
||||
caf::PdmField<caf::AppEnum<ForecastUnit>> m_forecastUnit;
|
||||
|
||||
caf::PdmField<caf::AppEnum<RangeType>> m_xRangeSelection;
|
||||
caf::PdmField<std::pair<double, double>> m_valueRangeX;
|
||||
|
||||
caf::PdmField<caf::AppEnum<RangeType>> m_yRangeSelection;
|
||||
caf::PdmField<std::pair<double, double>> m_valueRangeY;
|
||||
|
||||
caf::PdmPointer<RimTimeAxisAnnotation> m_timeRangeAnnotation;
|
||||
@@ -134,4 +162,10 @@ private:
|
||||
std::vector<time_t> m_timeStepsX;
|
||||
std::vector<double> m_valuesY;
|
||||
std::vector<time_t> m_timeStepsY;
|
||||
|
||||
// Source curve data
|
||||
std::vector<double> m_sourceValuesX;
|
||||
std::vector<time_t> m_sourceTimeStepsX;
|
||||
std::vector<double> m_sourceValuesY;
|
||||
std::vector<time_t> m_sourceTimeStepsY;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user