mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3211 Ensemble statistics. Display warning when time range mismatch
This commit is contained in:
parent
2ddc3d77df
commit
611cf998ae
@ -1005,7 +1005,8 @@ void RimEnsembleCurveSet::updateStatisticsCurves(const std::vector<RimSummaryCas
|
|||||||
addresses.push_back(SAddr::ensembleStatisticsAddress(ENSEMBLE_STAT_P50_QUANTITY_NAME, dataAddress.quantityName()));
|
addresses.push_back(SAddr::ensembleStatisticsAddress(ENSEMBLE_STAT_P50_QUANTITY_NAME, dataAddress.quantityName()));
|
||||||
if (m_statistics->showP90Curve() && m_ensembleStatCase->hasP90Data())
|
if (m_statistics->showP90Curve() && m_ensembleStatCase->hasP90Data())
|
||||||
addresses.push_back(SAddr::ensembleStatisticsAddress(ENSEMBLE_STAT_P90_QUANTITY_NAME, dataAddress.quantityName()));
|
addresses.push_back(SAddr::ensembleStatisticsAddress(ENSEMBLE_STAT_P90_QUANTITY_NAME, dataAddress.quantityName()));
|
||||||
if (m_statistics->showMeanCurve()) addresses.push_back(SAddr::ensembleStatisticsAddress(ENSEMBLE_STAT_MEAN_QUANTITY_NAME, dataAddress.quantityName()));
|
if (m_statistics->showMeanCurve() && m_ensembleStatCase->hasMeanData())
|
||||||
|
addresses.push_back(SAddr::ensembleStatisticsAddress(ENSEMBLE_STAT_MEAN_QUANTITY_NAME, dataAddress.quantityName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteStatisticsCurves();
|
deleteStatisticsCurves();
|
||||||
@ -1166,6 +1167,14 @@ bool RimEnsembleCurveSet::hasP90Data() const
|
|||||||
return m_ensembleStatCase->hasP90Data();
|
return m_ensembleStatCase->hasP90Data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimEnsembleCurveSet::hasMeanData() const
|
||||||
|
{
|
||||||
|
return m_ensembleStatCase->hasMeanData();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -113,6 +113,7 @@ public:
|
|||||||
bool hasP10Data() const;
|
bool hasP10Data() const;
|
||||||
bool hasP50Data() const;
|
bool hasP50Data() const;
|
||||||
bool hasP90Data() const;
|
bool hasP90Data() const;
|
||||||
|
bool hasMeanData() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateEnsembleCurves(const std::vector<RimSummaryCase*>& sumCases);
|
void updateEnsembleCurves(const std::vector<RimSummaryCase*>& sumCases);
|
||||||
|
@ -45,7 +45,12 @@ RimEnsembleStatistics::RimEnsembleStatistics()
|
|||||||
CAF_PDM_InitField(&m_showP90Curve, "ShowP90Curve", true, "P10", "", "", ""); // Yes, P10
|
CAF_PDM_InitField(&m_showP90Curve, "ShowP90Curve", true, "P10", "", "", ""); // Yes, P10
|
||||||
CAF_PDM_InitField(&m_showMeanCurve, "ShowMeanCurve", true, "Mean", "", "", "");
|
CAF_PDM_InitField(&m_showMeanCurve, "ShowMeanCurve", true, "Mean", "", "", "");
|
||||||
CAF_PDM_InitField(&m_showCurveLabels, "ShowCurveLabels", true, "Show Curve Labels", "", "", "");
|
CAF_PDM_InitField(&m_showCurveLabels, "ShowCurveLabels", true, "Show Curve Labels", "", "", "");
|
||||||
|
CAF_PDM_InitField(&m_warningLabel, "WarningLabel", QString("Warning: Ensemble time range mismatch"), "", "", "", "");
|
||||||
CAF_PDM_InitField(&m_color, "Color", cvf::Color3f(cvf::Color3::BLACK), "Color", "", "", "");
|
CAF_PDM_InitField(&m_color, "Color", cvf::Color3f(cvf::Color3::BLACK), "Color", "", "", "");
|
||||||
|
|
||||||
|
m_warningLabel.xmlCapability()->disableIO();
|
||||||
|
m_warningLabel.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||||
|
m_warningLabel.uiCapability()->setUiReadOnly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -134,6 +139,7 @@ void RimEnsembleStatistics::defineUiOrdering(QString uiConfigName, caf::PdmUiOrd
|
|||||||
uiOrdering.add(&m_color);
|
uiOrdering.add(&m_color);
|
||||||
|
|
||||||
auto group = uiOrdering.addNewGroup("Curves");
|
auto group = uiOrdering.addNewGroup("Curves");
|
||||||
|
if (!curveSet->hasMeanData()) group->add(&m_warningLabel);
|
||||||
group->add(&m_showP90Curve);
|
group->add(&m_showP90Curve);
|
||||||
group->add(&m_showP50Curve);
|
group->add(&m_showP50Curve);
|
||||||
group->add(&m_showMeanCurve);
|
group->add(&m_showMeanCurve);
|
||||||
@ -142,7 +148,7 @@ void RimEnsembleStatistics::defineUiOrdering(QString uiConfigName, caf::PdmUiOrd
|
|||||||
disableP10Curve(!m_active || !curveSet->hasP10Data());
|
disableP10Curve(!m_active || !curveSet->hasP10Data());
|
||||||
disableP50Curve(!m_active || !curveSet->hasP50Data());
|
disableP50Curve(!m_active || !curveSet->hasP50Data());
|
||||||
disableP90Curve(!m_active || !curveSet->hasP90Data());
|
disableP90Curve(!m_active || !curveSet->hasP90Data());
|
||||||
disableMeanCurve(!m_active);
|
disableMeanCurve(!m_active || !curveSet->hasMeanData());
|
||||||
m_showCurveLabels.uiCapability()->setUiReadOnly(!m_active);
|
m_showCurveLabels.uiCapability()->setUiReadOnly(!m_active);
|
||||||
m_color.uiCapability()->setUiReadOnly(!m_active);
|
m_color.uiCapability()->setUiReadOnly(!m_active);
|
||||||
|
|
||||||
|
@ -70,6 +70,8 @@ private:
|
|||||||
caf::PdmField<bool> m_showMeanCurve;
|
caf::PdmField<bool> m_showMeanCurve;
|
||||||
caf::PdmField<bool> m_showCurveLabels;
|
caf::PdmField<bool> m_showCurveLabels;
|
||||||
|
|
||||||
|
caf::PdmField<QString> m_warningLabel;
|
||||||
|
|
||||||
caf::PdmField<cvf::Color3f> m_color;
|
caf::PdmField<cvf::Color3f> m_color;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ public:
|
|||||||
bool hasP10Data() const {return !m_p10Data.empty(); }
|
bool hasP10Data() const {return !m_p10Data.empty(); }
|
||||||
bool hasP50Data() const { return !m_p50Data.empty(); }
|
bool hasP50Data() const { return !m_p50Data.empty(); }
|
||||||
bool hasP90Data() const { return !m_p90Data.empty(); }
|
bool hasP90Data() const { return !m_p90Data.empty(); }
|
||||||
|
bool hasMeanData() const { return !m_meanData.empty(); }
|
||||||
|
|
||||||
virtual QString caseName() override;
|
virtual QString caseName() override;
|
||||||
virtual void createSummaryReaderInterface() override;
|
virtual void createSummaryReaderInterface() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user