Fix Pseudo-length labels for RFT plots

This commit is contained in:
Gaute Lindkvist 2019-11-29 11:44:51 +01:00
parent e65d9aa22d
commit 1b345fa20f
3 changed files with 23 additions and 22 deletions

View File

@ -344,6 +344,10 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate( bool updateParentPlot )
RiaDefines::DepthTypeEnum depthType = wellLogPlot->depthType();
RiaDefines::DepthUnitType displayUnit = wellLogPlot->depthUnit();
if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
{
isUsingPseudoLength = false;
}
m_qwtPlotCurve->setSamples( curveData()->xPlotValues().data(),
curveData()->depthPlotValues( depthType, displayUnit ).data(),

View File

@ -121,8 +121,6 @@ RimWellLogRftCurve::RimWellLogRftCurve()
"" );
CAF_PDM_InitFieldNoDefault( &m_wellLogChannelName, "WellLogChannelName", "Well Property", "", "", "" );
m_derivedMDSource = NO_SOURCE;
}
//--------------------------------------------------------------------------------------------------
@ -368,7 +366,8 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
{
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
m_derivedMDSource = PSEUDO_LENGTH;
RiaDefines::DepthTypeEnum depthType = RiaDefines::TRUE_VERTICAL_DEPTH;
DerivedMDSource derivedMDSource = NO_SOURCE;
if ( isCurveVisible() )
{
@ -376,6 +375,8 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
firstAncestorOrThisOfType( wellLogPlot );
CVF_ASSERT( wellLogPlot );
depthType = wellLogPlot->depthType();
RimWellRftPlot* rftPlot = dynamic_cast<RimWellRftPlot*>( wellLogPlot );
bool showErrorBarsInObservedData = rftPlot ? rftPlot->showErrorBarsForObservedData() : false;
m_showErrorBars = showErrorBarsInObservedData;
@ -420,17 +421,17 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
{
if ( deriveMeasuredDepthValuesFromWellPath( tvDepthVector, measuredDepthVector ) )
{
m_derivedMDSource = WELL_PATH;
derivedMDSource = WELL_PATH;
}
else if ( deriveMeasuredDepthFromObservedData( tvDepthVector, measuredDepthVector ) )
{
m_derivedMDSource = OBSERVED_DATA;
derivedMDSource = OBSERVED_DATA;
}
}
if ( tvDepthVector.size() != measuredDepthVector.size() )
{
m_derivedMDSource = NO_SOURCE;
derivedMDSource = NO_SOURCE;
measuredDepthVector = tvDepthVector;
}
@ -474,21 +475,20 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
RiuQwtPlotWidget* viewer = wellLogTrack->viewer();
if ( viewer )
{
if ( m_derivedMDSource == NO_SOURCE )
if ( derivedMDSource != NO_SOURCE )
{
viewer->setAxisTitleText( QwtPlot::yLeft, "TVDMSL" );
if ( derivedMDSource == WELL_PATH )
{
viewer->setAxisTitleText( QwtPlot::yLeft, "WELL/" + wellLogPlot->depthAxisTitle() );
}
else
{
viewer->setAxisTitleText( QwtPlot::yLeft, "OBS/" + wellLogPlot->depthAxisTitle() );
}
}
else if ( m_derivedMDSource == PSEUDO_LENGTH )
else // Standard depth title set from plot
{
viewer->setAxisTitleText( QwtPlot::yLeft, "PL/" + wellLogPlot->depthAxisTitle() );
}
else if ( m_derivedMDSource == WELL_PATH )
{
viewer->setAxisTitleText( QwtPlot::yLeft, "WELL/" + wellLogPlot->depthAxisTitle() );
}
else
{
viewer->setAxisTitleText( QwtPlot::yLeft, "OBS/" + wellLogPlot->depthAxisTitle() );
viewer->setAxisTitleText( QwtPlot::yLeft, wellLogPlot->depthAxisTitle() );
}
}
}
@ -753,11 +753,10 @@ RigEclipseWellLogExtractor* RimWellLogRftCurve::extractor()
auto wellPathBranch = wellPaths[m_branchIndex];
eclExtractor = wellLogCollection->findOrCreateSimWellExtractor( simWellName,
eclExtractor = wellLogCollection->findOrCreateSimWellExtractor( simWellName,
QString( "Find or create sim well extractor" ),
wellPathBranch,
m_eclipseResultCase->eclipseCaseData() );
m_derivedMDSource = NO_SOURCE;
}
return eclExtractor;

View File

@ -50,7 +50,6 @@ public:
enum DerivedMDSource
{
NO_SOURCE,
PSEUDO_LENGTH,
WELL_PATH,
OBSERVED_DATA
};
@ -127,6 +126,5 @@ private:
caf::PdmField<bool> m_branchDetection;
std::map<size_t, size_t> m_idxInWellPathToIdxInRftFile;
DerivedMDSource m_derivedMDSource;
caf::PdmField<caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>> m_wellLogChannelName;
};