mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Logarithmic curve support and renaming (#8546)
* Add test for both positive and negative numbers * Remove redundant sample count from parameter list * Propagate useLogarithmicScale * Renaming
This commit is contained in:
parent
a8a3d3332b
commit
477ae02382
@ -224,15 +224,15 @@ void RicNewStimPlanModelPlotFeature::createFormationTrack( RimStimPlanModelPlot*
|
|||||||
formationTrack->setFormationWellPath( stimPlanModel->thicknessDirectionWellPath() );
|
formationTrack->setFormationWellPath( stimPlanModel->thicknessDirectionWellPath() );
|
||||||
formationTrack->setFormationCase( eclipseCase );
|
formationTrack->setFormationCase( eclipseCase );
|
||||||
formationTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
formationTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
||||||
formationTrack->setXAxisGridVisibility( RimWellLogPlot::AxisGridVisibility::AXIS_GRID_NONE );
|
formationTrack->setPropertyValueAxisGridVisibility( RimWellLogPlot::AxisGridVisibility::AXIS_GRID_NONE );
|
||||||
formationTrack->setShowWellPathAttributes( true );
|
formationTrack->setShowWellPathAttributes( true );
|
||||||
formationTrack->setShowBothSidesOfWell( false );
|
formationTrack->setShowBothSidesOfWell( false );
|
||||||
formationTrack->setWellPathAttributesSource( stimPlanModel->thicknessDirectionWellPath() );
|
formationTrack->setWellPathAttributesSource( stimPlanModel->thicknessDirectionWellPath() );
|
||||||
formationTrack->setVisibleXRange( 0.0, 0.0 );
|
formationTrack->setVisiblePropertyValueRange( 0.0, 0.0 );
|
||||||
formationTrack->setOverburdenHeight( stimPlanModel->overburdenHeight() );
|
formationTrack->setOverburdenHeight( stimPlanModel->overburdenHeight() );
|
||||||
formationTrack->setUnderburdenHeight( stimPlanModel->underburdenHeight() );
|
formationTrack->setUnderburdenHeight( stimPlanModel->underburdenHeight() );
|
||||||
formationTrack->setColSpan( RimPlot::ONE );
|
formationTrack->setColSpan( RimPlot::ONE );
|
||||||
formationTrack->setXAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::FORMATIONS ) );
|
formationTrack->setPropertyValueAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::FORMATIONS ) );
|
||||||
formationTrack->setLegendsVisible( true );
|
formationTrack->setLegendsVisible( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,18 +260,18 @@ void RicNewStimPlanModelPlotFeature::createFaciesTrack( RimStimPlanModelPlot* pl
|
|||||||
faciesTrack->setAnnotationDisplay( RiuPlotAnnotationTool::COLOR_SHADING );
|
faciesTrack->setAnnotationDisplay( RiuPlotAnnotationTool::COLOR_SHADING );
|
||||||
faciesTrack->setOverburdenHeight( stimPlanModel->overburdenHeight() );
|
faciesTrack->setOverburdenHeight( stimPlanModel->overburdenHeight() );
|
||||||
faciesTrack->setUnderburdenHeight( stimPlanModel->underburdenHeight() );
|
faciesTrack->setUnderburdenHeight( stimPlanModel->underburdenHeight() );
|
||||||
faciesTrack->setXAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::FACIES ) );
|
faciesTrack->setPropertyValueAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::FACIES ) );
|
||||||
faciesTrack->setLegendsVisible( false );
|
faciesTrack->setLegendsVisible( false );
|
||||||
faciesTrack->setPlotTitleVisible( true );
|
faciesTrack->setPlotTitleVisible( true );
|
||||||
|
|
||||||
RimColorLegend* faciesColors = faciesProperties->colorLegend();
|
RimColorLegend* faciesColors = faciesProperties->colorLegend();
|
||||||
if ( faciesColors ) faciesTrack->setColorShadingLegend( faciesColors );
|
if ( faciesColors ) faciesTrack->setColorShadingLegend( faciesColors );
|
||||||
|
|
||||||
faciesTrack->setVisibleXRange( 0.0, 0.0 );
|
faciesTrack->setVisiblePropertyValueRange( 0.0, 0.0 );
|
||||||
faciesTrack->setColSpan( RimPlot::ONE );
|
faciesTrack->setColSpan( RimPlot::ONE );
|
||||||
faciesTrack->setAutoScaleXEnabled( false );
|
faciesTrack->setAutoScalePropertyValuesEnabled( false );
|
||||||
faciesTrack->setVisibleXRange( 0.0, 0.0 );
|
faciesTrack->setVisiblePropertyValueRange( 0.0, 0.0 );
|
||||||
faciesTrack->setXAxisGridVisibility( RimWellLogPlot::AxisGridVisibility::AXIS_GRID_NONE );
|
faciesTrack->setPropertyValueAxisGridVisibility( RimWellLogPlot::AxisGridVisibility::AXIS_GRID_NONE );
|
||||||
|
|
||||||
caf::ColorTable colors = RiaColorTables::wellLogPlotPaletteColors();
|
caf::ColorTable colors = RiaColorTables::wellLogPlotPaletteColors();
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ void RicNewStimPlanModelPlotFeature::createLayersTrack( RimStimPlanModelPlot* pl
|
|||||||
RimColorLegend* faciesColors = faciesProperties->colorLegend();
|
RimColorLegend* faciesColors = faciesProperties->colorLegend();
|
||||||
if ( faciesColors ) faciesTrack->setColorShadingLegend( faciesColors );
|
if ( faciesColors ) faciesTrack->setColorShadingLegend( faciesColors );
|
||||||
|
|
||||||
faciesTrack->setVisibleXRange( 0.0, 0.0 );
|
faciesTrack->setVisiblePropertyValueRange( 0.0, 0.0 );
|
||||||
faciesTrack->setColSpan( RimPlot::ONE );
|
faciesTrack->setColSpan( RimPlot::ONE );
|
||||||
|
|
||||||
caf::ColorTable colors = RiaColorTables::wellLogPlotPaletteColors();
|
caf::ColorTable colors = RiaColorTables::wellLogPlotPaletteColors();
|
||||||
@ -334,8 +334,8 @@ void RicNewStimPlanModelPlotFeature::createLayersTrack( RimStimPlanModelPlot* pl
|
|||||||
curve->setAutoNameComponents( false, true, false, false, false );
|
curve->setAutoNameComponents( false, true, false, false, false );
|
||||||
|
|
||||||
faciesTrack->addCurve( curve );
|
faciesTrack->addCurve( curve );
|
||||||
faciesTrack->setAutoScaleXEnabled( true );
|
faciesTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
faciesTrack->setXAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::LAYERS ) );
|
faciesTrack->setPropertyValueAxisTitle( stimPlanModel->unitForProperty( RiaDefines::CurveProperty::LAYERS ) );
|
||||||
|
|
||||||
curve->loadDataAndUpdate( true );
|
curve->loadDataAndUpdate( true );
|
||||||
|
|
||||||
@ -420,12 +420,12 @@ void RicNewStimPlanModelPlotFeature::createParametersTrack( RimStimPlanModelPlot
|
|||||||
colorIndex++;
|
colorIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
plotTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR );
|
plotTrack->setPropertyValueAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR );
|
||||||
plotTrack->setShowRegionLabels( true );
|
plotTrack->setShowRegionLabels( true );
|
||||||
plotTrack->setLogarithmicScale( isPlotLogarithmic );
|
plotTrack->setLogarithmicScale( isPlotLogarithmic );
|
||||||
plotTrack->setAutoScaleXEnabled( true );
|
plotTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
plotTrack->setMinAndMaxTicksOnly( useMinMaxTicksOnly( propertyTypes[0] ) );
|
plotTrack->setMinAndMaxTicksOnly( useMinMaxTicksOnly( propertyTypes[0] ) );
|
||||||
plotTrack->setXAxisTitle( stimPlanModel->unitForProperty( propertyTypes[0] ) );
|
plotTrack->setPropertyValueAxisTitle( stimPlanModel->unitForProperty( propertyTypes[0] ) );
|
||||||
|
|
||||||
plotTrack->updateConnectedEditors();
|
plotTrack->updateConnectedEditors();
|
||||||
plot->updateConnectedEditors();
|
plot->updateConnectedEditors();
|
||||||
|
@ -220,7 +220,7 @@ void RicNewWellBoreStabilityPlotFeature::createFormationTrack( RimWellBoreStabil
|
|||||||
formationTrack->setFormationWellPath( wellPath );
|
formationTrack->setFormationWellPath( wellPath );
|
||||||
formationTrack->setFormationCase( geoMechCase );
|
formationTrack->setFormationCase( geoMechCase );
|
||||||
formationTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
formationTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
||||||
formationTrack->setVisibleXRange( 0.0, 0.0 );
|
formationTrack->setVisiblePropertyValueRange( 0.0, 0.0 );
|
||||||
formationTrack->setColSpan( RimPlot::ONE );
|
formationTrack->setColSpan( RimPlot::ONE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,8 +242,8 @@ void RicNewWellBoreStabilityPlotFeature::createCasingShoeTrack( RimWellBoreStabi
|
|||||||
casingShoeTrack->setShowBothSidesOfWell( false );
|
casingShoeTrack->setShowBothSidesOfWell( false );
|
||||||
casingShoeTrack->setAnnotationTransparency( 90 );
|
casingShoeTrack->setAnnotationTransparency( 90 );
|
||||||
casingShoeTrack->setWellPathAttributesSource( wellPath );
|
casingShoeTrack->setWellPathAttributesSource( wellPath );
|
||||||
casingShoeTrack->setVisibleXRange( 0.0, 0.0 );
|
casingShoeTrack->setVisiblePropertyValueRange( 0.0, 0.0 );
|
||||||
casingShoeTrack->setAutoScaleXEnabled( true );
|
casingShoeTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
casingShoeTrack->loadDataAndUpdate();
|
casingShoeTrack->loadDataAndUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,10 +258,10 @@ void RicNewWellBoreStabilityPlotFeature::createParametersTrack( RimWellBoreStabi
|
|||||||
RimWellLogTrack* paramCurvesTrack =
|
RimWellLogTrack* paramCurvesTrack =
|
||||||
RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "WBS Parameters", plot );
|
RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "WBS Parameters", plot );
|
||||||
paramCurvesTrack->setColSpan( RimPlot::TWO );
|
paramCurvesTrack->setColSpan( RimPlot::TWO );
|
||||||
paramCurvesTrack->setVisibleXRange( 0.0, 2.0 );
|
paramCurvesTrack->setVisiblePropertyValueRange( 0.0, 2.0 );
|
||||||
paramCurvesTrack->setAutoScaleXEnabled( true );
|
paramCurvesTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
paramCurvesTrack->setTickIntervals( 1.0, 0.2 );
|
paramCurvesTrack->setTickIntervals( 1.0, 0.2 );
|
||||||
paramCurvesTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
|
paramCurvesTrack->setPropertyValueAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
|
||||||
paramCurvesTrack->setFormationWellPath( wellPath );
|
paramCurvesTrack->setFormationWellPath( wellPath );
|
||||||
paramCurvesTrack->setFormationCase( geoMechCase );
|
paramCurvesTrack->setFormationCase( geoMechCase );
|
||||||
paramCurvesTrack->setShowRegionLabels( true );
|
paramCurvesTrack->setShowRegionLabels( true );
|
||||||
@ -290,7 +290,7 @@ void RicNewWellBoreStabilityPlotFeature::createParametersTrack( RimWellBoreStabi
|
|||||||
curve->setCustomName( param.name() );
|
curve->setCustomName( param.name() );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
paramCurvesTrack->setAutoScaleXEnabled( true );
|
paramCurvesTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -305,11 +305,11 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
|
|||||||
"Stability Curves",
|
"Stability Curves",
|
||||||
|
|
||||||
plot );
|
plot );
|
||||||
stabilityCurvesTrack->setVisibleXRange( 0.0, 2.5 );
|
stabilityCurvesTrack->setVisiblePropertyValueRange( 0.0, 2.5 );
|
||||||
stabilityCurvesTrack->setColSpan( RimPlot::THREE );
|
stabilityCurvesTrack->setColSpan( RimPlot::THREE );
|
||||||
stabilityCurvesTrack->setAutoScaleXEnabled( true );
|
stabilityCurvesTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
stabilityCurvesTrack->setTickIntervals( 1.0, 0.2 );
|
stabilityCurvesTrack->setTickIntervals( 1.0, 0.2 );
|
||||||
stabilityCurvesTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
|
stabilityCurvesTrack->setPropertyValueAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
|
||||||
stabilityCurvesTrack->setFormationWellPath( wellPath );
|
stabilityCurvesTrack->setFormationWellPath( wellPath );
|
||||||
stabilityCurvesTrack->setFormationCase( geoMechCase );
|
stabilityCurvesTrack->setFormationCase( geoMechCase );
|
||||||
stabilityCurvesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
stabilityCurvesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
||||||
@ -368,7 +368,7 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stabilityCurvesTrack->setAutoScaleXEnabled( true );
|
stabilityCurvesTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -426,9 +426,9 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack( RimWellBoreStability
|
|||||||
minValue = cvf::Math::clamp( minValue, 0.0, maxValue - 90.0 );
|
minValue = cvf::Math::clamp( minValue, 0.0, maxValue - 90.0 );
|
||||||
}
|
}
|
||||||
wellPathAnglesTrack->setColSpan( RimPlot::TWO );
|
wellPathAnglesTrack->setColSpan( RimPlot::TWO );
|
||||||
wellPathAnglesTrack->setVisibleXRange( minValue, maxValue );
|
wellPathAnglesTrack->setVisiblePropertyValueRange( minValue, maxValue );
|
||||||
wellPathAnglesTrack->setTickIntervals( 180.0, 45.0 );
|
wellPathAnglesTrack->setTickIntervals( 180.0, 45.0 );
|
||||||
wellPathAnglesTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
|
wellPathAnglesTrack->setPropertyValueAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
|
||||||
wellPathAnglesTrack->setFormationWellPath( wellPath );
|
wellPathAnglesTrack->setFormationWellPath( wellPath );
|
||||||
wellPathAnglesTrack->setFormationCase( geoMechCase );
|
wellPathAnglesTrack->setFormationCase( geoMechCase );
|
||||||
wellPathAnglesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
wellPathAnglesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::FORMATION_ANNOTATIONS );
|
||||||
|
@ -73,7 +73,7 @@ void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack( RimWellLogTra
|
|||||||
|
|
||||||
for ( auto track : srcTracks )
|
for ( auto track : srcTracks )
|
||||||
{
|
{
|
||||||
track->setAutoScaleXEnabled( true );
|
track->setAutoScalePropertyValuesEnabled( true );
|
||||||
track->updateParentPlotZoom();
|
track->updateParentPlotZoom();
|
||||||
track->updateStackedCurveData();
|
track->updateStackedCurveData();
|
||||||
track->updateConnectedEditors();
|
track->updateConnectedEditors();
|
||||||
@ -86,7 +86,7 @@ void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack( RimWellLogTra
|
|||||||
|
|
||||||
destTrack->loadDataAndUpdate();
|
destTrack->loadDataAndUpdate();
|
||||||
destTrack->updateStackedCurveData();
|
destTrack->updateStackedCurveData();
|
||||||
destTrack->setAutoScaleXEnabled( true );
|
destTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
destTrack->updateParentPlotZoom();
|
destTrack->updateParentPlotZoom();
|
||||||
destTrack->updateConnectedEditors();
|
destTrack->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
@ -136,8 +136,8 @@ private:
|
|||||||
void reattachAllCurves() override {}
|
void reattachAllCurves() override {}
|
||||||
void updateAxes() override;
|
void updateAxes() override;
|
||||||
void onAxisSelected( int axis, bool toggle ) override;
|
void onAxisSelected( int axis, bool toggle ) override;
|
||||||
void setAutoScaleXEnabled( bool enabled ) override {}
|
void setAutoScalePropertyValuesEnabled( bool enabled ) override {}
|
||||||
void setAutoScaleYEnabled( bool enabled ) override {}
|
void setAutoScaleDepthValuesEnabled( bool enabled ) override {}
|
||||||
void updateLegend() override{};
|
void updateLegend() override{};
|
||||||
|
|
||||||
QString asciiDataForPlotExport() const override { return ""; }
|
QString asciiDataForPlotExport() const override { return ""; }
|
||||||
|
@ -107,8 +107,8 @@ protected:
|
|||||||
RiuPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override;
|
RiuPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override;
|
||||||
|
|
||||||
void reattachAllCurves() override {}
|
void reattachAllCurves() override {}
|
||||||
void setAutoScaleXEnabled( bool enabled ) override {}
|
void setAutoScalePropertyValuesEnabled( bool enabled ) override {}
|
||||||
void setAutoScaleYEnabled( bool enabled ) override {}
|
void setAutoScaleDepthValuesEnabled( bool enabled ) override {}
|
||||||
void updateLegend() override;
|
void updateLegend() override;
|
||||||
|
|
||||||
QString asciiDataForPlotExport() const override { return ""; }
|
QString asciiDataForPlotExport() const override { return ""; }
|
||||||
|
@ -481,7 +481,7 @@ void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle( RimWellLogTrack* plotT
|
|||||||
: RimWellLogFile::WELL_FLOW_COND_STANDARD;
|
: RimWellLogFile::WELL_FLOW_COND_STANDARD;
|
||||||
|
|
||||||
QString axisTitle = RimWellPlotTools::flowPlotAxisTitle( condition, unitSet );
|
QString axisTitle = RimWellPlotTools::flowPlotAxisTitle( condition, unitSet );
|
||||||
plotTrack->setXAxisTitle( axisTitle );
|
plotTrack->setPropertyValueAxisTitle( axisTitle );
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (m_flowDiagSolution)
|
if (m_flowDiagSolution)
|
||||||
|
@ -127,7 +127,7 @@ RiuPlotWidget* RimWellDistributionPlot::plotWidget()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellDistributionPlot::setAutoScaleXEnabled( bool /*enabled*/ )
|
void RimWellDistributionPlot::setAutoScalePropertyValuesEnabled( bool /*enabled*/ )
|
||||||
{
|
{
|
||||||
// cvf::Trace::show("RimWellDistributionPlot::setAutoScaleXEnabled()");
|
// cvf::Trace::show("RimWellDistributionPlot::setAutoScaleXEnabled()");
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ void RimWellDistributionPlot::setAutoScaleXEnabled( bool /*enabled*/ )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellDistributionPlot::setAutoScaleYEnabled( bool /*enabled*/ )
|
void RimWellDistributionPlot::setAutoScaleDepthValuesEnabled( bool /*enabled*/ )
|
||||||
{
|
{
|
||||||
// cvf::Trace::show("RimWellDistributionPlot::setAutoScaleYEnabled()");
|
// cvf::Trace::show("RimWellDistributionPlot::setAutoScaleYEnabled()");
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,8 @@ public:
|
|||||||
|
|
||||||
// RimPlot implementations
|
// RimPlot implementations
|
||||||
RiuPlotWidget* plotWidget() override;
|
RiuPlotWidget* plotWidget() override;
|
||||||
void setAutoScaleXEnabled( bool enabled ) override;
|
void setAutoScalePropertyValuesEnabled( bool enabled ) override;
|
||||||
void setAutoScaleYEnabled( bool enabled ) override;
|
void setAutoScaleDepthValuesEnabled( bool enabled ) override;
|
||||||
void updateAxes() override;
|
void updateAxes() override;
|
||||||
void updateLegend() override;
|
void updateLegend() override;
|
||||||
void updateZoomInParentPlot() override;
|
void updateZoomInParentPlot() override;
|
||||||
|
@ -300,7 +300,14 @@ void RimWellFlowRateCurve::setFlowValuesPrDepthValue( const QString&
|
|||||||
const std::vector<double>& depthValues,
|
const std::vector<double>& depthValues,
|
||||||
const std::vector<double>& flowRates )
|
const std::vector<double>& flowRates )
|
||||||
{
|
{
|
||||||
this->setValuesAndDepths( flowRates, depthValues, depthType, 0.0, RiaDefines::DepthUnitType::UNIT_NONE, false );
|
bool useLogarithmicScale = false;
|
||||||
|
this->setPropertyValuesAndDepths( flowRates,
|
||||||
|
depthValues,
|
||||||
|
depthType,
|
||||||
|
0.0,
|
||||||
|
RiaDefines::DepthUnitType::UNIT_NONE,
|
||||||
|
false,
|
||||||
|
useLogarithmicScale );
|
||||||
|
|
||||||
m_curveAutoName = curveName;
|
m_curveAutoName = curveName;
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@ void RimWellPltPlot::setPlotXAxisTitles( RimWellLogTrack* plotTrack )
|
|||||||
if ( m_useStandardConditionCurves )
|
if ( m_useStandardConditionCurves )
|
||||||
axisTitle += RimWellPlotTools::flowPlotAxisTitle( RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet );
|
axisTitle += RimWellPlotTools::flowPlotAxisTitle( RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet );
|
||||||
|
|
||||||
plotTrack->setXAxisTitle( axisTitle );
|
plotTrack->setPropertyValueAxisTitle( axisTitle );
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
QString unitText;
|
QString unitText;
|
||||||
@ -685,7 +685,7 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
|
|||||||
curveGroupId++;
|
curveGroupId++;
|
||||||
}
|
}
|
||||||
|
|
||||||
plotTrack->setAutoScaleXEnabled( true );
|
plotTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
RimWellLogPlot::onLoadDataAndUpdate();
|
RimWellLogPlot::onLoadDataAndUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -918,7 +918,7 @@ void RimWellPltPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
RimWellLogTrack* const plotTrack = dynamic_cast<RimWellLogTrack*>( plotByIndex( 0 ) );
|
RimWellLogTrack* const plotTrack = dynamic_cast<RimWellLogTrack*>( plotByIndex( 0 ) );
|
||||||
if ( plotTrack )
|
if ( plotTrack )
|
||||||
{
|
{
|
||||||
plotTrack->setAutoScaleXEnabled( true );
|
plotTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
}
|
}
|
||||||
updateZoom();
|
updateZoom();
|
||||||
}
|
}
|
||||||
@ -931,7 +931,7 @@ void RimWellPltPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
RimWellLogTrack* const plotTrack = dynamic_cast<RimWellLogTrack*>( plotByIndex( 0 ) );
|
RimWellLogTrack* const plotTrack = dynamic_cast<RimWellLogTrack*>( plotByIndex( 0 ) );
|
||||||
if ( plotTrack )
|
if ( plotTrack )
|
||||||
{
|
{
|
||||||
plotTrack->setAutoScaleXEnabled( true );
|
plotTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
}
|
}
|
||||||
updateZoom();
|
updateZoom();
|
||||||
}
|
}
|
||||||
|
@ -183,8 +183,8 @@ QImage RimGridCrossPlot::snapshotWindowContent()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlot::zoomAll()
|
void RimGridCrossPlot::zoomAll()
|
||||||
{
|
{
|
||||||
setAutoScaleXEnabled( true );
|
setAutoScalePropertyValuesEnabled( true );
|
||||||
setAutoScaleYEnabled( true );
|
setAutoScaleDepthValuesEnabled( true );
|
||||||
|
|
||||||
updateZoomInParentPlot();
|
updateZoomInParentPlot();
|
||||||
}
|
}
|
||||||
@ -338,7 +338,7 @@ void RimGridCrossPlot::detachAllCurves()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlot::setAutoScaleXEnabled( bool enabled )
|
void RimGridCrossPlot::setAutoScalePropertyValuesEnabled( bool enabled )
|
||||||
{
|
{
|
||||||
m_xAxisProperties->setAutoZoom( enabled );
|
m_xAxisProperties->setAutoZoom( enabled );
|
||||||
}
|
}
|
||||||
@ -346,7 +346,7 @@ void RimGridCrossPlot::setAutoScaleXEnabled( bool enabled )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlot::setAutoScaleYEnabled( bool enabled )
|
void RimGridCrossPlot::setAutoScaleDepthValuesEnabled( bool enabled )
|
||||||
{
|
{
|
||||||
m_yAxisProperties->setAutoZoom( enabled );
|
m_yAxisProperties->setAutoZoom( enabled );
|
||||||
}
|
}
|
||||||
@ -457,8 +457,8 @@ void RimGridCrossPlot::axisLogarithmicChanged( const caf::SignalEmitter* emitter
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridCrossPlot::onPlotZoomed()
|
void RimGridCrossPlot::onPlotZoomed()
|
||||||
{
|
{
|
||||||
setAutoScaleXEnabled( false );
|
setAutoScalePropertyValuesEnabled( false );
|
||||||
setAutoScaleYEnabled( false );
|
setAutoScaleDepthValuesEnabled( false );
|
||||||
updateZoomFromParentPlot();
|
updateZoomFromParentPlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,8 +102,8 @@ public:
|
|||||||
void updateZoomInParentPlot() override;
|
void updateZoomInParentPlot() override;
|
||||||
void updateZoomFromParentPlot() override;
|
void updateZoomFromParentPlot() override;
|
||||||
|
|
||||||
void setAutoScaleXEnabled( bool enabled ) override;
|
void setAutoScalePropertyValuesEnabled( bool enabled ) override;
|
||||||
void setAutoScaleYEnabled( bool enabled ) override;
|
void setAutoScaleDepthValuesEnabled( bool enabled ) override;
|
||||||
caf::PdmObject* findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const override;
|
caf::PdmObject* findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const override;
|
||||||
void onAxisSelected( int axis, bool toggle ) override;
|
void onAxisSelected( int axis, bool toggle ) override;
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ void RimGridCrossPlotCurve::setSamples( const std::vector<double>& xValues, cons
|
|||||||
|
|
||||||
if ( xValues.empty() || yValues.empty() || !m_plotCurve ) return;
|
if ( xValues.empty() || yValues.empty() || !m_plotCurve ) return;
|
||||||
|
|
||||||
bool isLogCurve = false;
|
bool useLogarithmicScale = false;
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
|
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -315,7 +315,7 @@ void RimDepthTrackPlot::updateZoom()
|
|||||||
|
|
||||||
for ( RimPlot* plot : plots() )
|
for ( RimPlot* plot : plots() )
|
||||||
{
|
{
|
||||||
static_cast<RimWellLogTrack*>( plot )->setVisibleYRange( m_minVisibleDepth(), m_maxVisibleDepth() );
|
static_cast<RimWellLogTrack*>( plot )->setVisibleDepthRange( m_minVisibleDepth(), m_maxVisibleDepth() );
|
||||||
plot->updateZoomInParentPlot();
|
plot->updateZoomInParentPlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1183,7 +1183,7 @@ void RimDepthTrackPlot::setAutoScaleXEnabled( bool enabled )
|
|||||||
{
|
{
|
||||||
for ( RimPlot* plot : plots() )
|
for ( RimPlot* plot : plots() )
|
||||||
{
|
{
|
||||||
plot->setAutoScaleXEnabled( enabled );
|
plot->setAutoScalePropertyValuesEnabled( enabled );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,18 +408,20 @@ void RimGridTimeHistoryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
|
|
||||||
RimSummaryPlot* plot = nullptr;
|
RimSummaryPlot* plot = nullptr;
|
||||||
firstAncestorOrThisOfType( plot );
|
firstAncestorOrThisOfType( plot );
|
||||||
bool isLogCurve = plot->isLogarithmicScaleEnabled( yAxis() );
|
bool useLogarithmicScale = plot->isLogarithmicScaleEnabled( yAxis() );
|
||||||
|
|
||||||
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
||||||
{
|
{
|
||||||
std::vector<time_t> dateTimes = timeStepValues();
|
std::vector<time_t> dateTimes = timeStepValues();
|
||||||
if ( dateTimes.size() > 0 && dateTimes.size() == values.size() )
|
if ( dateTimes.size() > 0 && dateTimes.size() == values.size() )
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, values, isLogCurve );
|
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, values, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromTimeTAndYValues( std::vector<time_t>(), std::vector<double>(), isLogCurve );
|
m_plotCurve->setSamplesFromTimeTAndYValues( std::vector<time_t>(),
|
||||||
|
std::vector<double>(),
|
||||||
|
useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -435,11 +437,13 @@ void RimGridTimeHistoryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
times.push_back( timeScale * day );
|
times.push_back( timeScale * day );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( times, values, isLogCurve );
|
m_plotCurve->setSamplesFromXValuesAndYValues( times, values, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromTimeTAndYValues( std::vector<time_t>(), std::vector<double>(), isLogCurve );
|
m_plotCurve->setSamplesFromTimeTAndYValues( std::vector<time_t>(),
|
||||||
|
std::vector<double>(),
|
||||||
|
useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,7 +406,7 @@ void RimMultiPlot::setAutoScaleXEnabled( bool enabled )
|
|||||||
{
|
{
|
||||||
for ( RimPlot* plot : plots() )
|
for ( RimPlot* plot : plots() )
|
||||||
{
|
{
|
||||||
plot->setAutoScaleXEnabled( enabled );
|
plot->setAutoScalePropertyValuesEnabled( enabled );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +417,7 @@ void RimMultiPlot::setAutoScaleYEnabled( bool enabled )
|
|||||||
{
|
{
|
||||||
for ( RimPlot* plot : plots() )
|
for ( RimPlot* plot : plots() )
|
||||||
{
|
{
|
||||||
plot->setAutoScaleYEnabled( enabled );
|
plot->setAutoScaleDepthValuesEnabled( enabled );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,9 +71,9 @@ public:
|
|||||||
void updateAfterInsertingIntoMultiPlot();
|
void updateAfterInsertingIntoMultiPlot();
|
||||||
|
|
||||||
// Pure virtual interface methods
|
// Pure virtual interface methods
|
||||||
virtual void setAutoScaleXEnabled( bool enabled ) = 0;
|
virtual void setAutoScalePropertyValuesEnabled( bool enabled ) = 0;
|
||||||
virtual void setAutoScaleYEnabled( bool enabled ) = 0;
|
virtual void setAutoScaleDepthValuesEnabled( bool enabled ) = 0;
|
||||||
virtual void updateAxes() = 0;
|
virtual void updateAxes() = 0;
|
||||||
|
|
||||||
virtual void updateLegend() = 0;
|
virtual void updateLegend() = 0;
|
||||||
|
|
||||||
|
@ -684,11 +684,11 @@ bool RimPlotCurve::hasParentPlot() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimPlotCurve::setSamplesFromXYValues( const std::vector<double>& xValues,
|
void RimPlotCurve::setSamplesFromXYValues( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve )
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
if ( m_plotCurve )
|
if ( m_plotCurve )
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
|
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,11 +697,11 @@ void RimPlotCurve::setSamplesFromXYValues( const std::vector<double>& xValues,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
void RimPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve )
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
if ( m_plotCurve )
|
if ( m_plotCurve )
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromDatesAndYValues( dateTimes, yValues, isLogCurve );
|
m_plotCurve->setSamplesFromDatesAndYValues( dateTimes, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -710,11 +710,11 @@ void RimPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>&
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
void RimPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve )
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
if ( m_plotCurve )
|
if ( m_plotCurve )
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, yValues, isLogCurve );
|
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -724,12 +724,12 @@ void RimPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dat
|
|||||||
void RimPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
void RimPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
const std::vector<double>& errorValues,
|
const std::vector<double>& errorValues,
|
||||||
bool isLogCurve,
|
bool useLogarithmicScale,
|
||||||
RiaCurveDataTools::ErrorAxis errorAxis )
|
RiaCurveDataTools::ErrorAxis errorAxis )
|
||||||
{
|
{
|
||||||
if ( m_plotCurve )
|
if ( m_plotCurve )
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromXYErrorValues( xValues, yValues, errorValues, isLogCurve, errorAxis );
|
m_plotCurve->setSamplesFromXYErrorValues( xValues, yValues, errorValues, useLogarithmicScale, errorAxis );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,18 +141,20 @@ protected:
|
|||||||
void setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
void setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
const std::vector<double>& errorValues,
|
const std::vector<double>& errorValues,
|
||||||
bool isLogCurve,
|
bool useLogarithmicScale,
|
||||||
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
|
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
|
||||||
|
|
||||||
void setSamplesFromXYValues( const std::vector<double>& xValues, const std::vector<double>& yValues, bool isLogCurve );
|
void setSamplesFromXYValues( const std::vector<double>& xValues,
|
||||||
|
const std::vector<double>& yValues,
|
||||||
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
void setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
void setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve );
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
void setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
void setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve );
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden PDM methods
|
// Overridden PDM methods
|
||||||
|
@ -175,14 +175,14 @@ RiuPlotWidget* RimVfpPlot::plotWidget()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimVfpPlot::setAutoScaleXEnabled( bool /*enabled*/ )
|
void RimVfpPlot::setAutoScalePropertyValuesEnabled( bool /*enabled*/ )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimVfpPlot::setAutoScaleYEnabled( bool /*enabled*/ )
|
void RimVfpPlot::setAutoScaleDepthValuesEnabled( bool /*enabled*/ )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,8 +573,8 @@ void RimVfpPlot::populatePlotWidgetWithPlotData( RiuPlotWidget* plotWidget, cons
|
|||||||
symbol->setSize( 6, 6 );
|
symbol->setSize( 6, 6 );
|
||||||
curve->setSymbol( symbol );
|
curve->setSymbol( symbol );
|
||||||
|
|
||||||
bool isLogCurve = false;
|
bool useLogarithmicScale = false;
|
||||||
curve->setSamplesFromXValuesAndYValues( plotData.xData( idx ), plotData.yData( idx ), isLogCurve );
|
curve->setSamplesFromXValuesAndYValues( plotData.xData( idx ), plotData.yData( idx ), useLogarithmicScale );
|
||||||
curve->attachToPlot( plotWidget );
|
curve->attachToPlot( plotWidget );
|
||||||
curve->showInPlot();
|
curve->showInPlot();
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,8 @@ public:
|
|||||||
// RimPlot implementations
|
// RimPlot implementations
|
||||||
RiuPlotWidget* plotWidget() override;
|
RiuPlotWidget* plotWidget() override;
|
||||||
|
|
||||||
void setAutoScaleXEnabled( bool enabled ) override;
|
void setAutoScalePropertyValuesEnabled( bool enabled ) override;
|
||||||
void setAutoScaleYEnabled( bool enabled ) override;
|
void setAutoScaleDepthValuesEnabled( bool enabled ) override;
|
||||||
void updateAxes() override;
|
void updateAxes() override;
|
||||||
void updateLegend() override;
|
void updateLegend() override;
|
||||||
QString asciiDataForPlotExport() const override;
|
QString asciiDataForPlotExport() const override;
|
||||||
|
@ -158,7 +158,17 @@ void RimStimPlanModelCurve::performDataExtraction( bool* isUsingPseudoLength )
|
|||||||
filterInvalidValuesForLogarithmicScale( values );
|
filterInvalidValuesForLogarithmicScale( values );
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setValuesWithMdAndTVD( values, measuredDepthValues, tvDepthValues, rkbDiff, depthUnit, !performDataSmoothing, xUnits );
|
// TOOD: Consider rewrite, as RigWellLogCurveData can do logarithmic filtering
|
||||||
|
|
||||||
|
bool useLogarithmicScale = false;
|
||||||
|
this->setPropertyValuesWithMdAndTVD( values,
|
||||||
|
measuredDepthValues,
|
||||||
|
tvDepthValues,
|
||||||
|
rkbDiff,
|
||||||
|
depthUnit,
|
||||||
|
!performDataSmoothing,
|
||||||
|
useLogarithmicScale,
|
||||||
|
xUnits );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,13 +134,13 @@ void RimAsciiDataCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
|
|
||||||
RimSummaryPlot* plot = nullptr;
|
RimSummaryPlot* plot = nullptr;
|
||||||
firstAncestorOrThisOfType( plot );
|
firstAncestorOrThisOfType( plot );
|
||||||
bool isLogCurve = plot->isLogarithmicScaleEnabled( this->yAxis() );
|
bool useLogarithmicScale = plot->isLogarithmicScaleEnabled( this->yAxis() );
|
||||||
|
|
||||||
if ( dateTimes.size() > 0 && dateTimes.size() == values.size() )
|
if ( dateTimes.size() > 0 && dateTimes.size() == values.size() )
|
||||||
{
|
{
|
||||||
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, values, isLogCurve );
|
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, values, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -156,12 +156,12 @@ void RimAsciiDataCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( times, values, isLogCurve );
|
m_plotCurve->setSamplesFromXValuesAndYValues( times, values, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromTimeTAndYValues( std::vector<time_t>(), std::vector<double>(), isLogCurve );
|
m_plotCurve->setSamplesFromTimeTAndYValues( std::vector<time_t>(), std::vector<double>(), useLogarithmicScale );
|
||||||
}
|
}
|
||||||
|
|
||||||
updateZoomInParentPlot();
|
updateZoomInParentPlot();
|
||||||
|
@ -601,7 +601,7 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
|
|
||||||
RimSummaryPlot* plot = nullptr;
|
RimSummaryPlot* plot = nullptr;
|
||||||
firstAncestorOrThisOfTypeAsserted( plot );
|
firstAncestorOrThisOfTypeAsserted( plot );
|
||||||
bool isLogCurve = plot->isLogarithmicScaleEnabled( this->axisY() );
|
bool useLogarithmicScale = plot->isLogarithmicScaleEnabled( this->axisY() );
|
||||||
|
|
||||||
bool shouldPopulateViewWithEmptyData = false;
|
bool shouldPopulateViewWithEmptyData = false;
|
||||||
|
|
||||||
@ -627,7 +627,7 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
{
|
{
|
||||||
this->setSamplesFromXYValues( curveMerger.interpolatedYValuesForAllXValues( 0 ),
|
this->setSamplesFromXYValues( curveMerger.interpolatedYValuesForAllXValues( 0 ),
|
||||||
curveMerger.interpolatedYValuesForAllXValues( 1 ),
|
curveMerger.interpolatedYValuesForAllXValues( 1 ),
|
||||||
isLogCurve );
|
useLogarithmicScale );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -655,11 +655,11 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
|
|
||||||
if ( !errValues.empty() )
|
if ( !errValues.empty() )
|
||||||
{
|
{
|
||||||
this->setSamplesFromXYErrorValues( timeSteps, curveValuesY, errValues, isLogCurve );
|
this->setSamplesFromXYErrorValues( timeSteps, curveValuesY, errValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->setSamplesFromXYValues( timeSteps, curveValuesY, isLogCurve );
|
this->setSamplesFromXYValues( timeSteps, curveValuesY, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -681,12 +681,14 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
resampledTimeSteps.insert( resampledTimeSteps.begin(), curveTimeStepsY.front() );
|
resampledTimeSteps.insert( resampledTimeSteps.begin(), curveTimeStepsY.front() );
|
||||||
resampledValues.insert( resampledValues.begin(), resampledValues.front() );
|
resampledValues.insert( resampledValues.begin(), resampledValues.front() );
|
||||||
|
|
||||||
this->setSamplesFromTimeTAndYValues( resampledTimeSteps, resampledValues, isLogCurve );
|
this->setSamplesFromTimeTAndYValues( resampledTimeSteps,
|
||||||
|
resampledValues,
|
||||||
|
useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->setSamplesFromTimeTAndYValues( curveTimeStepsY, curveValuesY, isLogCurve );
|
this->setSamplesFromTimeTAndYValues( curveTimeStepsY, curveValuesY, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -705,7 +707,7 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setSamplesFromXYValues( timeFromSimulationStart, curveValuesY, isLogCurve );
|
this->setSamplesFromXYValues( timeFromSimulationStart, curveValuesY, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -716,7 +718,7 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
|
|
||||||
if ( shouldPopulateViewWithEmptyData )
|
if ( shouldPopulateViewWithEmptyData )
|
||||||
{
|
{
|
||||||
this->setSamplesFromXYValues( std::vector<double>(), std::vector<double>(), isLogCurve );
|
this->setSamplesFromXYValues( std::vector<double>(), std::vector<double>(), useLogarithmicScale );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( updateParentPlot && hasParentPlot() )
|
if ( updateParentPlot && hasParentPlot() )
|
||||||
|
@ -1134,8 +1134,8 @@ void RimSummaryPlot::removeAllTimeAnnotations()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryPlot::zoomAll()
|
void RimSummaryPlot::zoomAll()
|
||||||
{
|
{
|
||||||
setAutoScaleXEnabled( true );
|
setAutoScalePropertyValuesEnabled( true );
|
||||||
setAutoScaleYEnabled( true );
|
setAutoScaleDepthValuesEnabled( true );
|
||||||
updateZoomInParentPlot();
|
updateZoomInParentPlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1828,8 +1828,8 @@ void RimSummaryPlot::handleDroppedObjects( const std::vector<caf::PdmObjectHandl
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryPlot::onPlotZoomed()
|
void RimSummaryPlot::onPlotZoomed()
|
||||||
{
|
{
|
||||||
setAutoScaleXEnabled( false );
|
setAutoScalePropertyValuesEnabled( false );
|
||||||
setAutoScaleYEnabled( false );
|
setAutoScaleDepthValuesEnabled( false );
|
||||||
updateZoomFromParentPlot();
|
updateZoomFromParentPlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2243,7 +2243,7 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlot::fieldsToShowInToolbar()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryPlot::setAutoScaleXEnabled( bool enabled )
|
void RimSummaryPlot::setAutoScalePropertyValuesEnabled( bool enabled )
|
||||||
{
|
{
|
||||||
for ( auto ap : m_axisProperties )
|
for ( auto ap : m_axisProperties )
|
||||||
{
|
{
|
||||||
@ -2258,7 +2258,7 @@ void RimSummaryPlot::setAutoScaleXEnabled( bool enabled )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryPlot::setAutoScaleYEnabled( bool enabled )
|
void RimSummaryPlot::setAutoScaleDepthValuesEnabled( bool enabled )
|
||||||
{
|
{
|
||||||
for ( auto ap : m_axisProperties )
|
for ( auto ap : m_axisProperties )
|
||||||
{
|
{
|
||||||
|
@ -161,8 +161,8 @@ public:
|
|||||||
virtual RimSummaryPlotSourceStepping* sourceSteppingObjectForKeyEventHandling() const;
|
virtual RimSummaryPlotSourceStepping* sourceSteppingObjectForKeyEventHandling() const;
|
||||||
virtual std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
virtual std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
||||||
|
|
||||||
void setAutoScaleXEnabled( bool enabled ) override;
|
void setAutoScalePropertyValuesEnabled( bool enabled ) override;
|
||||||
void setAutoScaleYEnabled( bool enabled ) override;
|
void setAutoScaleDepthValuesEnabled( bool enabled ) override;
|
||||||
RiuPlotWidget* plotWidget() override;
|
RiuPlotWidget* plotWidget() override;
|
||||||
void zoomAll() override;
|
void zoomAll() override;
|
||||||
void updateZoomInParentPlot() override;
|
void updateZoomInParentPlot() override;
|
||||||
|
@ -79,7 +79,7 @@ void Rim3dWellLogRftCurve::curveValuesAndMds( std::vector<double>* values, std::
|
|||||||
const RigWellLogCurveData* curveData = m_2dWellLogRftCurve->curveData();
|
const RigWellLogCurveData* curveData = m_2dWellLogRftCurve->curveData();
|
||||||
|
|
||||||
// These values are for a simulation well
|
// These values are for a simulation well
|
||||||
*values = curveData->xValues();
|
*values = curveData->propertyValues();
|
||||||
*measuredDepthValues = curveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH );
|
*measuredDepthValues = curveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,8 @@ void RimEnsembleWellLogStatisticsCurve::performDataExtraction( bool* isUsingPseu
|
|||||||
validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB, tvDepthValues ) );
|
validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB, tvDepthValues ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setValuesAndDepths( values, validDepths, rkbDiff, depthUnit, false );
|
bool useLogarithmicScale = false;
|
||||||
|
this->setPropertyValuesAndDepths( values, validDepths, rkbDiff, depthUnit, false, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,8 @@ RimWellLogCurve::RimWellLogCurve()
|
|||||||
|
|
||||||
m_curveData = new RigWellLogCurveData;
|
m_curveData = new RigWellLogCurveData;
|
||||||
|
|
||||||
m_curveDataXRange = std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
|
m_curveDataPropertyValueRange =
|
||||||
|
std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
|
||||||
|
|
||||||
setDeletable( true );
|
setDeletable( true );
|
||||||
}
|
}
|
||||||
@ -72,7 +73,7 @@ void RimWellLogCurve::setDepthUnit( RiaDefines::DepthUnitType depthUnit )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimWellLogCurve::xValueRangeInData( double* minimumValue, double* maximumValue ) const
|
bool RimWellLogCurve::propertyValueRangeInData( double* minimumValue, double* maximumValue ) const
|
||||||
{
|
{
|
||||||
CAF_ASSERT( minimumValue && maximumValue );
|
CAF_ASSERT( minimumValue && maximumValue );
|
||||||
|
|
||||||
@ -81,14 +82,14 @@ bool RimWellLogCurve::xValueRangeInData( double* minimumValue, double* maximumVa
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_curveDataXRange.first == -std::numeric_limits<double>::infinity() ||
|
if ( m_curveDataPropertyValueRange.first == -std::numeric_limits<double>::infinity() ||
|
||||||
m_curveDataXRange.second == std::numeric_limits<double>::infinity() )
|
m_curveDataPropertyValueRange.second == std::numeric_limits<double>::infinity() )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*minimumValue = m_curveDataXRange.first;
|
*minimumValue = m_curveDataPropertyValueRange.first;
|
||||||
*maximumValue = m_curveDataXRange.second;
|
*maximumValue = m_curveDataPropertyValueRange.second;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -96,7 +97,7 @@ bool RimWellLogCurve::xValueRangeInData( double* minimumValue, double* maximumVa
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimWellLogCurve::yValueRangeInData( double* minimumValue, double* maximumValue ) const
|
bool RimWellLogCurve::depthValueRangeInData( double* minimumValue, double* maximumValue ) const
|
||||||
{
|
{
|
||||||
CAF_ASSERT( minimumValue && maximumValue );
|
CAF_ASSERT( minimumValue && maximumValue );
|
||||||
|
|
||||||
@ -116,50 +117,54 @@ bool RimWellLogCurve::yValueRangeInData( double* minimumValue, double* maximumVa
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogCurve::setValuesAndDepths( const std::vector<double>& xValues,
|
void RimWellLogCurve::setPropertyValuesAndDepths( const std::vector<double>& propertyValues,
|
||||||
const std::vector<double>& depths,
|
const std::vector<double>& depths,
|
||||||
RiaDefines::DepthTypeEnum depthType,
|
RiaDefines::DepthTypeEnum depthType,
|
||||||
double rkbDiff,
|
double rkbDiff,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
bool isExtractionCurve,
|
bool isExtractionCurve,
|
||||||
const QString& xUnits )
|
bool useLogarithmicScale,
|
||||||
|
const QString& propertyUnit )
|
||||||
{
|
{
|
||||||
m_curveData->setValuesAndDepths( xValues, depths, depthType, rkbDiff, depthUnit, isExtractionCurve );
|
m_curveData->setValuesAndDepths( propertyValues, depths, depthType, rkbDiff, depthUnit, isExtractionCurve, useLogarithmicScale );
|
||||||
m_curveData->setXUnits( xUnits );
|
m_curveData->setPropertyValueUnit( propertyUnit );
|
||||||
calculateCurveDataXRange();
|
calculateCurveDataPropertyValueRange();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogCurve::setValuesAndDepths( const std::vector<double>& xValues,
|
void RimWellLogCurve::setPropertyValuesAndDepths( const std::vector<double>& propertyValues,
|
||||||
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
||||||
double rkbDiff,
|
double rkbDiff,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
bool isExtractionCurve,
|
bool isExtractionCurve,
|
||||||
const QString& xUnits )
|
bool useLogarithmicScale,
|
||||||
|
|
||||||
|
const QString& propertyUnit )
|
||||||
{
|
{
|
||||||
m_curveData->setValuesAndDepths( xValues, depths, rkbDiff, depthUnit, isExtractionCurve );
|
m_curveData->setValuesAndDepths( propertyValues, depths, rkbDiff, depthUnit, isExtractionCurve, useLogarithmicScale );
|
||||||
m_curveData->setXUnits( xUnits );
|
m_curveData->setPropertyValueUnit( propertyUnit );
|
||||||
calculateCurveDataXRange();
|
calculateCurveDataPropertyValueRange();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogCurve::setValuesWithMdAndTVD( const std::vector<double>& xValues,
|
void RimWellLogCurve::setPropertyValuesWithMdAndTVD( const std::vector<double>& propertyValues,
|
||||||
const std::vector<double>& measuredDepths,
|
const std::vector<double>& measuredDepths,
|
||||||
const std::vector<double>& tvdMSL,
|
const std::vector<double>& tvdMSL,
|
||||||
double rkbDiff,
|
double rkbDiff,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
bool isExtractionCurve,
|
bool isExtractionCurve,
|
||||||
const QString& xUnits )
|
bool useLogarithmicScale,
|
||||||
|
const QString& propertyUnit )
|
||||||
{
|
{
|
||||||
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> depths = { { RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> depths = { { RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
||||||
measuredDepths },
|
measuredDepths },
|
||||||
{ RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH,
|
{ RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH,
|
||||||
tvdMSL } };
|
tvdMSL } };
|
||||||
setValuesAndDepths( xValues, depths, rkbDiff, depthUnit, isExtractionCurve, xUnits );
|
setPropertyValuesAndDepths( propertyValues, depths, rkbDiff, depthUnit, isExtractionCurve, useLogarithmicScale, propertyUnit );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -214,15 +219,15 @@ QString RimWellLogCurve::wellLogCurveIconName()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogCurve::setOverrideCurveData( const std::vector<double>& xValues,
|
void RimWellLogCurve::setOverrideCurveData( const std::vector<double>& propertyValues,
|
||||||
const std::vector<double>& depthValues,
|
const std::vector<double>& depthValues,
|
||||||
const RiaCurveDataTools::CurveIntervals& curveIntervals )
|
const RiaCurveDataTools::CurveIntervals& curveIntervals )
|
||||||
{
|
{
|
||||||
auto minmax_it = std::minmax_element( xValues.begin(), xValues.end() );
|
auto minmax_it = std::minmax_element( propertyValues.begin(), propertyValues.end() );
|
||||||
this->setOverrideCurveDataXRange( *( minmax_it.first ), *( minmax_it.second ) );
|
this->setOverrideCurveDataPropertyValueRange( *( minmax_it.first ), *( minmax_it.second ) );
|
||||||
if ( m_plotCurve )
|
if ( m_plotCurve )
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesValues( xValues, depthValues );
|
m_plotCurve->setSamplesValues( propertyValues, depthValues );
|
||||||
m_plotCurve->setLineSegmentStartStopIndices( curveIntervals );
|
m_plotCurve->setLineSegmentStartStopIndices( curveIntervals );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -247,7 +252,7 @@ void RimWellLogCurve::updateZoomInParentPlot()
|
|||||||
|
|
||||||
if ( wellLogTrack )
|
if ( wellLogTrack )
|
||||||
{
|
{
|
||||||
wellLogTrack->setAutoScaleXIfNecessary();
|
wellLogTrack->setAutoScalePropertyValuesIfNecessary();
|
||||||
|
|
||||||
RimDepthTrackPlot* wellLogPlot;
|
RimDepthTrackPlot* wellLogPlot;
|
||||||
wellLogTrack->firstAncestorOrThisOfType( wellLogPlot );
|
wellLogTrack->firstAncestorOrThisOfType( wellLogPlot );
|
||||||
@ -299,24 +304,25 @@ void RimWellLogCurve::updateLegendsInPlot()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogCurve::setOverrideCurveDataXRange( double minimumValue, double maximumValue )
|
void RimWellLogCurve::setOverrideCurveDataPropertyValueRange( double minimumValue, double maximumValue )
|
||||||
{
|
{
|
||||||
m_curveDataXRange = std::make_pair( minimumValue, maximumValue );
|
m_curveDataPropertyValueRange = std::make_pair( minimumValue, maximumValue );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogCurve::calculateCurveDataXRange()
|
void RimWellLogCurve::calculateCurveDataPropertyValueRange()
|
||||||
{
|
{
|
||||||
// Invalidate range first
|
// Invalidate range first
|
||||||
m_curveDataXRange = std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
|
m_curveDataPropertyValueRange =
|
||||||
for ( double xValue : m_curveData->xValues() )
|
std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
|
||||||
|
for ( double xValue : m_curveData->propertyValues() )
|
||||||
{
|
{
|
||||||
if ( RiaCurveDataTools::isValidValue( xValue, false ) )
|
if ( RiaCurveDataTools::isValidValue( xValue, false ) )
|
||||||
{
|
{
|
||||||
m_curveDataXRange.first = std::min( m_curveDataXRange.first, xValue );
|
m_curveDataPropertyValueRange.first = std::min( m_curveDataPropertyValueRange.first, xValue );
|
||||||
m_curveDataXRange.second = std::max( m_curveDataXRange.second, xValue );
|
m_curveDataPropertyValueRange.second = std::max( m_curveDataPropertyValueRange.second, xValue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,29 +42,34 @@ public:
|
|||||||
|
|
||||||
void setDepthUnit( RiaDefines::DepthUnitType depthUnit );
|
void setDepthUnit( RiaDefines::DepthUnitType depthUnit );
|
||||||
|
|
||||||
bool xValueRangeInData( double* minimumValue, double* maximumValue ) const;
|
bool propertyValueRangeInData( double* minimumValue, double* maximumValue ) const;
|
||||||
bool yValueRangeInData( double* minimumValue, double* maximumValue ) const;
|
bool depthValueRangeInData( double* minimumValue, double* maximumValue ) const;
|
||||||
|
|
||||||
void setValuesAndDepths( const std::vector<double>& xValues,
|
void setPropertyValuesAndDepths( const std::vector<double>& propertyValues,
|
||||||
const std::vector<double>& depths,
|
const std::vector<double>& depths,
|
||||||
RiaDefines::DepthTypeEnum depthType,
|
RiaDefines::DepthTypeEnum depthType,
|
||||||
double rkbDiff,
|
double rkbDiff,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
bool isExtractionCurve,
|
bool isExtractionCurve,
|
||||||
const QString& xUnits = RiaWellLogUnitTools<double>::noUnitString() );
|
bool useLogarithmicScale,
|
||||||
void setValuesWithMdAndTVD( const std::vector<double>& xValues,
|
const QString& propertyUnit = RiaWellLogUnitTools<double>::noUnitString() );
|
||||||
const std::vector<double>& measuredDepths,
|
|
||||||
const std::vector<double>& tvDepths,
|
void setPropertyValuesWithMdAndTVD( const std::vector<double>& propertyValues,
|
||||||
double rkbDiff,
|
const std::vector<double>& measuredDepths,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
const std::vector<double>& tvDepths,
|
||||||
bool isExtractionCurve,
|
double rkbDiff,
|
||||||
const QString& xUnits = RiaWellLogUnitTools<double>::noUnitString() );
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
void setValuesAndDepths( const std::vector<double>& xValues,
|
bool isExtractionCurve,
|
||||||
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
bool useLogarithmicScale,
|
||||||
double rkbDiff,
|
const QString& propertyUnit = RiaWellLogUnitTools<double>::noUnitString() );
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
|
||||||
bool isExtractionCurve,
|
void setPropertyValuesAndDepths( const std::vector<double>& propertyValues,
|
||||||
const QString& xUnits = RiaWellLogUnitTools<double>::noUnitString() );
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
||||||
|
double rkbDiff,
|
||||||
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
|
bool isExtractionCurve,
|
||||||
|
bool useLogarithmicScale,
|
||||||
|
const QString& propertyUnit = RiaWellLogUnitTools<double>::noUnitString() );
|
||||||
|
|
||||||
const RigWellLogCurveData* curveData() const;
|
const RigWellLogCurveData* curveData() const;
|
||||||
|
|
||||||
@ -78,7 +83,7 @@ public:
|
|||||||
|
|
||||||
static QString wellLogCurveIconName();
|
static QString wellLogCurveIconName();
|
||||||
|
|
||||||
void setOverrideCurveData( const std::vector<double>& xValues,
|
void setOverrideCurveData( const std::vector<double>& propertyValues,
|
||||||
const std::vector<double>& depthValues,
|
const std::vector<double>& depthValues,
|
||||||
const RiaCurveDataTools::CurveIntervals& curveIntervals );
|
const RiaCurveDataTools::CurveIntervals& curveIntervals );
|
||||||
|
|
||||||
@ -87,11 +92,11 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void updateZoomInParentPlot() override;
|
void updateZoomInParentPlot() override;
|
||||||
void updateLegendsInPlot() override;
|
void updateLegendsInPlot() override;
|
||||||
void setOverrideCurveDataXRange( double minimumValue, double maximumValue );
|
void setOverrideCurveDataPropertyValueRange( double minimumValue, double maximumValue );
|
||||||
void calculateCurveDataXRange();
|
void calculateCurveDataPropertyValueRange();
|
||||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cvf::ref<RigWellLogCurveData> m_curveData;
|
cvf::ref<RigWellLogCurveData> m_curveData;
|
||||||
std::pair<double, double> m_curveDataXRange;
|
std::pair<double, double> m_curveDataPropertyValueRange;
|
||||||
};
|
};
|
||||||
|
@ -357,24 +357,24 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
isUsingPseudoLength = false;
|
isUsingPseudoLength = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isLogCurve = false;
|
bool useLogarithmicScale = false;
|
||||||
|
|
||||||
RimWellLogTrack* track = nullptr;
|
RimWellLogTrack* track = nullptr;
|
||||||
firstAncestorOfType( track );
|
firstAncestorOfType( track );
|
||||||
if ( track )
|
if ( track )
|
||||||
{
|
{
|
||||||
isLogCurve = track->isLogarithmicScale();
|
useLogarithmicScale = track->isLogarithmicScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double> xPlotValues = curveData()->xPlotValues();
|
std::vector<double> xPlotValues = curveData()->propertyValuesByIntervals();
|
||||||
std::vector<double> depthPlotValues = curveData()->depthPlotValues( depthType, displayUnit );
|
std::vector<double> depthPlotValues = curveData()->depthValuesByIntervals( depthType, displayUnit );
|
||||||
CAF_ASSERT( xPlotValues.size() == depthPlotValues.size() );
|
CAF_ASSERT( xPlotValues.size() == depthPlotValues.size() );
|
||||||
|
|
||||||
if ( wellLogPlot->depthOrientation() == RimDepthTrackPlot::DepthOrientation::HORIZONTAL )
|
if ( wellLogPlot->depthOrientation() == RimDepthTrackPlot::DepthOrientation::HORIZONTAL )
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( depthPlotValues, xPlotValues, isLogCurve );
|
m_plotCurve->setSamplesFromXValuesAndYValues( depthPlotValues, xPlotValues, useLogarithmicScale );
|
||||||
|
|
||||||
else
|
else
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( xPlotValues, depthPlotValues, isLogCurve );
|
m_plotCurve->setSamplesFromXValuesAndYValues( xPlotValues, depthPlotValues, useLogarithmicScale );
|
||||||
|
|
||||||
m_plotCurve->setLineSegmentStartStopIndices( curveData()->polylineStartStopIndices() );
|
m_plotCurve->setLineSegmentStartStopIndices( curveData()->polylineStartStopIndices() );
|
||||||
|
|
||||||
@ -539,25 +539,36 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
|
|||||||
|
|
||||||
if ( !values.empty() && !measuredDepthValues.empty() )
|
if ( !values.empty() && !measuredDepthValues.empty() )
|
||||||
{
|
{
|
||||||
|
bool useLogarithmicScale = false;
|
||||||
|
|
||||||
|
RimWellLogTrack* track = nullptr;
|
||||||
|
firstAncestorOfType( track );
|
||||||
|
if ( track )
|
||||||
|
{
|
||||||
|
useLogarithmicScale = track->isLogarithmicScale();
|
||||||
|
}
|
||||||
|
|
||||||
if ( tvDepthValues.empty() )
|
if ( tvDepthValues.empty() )
|
||||||
{
|
{
|
||||||
this->setValuesAndDepths( values,
|
this->setPropertyValuesAndDepths( values,
|
||||||
measuredDepthValues,
|
measuredDepthValues,
|
||||||
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
||||||
0.0,
|
0.0,
|
||||||
depthUnit,
|
depthUnit,
|
||||||
!performDataSmoothing,
|
!performDataSmoothing,
|
||||||
xUnits );
|
useLogarithmicScale,
|
||||||
|
xUnits );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->setValuesWithMdAndTVD( values,
|
this->setPropertyValuesWithMdAndTVD( values,
|
||||||
measuredDepthValues,
|
measuredDepthValues,
|
||||||
tvDepthValues,
|
tvDepthValues,
|
||||||
rkbDiff,
|
rkbDiff,
|
||||||
depthUnit,
|
depthUnit,
|
||||||
!performDataSmoothing,
|
!performDataSmoothing,
|
||||||
xUnits );
|
useLogarithmicScale,
|
||||||
|
xUnits );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,15 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB, tvdRkbValues ) );
|
validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB, tvdRkbValues ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setValuesAndDepths( values, validDepths, rkbDiff, wellLogFile->depthUnit(), false );
|
bool useLogarithmicScale = false;
|
||||||
|
RimWellLogTrack* track = nullptr;
|
||||||
|
firstAncestorOfType( track );
|
||||||
|
if ( track )
|
||||||
|
{
|
||||||
|
useLogarithmicScale = track->isLogarithmicScale();
|
||||||
|
}
|
||||||
|
|
||||||
|
this->setPropertyValuesAndDepths( values, validDepths, rkbDiff, wellLogFile->depthUnit(), false, useLogarithmicScale );
|
||||||
|
|
||||||
QString errMsg;
|
QString errMsg;
|
||||||
if ( wellLogPlot && !this->curveData()->availableDepthTypes().count( wellLogPlot->depthType() ) )
|
if ( wellLogPlot && !this->curveData()->availableDepthTypes().count( wellLogPlot->depthType() ) )
|
||||||
@ -188,8 +196,8 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
depthType = wellLogPlot->depthType();
|
depthType = wellLogPlot->depthType();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_plotCurve->setSamplesValues( this->curveData()->xPlotValues(),
|
m_plotCurve->setSamplesValues( this->curveData()->propertyValuesByIntervals(),
|
||||||
this->curveData()->depthPlotValues( depthType, displayUnit ) );
|
this->curveData()->depthValuesByIntervals( depthType, displayUnit ) );
|
||||||
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
||||||
|
|
||||||
if ( updateParentPlot )
|
if ( updateParentPlot )
|
||||||
|
@ -451,12 +451,14 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
rkbDiff = wellPath->wellPathGeometry()->rkbDiff();
|
rkbDiff = wellPath->wellPathGeometry()->rkbDiff();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setValuesWithMdAndTVD( values,
|
bool useLogarithmicScale = false;
|
||||||
measuredDepthVector,
|
this->setPropertyValuesWithMdAndTVD( values,
|
||||||
tvDepthVector,
|
measuredDepthVector,
|
||||||
rkbDiff,
|
tvDepthVector,
|
||||||
RiaDefines::fromEclipseUnit( unitSystem ),
|
rkbDiff,
|
||||||
false );
|
RiaDefines::fromEclipseUnit( unitSystem ),
|
||||||
|
false,
|
||||||
|
useLogarithmicScale );
|
||||||
|
|
||||||
RiaDefines::DepthUnitType displayUnit = RiaDefines::DepthUnitType::UNIT_METER;
|
RiaDefines::DepthUnitType displayUnit = RiaDefines::DepthUnitType::UNIT_METER;
|
||||||
if ( wellLogPlot )
|
if ( wellLogPlot )
|
||||||
@ -468,21 +470,22 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
{
|
{
|
||||||
m_plotCurve->setPerPointLabels( perPointLabels );
|
m_plotCurve->setPerPointLabels( perPointLabels );
|
||||||
|
|
||||||
auto xValues = this->curveData()->xPlotValues();
|
auto xValues = this->curveData()->propertyValuesByIntervals();
|
||||||
auto yValues = this->curveData()->depthPlotValues( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit );
|
auto yValues =
|
||||||
bool isLogCurve = false;
|
this->curveData()->depthValuesByIntervals( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit );
|
||||||
|
bool useLogarithmicScale = false;
|
||||||
|
|
||||||
if ( !errors.empty() )
|
if ( !errors.empty() )
|
||||||
{
|
{
|
||||||
this->setSamplesFromXYErrorValues( xValues,
|
this->setSamplesFromXYErrorValues( xValues,
|
||||||
yValues,
|
yValues,
|
||||||
errors,
|
errors,
|
||||||
isLogCurve,
|
useLogarithmicScale,
|
||||||
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_X_AXIS );
|
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_X_AXIS );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
|
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
|
|
||||||
RimWellLogTrack* wellLogTrack;
|
RimWellLogTrack* wellLogTrack;
|
||||||
@ -513,22 +516,22 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
{
|
{
|
||||||
m_plotCurve->setPerPointLabels( perPointLabels );
|
m_plotCurve->setPerPointLabels( perPointLabels );
|
||||||
|
|
||||||
auto xValues = this->curveData()->xPlotValues();
|
auto xValues = this->curveData()->propertyValuesByIntervals();
|
||||||
auto yValues =
|
auto yValues =
|
||||||
this->curveData()->depthPlotValues( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, displayUnit );
|
this->curveData()->depthValuesByIntervals( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, displayUnit );
|
||||||
bool isLogCurve = false;
|
bool useLogarithmicScale = false;
|
||||||
|
|
||||||
if ( !errors.empty() )
|
if ( !errors.empty() )
|
||||||
{
|
{
|
||||||
this->setSamplesFromXYErrorValues( xValues,
|
this->setSamplesFromXYErrorValues( xValues,
|
||||||
yValues,
|
yValues,
|
||||||
errors,
|
errors,
|
||||||
isLogCurve,
|
useLogarithmicScale,
|
||||||
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_X_AXIS );
|
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_X_AXIS );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
|
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,9 +119,9 @@ void AppEnum<RimWellLogTrack::TrajectoryType>::setUp()
|
|||||||
template <>
|
template <>
|
||||||
void AppEnum<RimWellLogTrack::FormationSource>::setUp()
|
void AppEnum<RimWellLogTrack::FormationSource>::setUp()
|
||||||
{
|
{
|
||||||
addItem( RimWellLogTrack::CASE, "CASE", "Case" );
|
addItem( RimWellLogTrack::FormationSource::CASE, "CASE", "Case" );
|
||||||
addItem( RimWellLogTrack::WELL_PICK_FILTER, "WELL_PICK_FILTER", "Well Picks for Well Path" );
|
addItem( RimWellLogTrack::FormationSource::WELL_PICK_FILTER, "WELL_PICK_FILTER", "Well Picks for Well Path" );
|
||||||
setDefault( RimWellLogTrack::CASE );
|
setDefault( RimWellLogTrack::FormationSource::CASE );
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -170,8 +170,8 @@ void AppEnum<RiuPlotAnnotationTool::RegionDisplay>::setUp()
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimWellLogTrack::RimWellLogTrack()
|
RimWellLogTrack::RimWellLogTrack()
|
||||||
: m_availableXRangeMin( RI_LOGPLOTTRACK_MINX_DEFAULT )
|
: m_availablePropertyValueRangeMin( RI_LOGPLOTTRACK_MINX_DEFAULT )
|
||||||
, m_availableXRangeMax( RI_LOGPLOTTRACK_MAXX_DEFAULT )
|
, m_availablePropertyValueRangeMax( RI_LOGPLOTTRACK_MAXX_DEFAULT )
|
||||||
, m_availableDepthRangeMin( RI_LOGPLOTTRACK_MINX_DEFAULT )
|
, m_availableDepthRangeMin( RI_LOGPLOTTRACK_MINX_DEFAULT )
|
||||||
, m_availableDepthRangeMax( RI_LOGPLOTTRACK_MAXX_DEFAULT )
|
, m_availableDepthRangeMax( RI_LOGPLOTTRACK_MAXX_DEFAULT )
|
||||||
|
|
||||||
@ -187,8 +187,8 @@ RimWellLogTrack::RimWellLogTrack()
|
|||||||
auto reorderability = caf::PdmFieldReorderCapability::addToField( &m_curves );
|
auto reorderability = caf::PdmFieldReorderCapability::addToField( &m_curves );
|
||||||
reorderability->orderChanged.connect( this, &RimWellLogTrack::curveDataChanged );
|
reorderability->orderChanged.connect( this, &RimWellLogTrack::curveDataChanged );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_visibleXRangeMin, "VisibleXRangeMin", RI_LOGPLOTTRACK_MINX_DEFAULT, "Min" );
|
CAF_PDM_InitField( &m_visiblePropertyValueRangeMin, "VisibleXRangeMin", RI_LOGPLOTTRACK_MINX_DEFAULT, "Min" );
|
||||||
CAF_PDM_InitField( &m_visibleXRangeMax, "VisibleXRangeMax", RI_LOGPLOTTRACK_MAXX_DEFAULT, "Max" );
|
CAF_PDM_InitField( &m_visiblePropertyValueRangeMax, "VisibleXRangeMax", RI_LOGPLOTTRACK_MAXX_DEFAULT, "Max" );
|
||||||
CAF_PDM_InitField( &m_visibleDepthRangeMin, "VisibleYRangeMin", RI_LOGPLOTTRACK_MINX_DEFAULT, "Min" );
|
CAF_PDM_InitField( &m_visibleDepthRangeMin, "VisibleYRangeMin", RI_LOGPLOTTRACK_MINX_DEFAULT, "Min" );
|
||||||
CAF_PDM_InitField( &m_visibleDepthRangeMax, "VisibleYRangeMax", RI_LOGPLOTTRACK_MAXX_DEFAULT, "Max" );
|
CAF_PDM_InitField( &m_visibleDepthRangeMax, "VisibleYRangeMax", RI_LOGPLOTTRACK_MAXX_DEFAULT, "Max" );
|
||||||
m_visibleDepthRangeMin.uiCapability()->setUiHidden( true );
|
m_visibleDepthRangeMin.uiCapability()->setUiHidden( true );
|
||||||
@ -196,12 +196,12 @@ RimWellLogTrack::RimWellLogTrack()
|
|||||||
m_visibleDepthRangeMax.uiCapability()->setUiHidden( true );
|
m_visibleDepthRangeMax.uiCapability()->setUiHidden( true );
|
||||||
m_visibleDepthRangeMax.xmlCapability()->disableIO();
|
m_visibleDepthRangeMax.xmlCapability()->disableIO();
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_isAutoScaleXEnabled, "AutoScaleX", true, "Auto Scale" );
|
CAF_PDM_InitField( &m_isAutoScalePropertyValuesEnabled, "AutoScaleX", true, "Auto Scale" );
|
||||||
m_isAutoScaleXEnabled.uiCapability()->setUiHidden( true );
|
m_isAutoScalePropertyValuesEnabled.uiCapability()->setUiHidden( true );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_isLogarithmicScaleEnabled, "LogarithmicScaleX", false, "Logarithmic Scale" );
|
CAF_PDM_InitField( &m_isLogarithmicScaleEnabled, "LogarithmicScaleX", false, "Logarithmic Scale" );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_xAxisGridVisibility, "ShowXGridLines", "Show Grid Lines" );
|
CAF_PDM_InitFieldNoDefault( &m_propertyValueAxisGridVisibility, "ShowXGridLines", "Show Grid Lines" );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_explicitTickIntervals, "ExplicitTickIntervals", false, "Manually Set Tick Intervals" );
|
CAF_PDM_InitField( &m_explicitTickIntervals, "ExplicitTickIntervals", false, "Manually Set Tick Intervals" );
|
||||||
CAF_PDM_InitField( &m_minAndMaxTicksOnly, "MinAndMaxTicksOnly", false, "Show Ticks at Min and Max" );
|
CAF_PDM_InitField( &m_minAndMaxTicksOnly, "MinAndMaxTicksOnly", false, "Show Ticks at Min and Max" );
|
||||||
@ -357,7 +357,7 @@ void RimWellLogTrack::detachAllPlotItems()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::calculateXZoomRange()
|
void RimWellLogTrack::calculatePropertyValueZoomRange()
|
||||||
{
|
{
|
||||||
updateStackedCurveData();
|
updateStackedCurveData();
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ void RimWellLogTrack::calculateXZoomRange()
|
|||||||
if ( curve->isCurveVisible() )
|
if ( curve->isCurveVisible() )
|
||||||
{
|
{
|
||||||
visibleCurves++;
|
visibleCurves++;
|
||||||
if ( curve->xValueRangeInData( &minCurveValue, &maxCurveValue ) )
|
if ( curve->propertyValueRangeInData( &minCurveValue, &maxCurveValue ) )
|
||||||
{
|
{
|
||||||
if ( minCurveValue < minValue )
|
if ( minCurveValue < minValue )
|
||||||
{
|
{
|
||||||
@ -399,14 +399,14 @@ void RimWellLogTrack::calculateXZoomRange()
|
|||||||
std::tie( minValue, maxValue ) = adjustXRange( minValue, maxValue, m_minorTickInterval() );
|
std::tie( minValue, maxValue ) = adjustXRange( minValue, maxValue, m_minorTickInterval() );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_availableXRangeMin = minValue;
|
m_availablePropertyValueRangeMin = minValue;
|
||||||
m_availableXRangeMax = maxValue;
|
m_availablePropertyValueRangeMax = maxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::calculateYZoomRange()
|
void RimWellLogTrack::calculateDepthZoomRange()
|
||||||
{
|
{
|
||||||
double minDepth = HUGE_VAL;
|
double minDepth = HUGE_VAL;
|
||||||
double maxDepth = -HUGE_VAL;
|
double maxDepth = -HUGE_VAL;
|
||||||
@ -416,7 +416,7 @@ void RimWellLogTrack::calculateYZoomRange()
|
|||||||
double minCurveDepth = HUGE_VAL;
|
double minCurveDepth = HUGE_VAL;
|
||||||
double maxCurveDepth = -HUGE_VAL;
|
double maxCurveDepth = -HUGE_VAL;
|
||||||
|
|
||||||
if ( curve->isCurveVisible() && curve->yValueRangeInData( &minCurveDepth, &maxCurveDepth ) )
|
if ( curve->isCurveVisible() && curve->depthValueRangeInData( &minCurveDepth, &maxCurveDepth ) )
|
||||||
{
|
{
|
||||||
if ( minCurveDepth < minDepth )
|
if ( minCurveDepth < minDepth )
|
||||||
{
|
{
|
||||||
@ -458,28 +458,28 @@ void RimWellLogTrack::calculateYZoomRange()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::updateXZoom()
|
void RimWellLogTrack::updatePropertyValueZoom()
|
||||||
{
|
{
|
||||||
if ( !m_plotWidget ) return;
|
if ( !m_plotWidget ) return;
|
||||||
|
|
||||||
calculateXZoomRange();
|
calculatePropertyValueZoomRange();
|
||||||
|
|
||||||
if ( m_isAutoScaleXEnabled )
|
if ( m_isAutoScalePropertyValuesEnabled )
|
||||||
{
|
{
|
||||||
m_visibleXRangeMin = m_availableXRangeMin;
|
m_visiblePropertyValueRangeMin = m_availablePropertyValueRangeMin;
|
||||||
m_visibleXRangeMax = m_availableXRangeMax;
|
m_visiblePropertyValueRangeMax = m_availablePropertyValueRangeMax;
|
||||||
|
|
||||||
if ( !visibleStackedCurves().empty() && !m_isLogarithmicScaleEnabled )
|
if ( !visibleStackedCurves().empty() && !m_isLogarithmicScaleEnabled )
|
||||||
{
|
{
|
||||||
// Try to ensure we include the base line whether the values are negative or positive.
|
// Try to ensure we include the base line whether the values are negative or positive.
|
||||||
m_visibleXRangeMin = std::min( m_visibleXRangeMin(), 0.0 );
|
m_visiblePropertyValueRangeMin = std::min( m_visiblePropertyValueRangeMin(), 0.0 );
|
||||||
m_visibleXRangeMax = std::max( m_visibleXRangeMax(), 0.0 );
|
m_visiblePropertyValueRangeMax = std::max( m_visiblePropertyValueRangeMax(), 0.0 );
|
||||||
}
|
}
|
||||||
computeAndSetXRangeMinForLogarithmicScale();
|
computeAndSetPropertyValueRangeMinForLogarithmicScale();
|
||||||
updateEditors();
|
updateEditors();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateXAxisAndGridTickIntervals();
|
updatePropertyValueAxisAndGridTickIntervals();
|
||||||
|
|
||||||
// Attribute range. Fixed range where well components are positioned [-1, 1].
|
// Attribute range. Fixed range where well components are positioned [-1, 1].
|
||||||
// Set an extended range here to allow for some label space.
|
// Set an extended range here to allow for some label space.
|
||||||
@ -501,7 +501,7 @@ void RimWellLogTrack::updateXZoom()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::updateYZoom()
|
void RimWellLogTrack::updateDepthZoom()
|
||||||
{
|
{
|
||||||
if ( !m_plotWidget ) return;
|
if ( !m_plotWidget ) return;
|
||||||
|
|
||||||
@ -549,32 +549,32 @@ void RimWellLogTrack::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
m_minorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
|
m_minorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
|
||||||
if ( !m_explicitTickIntervals() )
|
if ( !m_explicitTickIntervals() )
|
||||||
{
|
{
|
||||||
updateXAxisAndGridTickIntervals();
|
updatePropertyValueAxisAndGridTickIntervals();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_xAxisGridVisibility || changedField == &m_majorTickInterval ||
|
else if ( changedField == &m_propertyValueAxisGridVisibility || changedField == &m_majorTickInterval ||
|
||||||
changedField == &m_minorTickInterval || changedField == &m_minAndMaxTicksOnly )
|
changedField == &m_minorTickInterval || changedField == &m_minAndMaxTicksOnly )
|
||||||
{
|
{
|
||||||
updateXAxisAndGridTickIntervals();
|
updatePropertyValueAxisAndGridTickIntervals();
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_visibleXRangeMin || changedField == &m_visibleXRangeMax )
|
else if ( changedField == &m_visiblePropertyValueRangeMin || changedField == &m_visiblePropertyValueRangeMax )
|
||||||
{
|
{
|
||||||
bool emptyRange = isEmptyVisibleXRange();
|
bool emptyRange = isEmptyVisibleXRange();
|
||||||
m_explicitTickIntervals.uiCapability()->setUiReadOnly( emptyRange );
|
m_explicitTickIntervals.uiCapability()->setUiReadOnly( emptyRange );
|
||||||
m_xAxisGridVisibility.uiCapability()->setUiReadOnly( emptyRange );
|
m_propertyValueAxisGridVisibility.uiCapability()->setUiReadOnly( emptyRange );
|
||||||
|
|
||||||
m_isAutoScaleXEnabled = false;
|
m_isAutoScalePropertyValuesEnabled = false;
|
||||||
|
|
||||||
updateXZoom();
|
updatePropertyValueZoom();
|
||||||
m_plotWidget->scheduleReplot();
|
m_plotWidget->scheduleReplot();
|
||||||
|
|
||||||
updateEditors();
|
updateEditors();
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_isAutoScaleXEnabled )
|
else if ( changedField == &m_isAutoScalePropertyValuesEnabled )
|
||||||
{
|
{
|
||||||
if ( m_isAutoScaleXEnabled() )
|
if ( m_isAutoScalePropertyValuesEnabled() )
|
||||||
{
|
{
|
||||||
updateXZoom();
|
updatePropertyValueZoom();
|
||||||
m_plotWidget->scheduleReplot();
|
m_plotWidget->scheduleReplot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,14 +587,14 @@ void RimWellLogTrack::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
}
|
}
|
||||||
m_explicitTickIntervals.uiCapability()->setUiHidden( m_isLogarithmicScaleEnabled() );
|
m_explicitTickIntervals.uiCapability()->setUiHidden( m_isLogarithmicScaleEnabled() );
|
||||||
|
|
||||||
updateXZoom();
|
updatePropertyValueZoom();
|
||||||
loadDataAndUpdate();
|
loadDataAndUpdate();
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_regionAnnotationType || changedField == &m_regionAnnotationDisplay ||
|
else if ( changedField == &m_regionAnnotationType || changedField == &m_regionAnnotationDisplay ||
|
||||||
changedField == &m_formationSource || changedField == &m_colorShadingTransparency ||
|
changedField == &m_formationSource || changedField == &m_colorShadingTransparency ||
|
||||||
changedField == &m_colorShadingLegend )
|
changedField == &m_colorShadingLegend )
|
||||||
{
|
{
|
||||||
if ( changedField == &m_formationSource && m_formationSource == WELL_PICK_FILTER )
|
if ( changedField == &m_formationSource && m_formationSource == FormationSource::WELL_PICK_FILTER )
|
||||||
{
|
{
|
||||||
std::vector<RimWellPath*> wellPaths;
|
std::vector<RimWellPath*> wellPaths;
|
||||||
RimTools::wellPathWithFormations( &wellPaths );
|
RimTools::wellPathWithFormations( &wellPaths );
|
||||||
@ -749,15 +749,15 @@ void RimWellLogTrack::curveStackingChanged( const caf::SignalEmitter* emitter, b
|
|||||||
{
|
{
|
||||||
updateStackedCurveData();
|
updateStackedCurveData();
|
||||||
|
|
||||||
m_isAutoScaleXEnabled = true;
|
m_isAutoScalePropertyValuesEnabled = true;
|
||||||
updateXZoom();
|
updatePropertyValueZoom();
|
||||||
m_plotWidget->scheduleReplot();
|
m_plotWidget->scheduleReplot();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::updateXAxisAndGridTickIntervals()
|
void RimWellLogTrack::updatePropertyValueAxisAndGridTickIntervals()
|
||||||
{
|
{
|
||||||
if ( !m_plotWidget ) return;
|
if ( !m_plotWidget ) return;
|
||||||
|
|
||||||
@ -788,16 +788,16 @@ void RimWellLogTrack::updateXAxisAndGridTickIntervals()
|
|||||||
return std::ceil( value * factor ) / factor;
|
return std::ceil( value * factor ) / factor;
|
||||||
};
|
};
|
||||||
|
|
||||||
auto div = QwtScaleDiv( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
auto div = QwtScaleDiv( m_visiblePropertyValueRangeMin(), m_visiblePropertyValueRangeMax() );
|
||||||
|
|
||||||
QList<double> majorTicks;
|
QList<double> majorTicks;
|
||||||
|
|
||||||
auto min = roundToDigits( m_visibleXRangeMin(), 2, false );
|
auto min = roundToDigits( m_visiblePropertyValueRangeMin(), 2, false );
|
||||||
auto max = roundToDigits( m_visibleXRangeMax(), 2, true );
|
auto max = roundToDigits( m_visiblePropertyValueRangeMax(), 2, true );
|
||||||
if ( min == max )
|
if ( min == max )
|
||||||
{
|
{
|
||||||
min = roundToDigits( m_visibleXRangeMin(), 3, false );
|
min = roundToDigits( m_visiblePropertyValueRangeMin(), 3, false );
|
||||||
max = roundToDigits( m_visibleXRangeMax(), 3, true );
|
max = roundToDigits( m_visiblePropertyValueRangeMax(), 3, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
majorTicks.push_back( min );
|
majorTicks.push_back( min );
|
||||||
@ -812,20 +812,20 @@ void RimWellLogTrack::updateXAxisAndGridTickIntervals()
|
|||||||
m_plotWidget->setMajorAndMinorTickIntervals( getValueAxis(),
|
m_plotWidget->setMajorAndMinorTickIntervals( getValueAxis(),
|
||||||
m_majorTickInterval(),
|
m_majorTickInterval(),
|
||||||
m_minorTickInterval(),
|
m_minorTickInterval(),
|
||||||
m_visibleXRangeMin(),
|
m_visiblePropertyValueRangeMin(),
|
||||||
m_visibleXRangeMax() );
|
m_visiblePropertyValueRangeMax() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int majorTickIntervals = 5;
|
int majorTickIntervals = 5;
|
||||||
int minorTickIntervals = 10;
|
int minorTickIntervals = 10;
|
||||||
m_plotWidget->setAutoTickIntervalCounts( getValueAxis(), majorTickIntervals, minorTickIntervals );
|
m_plotWidget->setAutoTickIntervalCounts( getValueAxis(), majorTickIntervals, minorTickIntervals );
|
||||||
m_plotWidget->setAxisRange( getValueAxis(), m_visibleXRangeMin, m_visibleXRangeMax );
|
m_plotWidget->setAxisRange( getValueAxis(), m_visiblePropertyValueRangeMin, m_visiblePropertyValueRangeMax );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_plotWidget->enableGridLines( getValueAxis(),
|
m_plotWidget->enableGridLines( getValueAxis(),
|
||||||
m_xAxisGridVisibility() & RimWellLogPlot::AXIS_GRID_MAJOR,
|
m_propertyValueAxisGridVisibility() & RimWellLogPlot::AXIS_GRID_MAJOR,
|
||||||
m_xAxisGridVisibility() & RimWellLogPlot::AXIS_GRID_MINOR );
|
m_propertyValueAxisGridVisibility() & RimWellLogPlot::AXIS_GRID_MINOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
RimDepthTrackPlot* wellLogPlot = nullptr;
|
RimDepthTrackPlot* wellLogPlot = nullptr;
|
||||||
@ -887,10 +887,10 @@ QString RimWellLogTrack::asciiDataForPlotExport() const
|
|||||||
|
|
||||||
if ( curveNames.size() == 1 )
|
if ( curveNames.size() == 1 )
|
||||||
{
|
{
|
||||||
curveDepths = curveData->depthPlotValues( depthType, depthUnit );
|
curveDepths = curveData->depthValuesByIntervals( depthType, depthUnit );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double> xPlotValues = curveData->xPlotValues();
|
std::vector<double> xPlotValues = curveData->propertyValuesByIntervals();
|
||||||
if ( xPlotValues.empty() )
|
if ( xPlotValues.empty() )
|
||||||
{
|
{
|
||||||
curveNames.pop_back();
|
curveNames.pop_back();
|
||||||
@ -907,7 +907,7 @@ QString RimWellLogTrack::asciiDataForPlotExport() const
|
|||||||
foundNonMatchingDepths = true;
|
foundNonMatchingDepths = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double> depths = curveData->depthPlotValues( depthType, depthUnit );
|
std::vector<double> depths = curveData->depthValuesByIntervals( depthType, depthUnit );
|
||||||
curveMerger.addCurveData( depths, xPlotValues );
|
curveMerger.addCurveData( depths, xPlotValues );
|
||||||
|
|
||||||
curvesPlotXValues.push_back( xPlotValues );
|
curvesPlotXValues.push_back( xPlotValues );
|
||||||
@ -1011,10 +1011,10 @@ void RimWellLogTrack::updateZoomFromParentPlot()
|
|||||||
auto [xIntervalMin, xIntervalMax] = m_plotWidget->axisRange( getValueAxis() );
|
auto [xIntervalMin, xIntervalMax] = m_plotWidget->axisRange( getValueAxis() );
|
||||||
auto [depthIntervalMin, depthIntervalMax] = m_plotWidget->axisRange( getDepthAxis() );
|
auto [depthIntervalMin, depthIntervalMax] = m_plotWidget->axisRange( getDepthAxis() );
|
||||||
|
|
||||||
m_visibleXRangeMin = xIntervalMin;
|
m_visiblePropertyValueRangeMin = xIntervalMin;
|
||||||
m_visibleXRangeMax = xIntervalMax;
|
m_visiblePropertyValueRangeMax = xIntervalMax;
|
||||||
m_visibleDepthRangeMin = depthIntervalMin;
|
m_visibleDepthRangeMin = depthIntervalMin;
|
||||||
m_visibleDepthRangeMax = depthIntervalMax;
|
m_visibleDepthRangeMax = depthIntervalMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1037,7 +1037,7 @@ void RimWellLogTrack::onAxisSelected( int axis, bool toggle )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::updateAxes()
|
void RimWellLogTrack::updateAxes()
|
||||||
{
|
{
|
||||||
updateXZoom();
|
updatePropertyValueZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1172,11 +1172,11 @@ void RimWellLogTrack::deleteAllCurves()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::availableXAxisRange( double* minX, double* maxX )
|
void RimWellLogTrack::availablePropertyValueRange( double* minX, double* maxX )
|
||||||
{
|
{
|
||||||
calculateXZoomRange();
|
calculatePropertyValueZoomRange();
|
||||||
*minX = m_availableXRangeMin;
|
*minX = m_availablePropertyValueRangeMin;
|
||||||
*maxX = m_availableXRangeMax;
|
*maxX = m_availablePropertyValueRangeMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1184,7 +1184,7 @@ void RimWellLogTrack::availableXAxisRange( double* minX, double* maxX )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::availableDepthRange( double* minimumDepth, double* maximumDepth )
|
void RimWellLogTrack::availableDepthRange( double* minimumDepth, double* maximumDepth )
|
||||||
{
|
{
|
||||||
calculateYZoomRange();
|
calculateDepthZoomRange();
|
||||||
*minimumDepth = m_availableDepthRangeMin;
|
*minimumDepth = m_availableDepthRangeMin;
|
||||||
*maximumDepth = m_availableDepthRangeMax;
|
*maximumDepth = m_availableDepthRangeMax;
|
||||||
}
|
}
|
||||||
@ -1192,11 +1192,11 @@ void RimWellLogTrack::availableDepthRange( double* minimumDepth, double* maximum
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::visibleXAxisRange( double* minX, double* maxX )
|
void RimWellLogTrack::visiblePropertyValueRange( double* minX, double* maxX )
|
||||||
{
|
{
|
||||||
CAF_ASSERT( minX && maxX );
|
CAF_ASSERT( minX && maxX );
|
||||||
*minX = m_visibleXRangeMin;
|
*minX = m_visiblePropertyValueRangeMin;
|
||||||
*maxX = m_visibleXRangeMax;
|
*maxX = m_visiblePropertyValueRangeMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1214,8 +1214,8 @@ void RimWellLogTrack::visibleDepthRange( double* minDepth, double* maxDepth )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimWellLogTrack::isEmptyVisibleXRange() const
|
bool RimWellLogTrack::isEmptyVisibleXRange() const
|
||||||
{
|
{
|
||||||
return std::abs( m_visibleXRangeMax() - m_visibleXRangeMin ) <
|
return std::abs( m_visiblePropertyValueRangeMax() - m_visiblePropertyValueRangeMin ) <
|
||||||
1.0e-6 * std::max( 1.0, std::max( m_visibleXRangeMax(), m_visibleXRangeMin() ) );
|
1.0e-6 * std::max( 1.0, std::max( m_visiblePropertyValueRangeMax(), m_visiblePropertyValueRangeMin() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1228,7 +1228,7 @@ void RimWellLogTrack::onLoadDataAndUpdate()
|
|||||||
|
|
||||||
if ( wellLogPlot && m_plotWidget )
|
if ( wellLogPlot && m_plotWidget )
|
||||||
{
|
{
|
||||||
m_plotWidget->setAxisTitleText( getValueAxis(), m_xAxisTitle );
|
m_plotWidget->setAxisTitleText( getValueAxis(), m_propertyValueAxisTitle );
|
||||||
m_plotWidget->setAxisTitleText( getDepthAxis(), wellLogPlot->depthAxisTitle() );
|
m_plotWidget->setAxisTitleText( getDepthAxis(), wellLogPlot->depthAxisTitle() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1259,16 +1259,16 @@ void RimWellLogTrack::onLoadDataAndUpdate()
|
|||||||
|
|
||||||
this->updateAxisScaleEngine();
|
this->updateAxisScaleEngine();
|
||||||
this->updateRegionAnnotationsOnPlot();
|
this->updateRegionAnnotationsOnPlot();
|
||||||
this->updateXZoom();
|
this->updatePropertyValueZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->updateXAxisAndGridTickIntervals();
|
this->updatePropertyValueAxisAndGridTickIntervals();
|
||||||
m_majorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
|
m_majorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
|
||||||
m_minorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
|
m_minorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
|
||||||
|
|
||||||
bool emptyRange = isEmptyVisibleXRange();
|
bool emptyRange = isEmptyVisibleXRange();
|
||||||
m_explicitTickIntervals.uiCapability()->setUiReadOnly( emptyRange );
|
m_explicitTickIntervals.uiCapability()->setUiReadOnly( emptyRange );
|
||||||
m_xAxisGridVisibility.uiCapability()->setUiReadOnly( emptyRange );
|
m_propertyValueAxisGridVisibility.uiCapability()->setUiReadOnly( emptyRange );
|
||||||
|
|
||||||
updateLegend();
|
updateLegend();
|
||||||
}
|
}
|
||||||
@ -1327,15 +1327,15 @@ void RimWellLogTrack::setAndUpdateSimWellFormationNamesData( RimCase* rimCase, c
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::setAutoScaleXEnabled( bool enabled )
|
void RimWellLogTrack::setAutoScalePropertyValuesEnabled( bool enabled )
|
||||||
{
|
{
|
||||||
m_isAutoScaleXEnabled = enabled;
|
m_isAutoScalePropertyValuesEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::setAutoScaleYEnabled( bool enabled )
|
void RimWellLogTrack::setAutoScaleDepthValuesEnabled( bool enabled )
|
||||||
{
|
{
|
||||||
if ( enabled )
|
if ( enabled )
|
||||||
{
|
{
|
||||||
@ -1347,41 +1347,42 @@ void RimWellLogTrack::setAutoScaleYEnabled( bool enabled )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::setAutoScaleXIfNecessary()
|
void RimWellLogTrack::setAutoScalePropertyValuesIfNecessary()
|
||||||
{
|
{
|
||||||
// Avoid resetting if visible range has set to empty by user
|
// Avoid resetting if visible range has set to empty by user
|
||||||
bool emptyRange = isEmptyVisibleXRange();
|
bool emptyRange = isEmptyVisibleXRange();
|
||||||
if ( !m_isAutoScaleXEnabled && emptyRange ) return;
|
if ( !m_isAutoScalePropertyValuesEnabled && emptyRange ) return;
|
||||||
|
|
||||||
const double eps = 1.0e-8;
|
const double eps = 1.0e-8;
|
||||||
calculateXZoomRange();
|
calculatePropertyValueZoomRange();
|
||||||
|
|
||||||
double maxRange = std::max( m_visibleXRangeMax - m_visibleXRangeMin, m_availableXRangeMax - m_availableXRangeMin );
|
double maxRange = std::max( m_visiblePropertyValueRangeMax - m_visiblePropertyValueRangeMin,
|
||||||
|
m_availablePropertyValueRangeMax - m_availablePropertyValueRangeMin );
|
||||||
|
|
||||||
double maxLow = std::max( m_visibleXRangeMin(), m_availableXRangeMin );
|
double maxLow = std::max( m_visiblePropertyValueRangeMin(), m_availablePropertyValueRangeMin );
|
||||||
double minHigh = std::min( m_visibleXRangeMax(), m_availableXRangeMax );
|
double minHigh = std::min( m_visiblePropertyValueRangeMax(), m_availablePropertyValueRangeMax );
|
||||||
double overlap = minHigh - maxLow;
|
double overlap = minHigh - maxLow;
|
||||||
|
|
||||||
if ( maxRange < eps || overlap < eps * maxRange )
|
if ( maxRange < eps || overlap < eps * maxRange )
|
||||||
{
|
{
|
||||||
setAutoScaleXEnabled( true );
|
setAutoScalePropertyValuesEnabled( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
updateXZoom();
|
updatePropertyValueZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::setXAxisTitle( const QString& text )
|
void RimWellLogTrack::setPropertyValueAxisTitle( const QString& text )
|
||||||
{
|
{
|
||||||
m_xAxisTitle = text;
|
m_propertyValueAxisTitle = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RimWellLogTrack::yAxisTitle() const
|
QString RimWellLogTrack::depthAxisTitle() const
|
||||||
{
|
{
|
||||||
RimDepthTrackPlot* parent;
|
RimDepthTrackPlot* parent;
|
||||||
this->firstAncestorOrThisOfType( parent );
|
this->firstAncestorOrThisOfType( parent );
|
||||||
@ -1581,17 +1582,17 @@ void RimWellLogTrack::updateEditors()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::setVisibleXRange( double minValue, double maxValue )
|
void RimWellLogTrack::setVisiblePropertyValueRange( double minValue, double maxValue )
|
||||||
{
|
{
|
||||||
this->setAutoScaleXEnabled( false );
|
this->setAutoScalePropertyValuesEnabled( false );
|
||||||
m_visibleXRangeMin = minValue;
|
m_visiblePropertyValueRangeMin = minValue;
|
||||||
m_visibleXRangeMax = maxValue;
|
m_visiblePropertyValueRangeMax = maxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::setVisibleYRange( double minValue, double maxValue )
|
void RimWellLogTrack::setVisibleDepthRange( double minValue, double maxValue )
|
||||||
{
|
{
|
||||||
m_visibleDepthRangeMin = minValue;
|
m_visibleDepthRangeMin = minValue;
|
||||||
m_visibleDepthRangeMax = maxValue;
|
m_visibleDepthRangeMax = maxValue;
|
||||||
@ -1602,8 +1603,8 @@ void RimWellLogTrack::setVisibleYRange( double minValue, double maxValue )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::updateZoomInParentPlot()
|
void RimWellLogTrack::updateZoomInParentPlot()
|
||||||
{
|
{
|
||||||
updateXZoom();
|
updatePropertyValueZoom();
|
||||||
updateYZoom();
|
updateDepthZoom();
|
||||||
m_plotWidget->scheduleReplot();
|
m_plotWidget->scheduleReplot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1628,9 +1629,9 @@ void RimWellLogTrack::setMinAndMaxTicksOnly( bool enable )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::setXAxisGridVisibility( RimWellLogPlot::AxisGridVisibility gridLines )
|
void RimWellLogTrack::setPropertyValueAxisGridVisibility( RimWellLogPlot::AxisGridVisibility gridLines )
|
||||||
{
|
{
|
||||||
m_xAxisGridVisibility = gridLines;
|
m_propertyValueAxisGridVisibility = gridLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1799,8 +1800,8 @@ QImage RimWellLogTrack::snapshotWindowContent()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::zoomAll()
|
void RimWellLogTrack::zoomAll()
|
||||||
{
|
{
|
||||||
setAutoScaleXEnabled( true );
|
setAutoScalePropertyValuesEnabled( true );
|
||||||
setAutoScaleYEnabled( true );
|
setAutoScaleDepthValuesEnabled( true );
|
||||||
updateZoomInParentPlot();
|
updateZoomInParentPlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1852,10 +1853,10 @@ void RimWellLogTrack::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_formationSource = CASE;
|
m_formationSource = FormationSource::CASE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_formationSource() == CASE )
|
if ( m_formationSource() == FormationSource::CASE )
|
||||||
{
|
{
|
||||||
annotationGroup->add( &m_formationCase );
|
annotationGroup->add( &m_formationCase );
|
||||||
|
|
||||||
@ -1879,7 +1880,7 @@ void RimWellLogTrack::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering
|
|||||||
m_formationBranchIndex );
|
m_formationBranchIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( m_formationSource() == WELL_PICK_FILTER )
|
else if ( m_formationSource() == FormationSource::WELL_PICK_FILTER )
|
||||||
{
|
{
|
||||||
annotationGroup->add( &m_formationWellPathForSourceWellPath );
|
annotationGroup->add( &m_formationWellPathForSourceWellPath );
|
||||||
if ( m_formationWellPathForSourceWellPath() )
|
if ( m_formationWellPathForSourceWellPath() )
|
||||||
@ -1922,9 +1923,9 @@ void RimWellLogTrack::initAfterRead()
|
|||||||
m_resultDefinition->setEclipseCase( dynamic_cast<RimEclipseCase*>( eclipseCase ) );
|
m_resultDefinition->setEclipseCase( dynamic_cast<RimEclipseCase*>( eclipseCase ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_xAxisGridVisibility() == RimWellLogPlot::AXIS_GRID_MINOR )
|
if ( m_propertyValueAxisGridVisibility() == RimWellLogPlot::AXIS_GRID_MINOR )
|
||||||
{
|
{
|
||||||
m_xAxisGridVisibility = RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR;
|
m_propertyValueAxisGridVisibility = RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( auto curve : m_curves )
|
for ( auto curve : m_curves )
|
||||||
@ -2115,9 +2116,9 @@ void RimWellLogTrack::connectCurveSignals( RimWellLogCurve* curve )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::computeAndSetXRangeMinForLogarithmicScale()
|
void RimWellLogTrack::computeAndSetPropertyValueRangeMinForLogarithmicScale()
|
||||||
{
|
{
|
||||||
if ( m_isAutoScaleXEnabled && m_isLogarithmicScaleEnabled )
|
if ( m_isAutoScalePropertyValuesEnabled && m_isLogarithmicScaleEnabled )
|
||||||
{
|
{
|
||||||
double pos = HUGE_VAL;
|
double pos = HUGE_VAL;
|
||||||
double neg = -HUGE_VAL;
|
double neg = -HUGE_VAL;
|
||||||
@ -2126,13 +2127,15 @@ void RimWellLogTrack::computeAndSetXRangeMinForLogarithmicScale()
|
|||||||
{
|
{
|
||||||
if ( m_curves[cIdx]->isCurveVisible() && m_curves[cIdx]->curveData() )
|
if ( m_curves[cIdx]->isCurveVisible() && m_curves[cIdx]->curveData() )
|
||||||
{
|
{
|
||||||
RigStatisticsCalculator::posNegClosestToZero( m_curves[cIdx]->curveData()->xPlotValues(), pos, neg );
|
RigStatisticsCalculator::posNegClosestToZero( m_curves[cIdx]->curveData()->propertyValuesByIntervals(),
|
||||||
|
pos,
|
||||||
|
neg );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pos != HUGE_VAL )
|
if ( pos != HUGE_VAL )
|
||||||
{
|
{
|
||||||
m_visibleXRangeMin = pos;
|
m_visiblePropertyValueRangeMin = pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2145,7 +2148,7 @@ void RimWellLogTrack::setLogarithmicScale( bool enable )
|
|||||||
m_isLogarithmicScaleEnabled = enable;
|
m_isLogarithmicScaleEnabled = enable;
|
||||||
|
|
||||||
updateAxisScaleEngine();
|
updateAxisScaleEngine();
|
||||||
computeAndSetXRangeMinForLogarithmicScale();
|
computeAndSetPropertyValueRangeMinForLogarithmicScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -2217,11 +2220,11 @@ void RimWellLogTrack::uiOrderingForRftPltFormations( caf::PdmUiOrdering& uiOrder
|
|||||||
formationGroup->add( &m_regionAnnotationType );
|
formationGroup->add( &m_regionAnnotationType );
|
||||||
formationGroup->add( &m_regionAnnotationDisplay );
|
formationGroup->add( &m_regionAnnotationDisplay );
|
||||||
formationGroup->add( &m_formationSource );
|
formationGroup->add( &m_formationSource );
|
||||||
if ( m_formationSource == CASE )
|
if ( m_formationSource == FormationSource::CASE )
|
||||||
{
|
{
|
||||||
formationGroup->add( &m_formationCase );
|
formationGroup->add( &m_formationCase );
|
||||||
}
|
}
|
||||||
if ( m_formationSource == WELL_PICK_FILTER )
|
if ( m_formationSource == FormationSource::WELL_PICK_FILTER )
|
||||||
{
|
{
|
||||||
if ( m_formationWellPathForSourceWellPath() && m_formationWellPathForSourceWellPath()->hasFormations() )
|
if ( m_formationWellPathForSourceWellPath() && m_formationWellPathForSourceWellPath()->hasFormations() )
|
||||||
{
|
{
|
||||||
@ -2238,9 +2241,9 @@ void RimWellLogTrack::uiOrderingForXAxisSettings( caf::PdmUiOrdering& uiOrdering
|
|||||||
{
|
{
|
||||||
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup( "X Axis Settings" );
|
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup( "X Axis Settings" );
|
||||||
gridGroup->add( &m_isLogarithmicScaleEnabled );
|
gridGroup->add( &m_isLogarithmicScaleEnabled );
|
||||||
gridGroup->add( &m_visibleXRangeMin );
|
gridGroup->add( &m_visiblePropertyValueRangeMin );
|
||||||
gridGroup->add( &m_visibleXRangeMax );
|
gridGroup->add( &m_visiblePropertyValueRangeMax );
|
||||||
gridGroup->add( &m_xAxisGridVisibility );
|
gridGroup->add( &m_propertyValueAxisGridVisibility );
|
||||||
gridGroup->add( &m_minAndMaxTicksOnly );
|
gridGroup->add( &m_minAndMaxTicksOnly );
|
||||||
|
|
||||||
// TODO Revisit if these settings are required
|
// TODO Revisit if these settings are required
|
||||||
@ -2490,7 +2493,7 @@ void RimWellLogTrack::updateStackedCurveData()
|
|||||||
for ( auto curve : stackedCurvesInGroup )
|
for ( auto curve : stackedCurvesInGroup )
|
||||||
{
|
{
|
||||||
auto interpolatedCurveValues = curve->curveData()->calculateResampledCurveData( depthType, allDepthValues );
|
auto interpolatedCurveValues = curve->curveData()->calculateResampledCurveData( depthType, allDepthValues );
|
||||||
auto xValues = interpolatedCurveValues->xValues();
|
auto xValues = interpolatedCurveValues->propertyValues();
|
||||||
for ( size_t i = 0; i < xValues.size(); ++i )
|
for ( size_t i = 0; i < xValues.size(); ++i )
|
||||||
{
|
{
|
||||||
if ( xValues[i] != HUGE_VAL )
|
if ( xValues[i] != HUGE_VAL )
|
||||||
@ -2500,8 +2503,15 @@ void RimWellLogTrack::updateStackedCurveData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
RigWellLogCurveData tempCurveData;
|
RigWellLogCurveData tempCurveData;
|
||||||
tempCurveData.setValuesAndDepths( allStackedValues, allDepthValues, depthType, 0.0, displayUnit, false );
|
tempCurveData.setValuesAndDepths( allStackedValues,
|
||||||
auto plotDepthValues = tempCurveData.depthPlotValues( depthType, displayUnit );
|
allDepthValues,
|
||||||
|
depthType,
|
||||||
|
0.0,
|
||||||
|
displayUnit,
|
||||||
|
false,
|
||||||
|
m_isLogarithmicScaleEnabled );
|
||||||
|
|
||||||
|
auto plotDepthValues = tempCurveData.depthValuesByIntervals( depthType, displayUnit );
|
||||||
auto polyLineStartStopIndices = tempCurveData.polylineStartStopIndices();
|
auto polyLineStartStopIndices = tempCurveData.polylineStartStopIndices();
|
||||||
|
|
||||||
curve->setOverrideCurveData( allStackedValues, plotDepthValues, polyLineStartStopIndices );
|
curve->setOverrideCurveData( allStackedValues, plotDepthValues, polyLineStartStopIndices );
|
||||||
@ -2583,7 +2593,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
RiaDefines::DepthUnitType fromDepthUnit = plot->caseDepthUnit();
|
RiaDefines::DepthUnitType fromDepthUnit = plot->caseDepthUnit();
|
||||||
RiaDefines::DepthUnitType toDepthUnit = plot->depthUnit();
|
RiaDefines::DepthUnitType toDepthUnit = plot->depthUnit();
|
||||||
|
|
||||||
if ( m_formationSource() == WELL_PICK_FILTER )
|
if ( m_formationSource() == FormationSource::WELL_PICK_FILTER )
|
||||||
{
|
{
|
||||||
if ( m_formationWellPathForSourceWellPath == nullptr ) return;
|
if ( m_formationWellPathForSourceWellPath == nullptr ) return;
|
||||||
|
|
||||||
@ -2676,7 +2686,8 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
if ( geoMechWellLogExtractor )
|
if ( geoMechWellLogExtractor )
|
||||||
{
|
{
|
||||||
// Attach water and rock base formations
|
// Attach water and rock base formations
|
||||||
const std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
const std::pair<double, double> xRange =
|
||||||
|
std::make_pair( m_visiblePropertyValueRangeMin(), m_visiblePropertyValueRangeMax() );
|
||||||
|
|
||||||
const caf::ColorTable waterAndRockColors = RiaColorTables::waterAndRockPaletteColors();
|
const caf::ColorTable waterAndRockColors = RiaColorTables::waterAndRockPaletteColors();
|
||||||
const std::vector<std::pair<double, double>> waterAndRockIntervals =
|
const std::vector<std::pair<double, double>> waterAndRockIntervals =
|
||||||
@ -2697,7 +2708,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
{ Qt::SolidPattern, Qt::Dense6Pattern } );
|
{ Qt::SolidPattern, Qt::Dense6Pattern } );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_formationSource == CASE && m_plotWidget )
|
if ( m_formationSource == FormationSource::CASE && m_plotWidget )
|
||||||
{
|
{
|
||||||
if ( ( m_formationSimWellName == QString( "None" ) && m_formationWellPathForSourceCase == nullptr ) ||
|
if ( ( m_formationSimWellName == QString( "None" ) && m_formationWellPathForSourceCase == nullptr ) ||
|
||||||
m_formationCase == nullptr )
|
m_formationCase == nullptr )
|
||||||
@ -2724,7 +2735,8 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
&formationNamesToPlot,
|
&formationNamesToPlot,
|
||||||
&yValues );
|
&yValues );
|
||||||
|
|
||||||
const std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
const std::pair<double, double> xRange =
|
||||||
|
std::make_pair( m_visiblePropertyValueRangeMin(), m_visiblePropertyValueRangeMax() );
|
||||||
|
|
||||||
std::vector<std::pair<double, double>> convertedYValues =
|
std::vector<std::pair<double, double>> convertedYValues =
|
||||||
RiaWellLogUnitTools<double>::convertDepths( yValues, fromDepthUnit, toDepthUnit );
|
RiaWellLogUnitTools<double>::convertDepths( yValues, fromDepthUnit, toDepthUnit );
|
||||||
@ -2785,9 +2797,10 @@ void RimWellLogTrack::updateResultPropertyNamesOnPlot()
|
|||||||
CurveSamplingPointData curveData = RimWellLogTrack::curveSamplingPointData( eclWellLogExtractor, resultAccessor.p() );
|
CurveSamplingPointData curveData = RimWellLogTrack::curveSamplingPointData( eclWellLogExtractor, resultAccessor.p() );
|
||||||
|
|
||||||
// Attach water and rock base formations
|
// Attach water and rock base formations
|
||||||
const std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
const std::pair<double, double> xRange =
|
||||||
|
std::make_pair( m_visiblePropertyValueRangeMin(), m_visiblePropertyValueRangeMax() );
|
||||||
|
|
||||||
if ( m_formationSource == CASE )
|
if ( m_formationSource == FormationSource::CASE )
|
||||||
{
|
{
|
||||||
if ( ( m_formationSimWellName == QString( "None" ) && m_formationWellPathForSourceCase == nullptr ) ||
|
if ( ( m_formationSimWellName == QString( "None" ) && m_formationWellPathForSourceCase == nullptr ) ||
|
||||||
m_formationCase == nullptr )
|
m_formationCase == nullptr )
|
||||||
@ -2896,7 +2909,8 @@ void RimWellLogTrack::updateCurveDataRegionsOnPlot()
|
|||||||
RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, dynamic_cast<RimGeoMechCase*>( geoMechCase ) );
|
RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, dynamic_cast<RimGeoMechCase*>( geoMechCase ) );
|
||||||
if ( !geoMechWellLogExtractor ) return;
|
if ( !geoMechWellLogExtractor ) return;
|
||||||
|
|
||||||
std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
|
std::pair<double, double> xRange =
|
||||||
|
std::make_pair( m_visiblePropertyValueRangeMin(), m_visiblePropertyValueRangeMax() );
|
||||||
|
|
||||||
CurveSamplingPointData curveData;
|
CurveSamplingPointData curveData;
|
||||||
curveData.md = geoMechWellLogExtractor->cellIntersectionMDs();
|
curveData.md = geoMechWellLogExtractor->cellIntersectionMDs();
|
||||||
@ -3098,7 +3112,7 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
|||||||
attributePlotObject->setParentPlotNoReplot( m_plotWidget->qwtPlot() );
|
attributePlotObject->setParentPlotNoReplot( m_plotWidget->qwtPlot() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateXZoom();
|
updatePropertyValueZoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -3127,7 +3141,7 @@ void RimWellLogTrack::doUpdateLayout()
|
|||||||
void RimWellLogTrack::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
void RimWellLogTrack::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||||
{
|
{
|
||||||
setAutoScaleXEnabled( true );
|
setAutoScalePropertyValuesEnabled( true );
|
||||||
updateZoomInParentPlot();
|
updateZoomInParentPlot();
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateWellLogPlotToolBar();
|
mainPlotWindow->updateWellLogPlotToolBar();
|
||||||
|
@ -111,8 +111,8 @@ public:
|
|||||||
size_t curveIndex( RimWellLogCurve* curve );
|
size_t curveIndex( RimWellLogCurve* curve );
|
||||||
size_t curveCount() { return m_curves.size(); }
|
size_t curveCount() { return m_curves.size(); }
|
||||||
|
|
||||||
void setXAxisTitle( const QString& text );
|
void setPropertyValueAxisTitle( const QString& text );
|
||||||
QString yAxisTitle() const;
|
QString depthAxisTitle() const;
|
||||||
|
|
||||||
void setFormationWellPath( RimWellPath* wellPath );
|
void setFormationWellPath( RimWellPath* wellPath );
|
||||||
RimWellPath* formationWellPath() const;
|
RimWellPath* formationWellPath() const;
|
||||||
@ -139,18 +139,18 @@ public:
|
|||||||
bool useBranchDetection );
|
bool useBranchDetection );
|
||||||
void setAndUpdateSimWellFormationNamesData( RimCase* rimCase, const QString& simWellName );
|
void setAndUpdateSimWellFormationNamesData( RimCase* rimCase, const QString& simWellName );
|
||||||
|
|
||||||
void setAutoScaleXEnabled( bool enabled ) override;
|
void setAutoScalePropertyValuesEnabled( bool enabled ) override;
|
||||||
void setAutoScaleYEnabled( bool enabled ) override;
|
void setAutoScaleDepthValuesEnabled( bool enabled ) override;
|
||||||
void setAutoScaleXIfNecessary();
|
void setAutoScalePropertyValuesIfNecessary();
|
||||||
|
|
||||||
void availableXAxisRange( double* minX, double* maxX );
|
void availablePropertyValueRange( double* minX, double* maxX );
|
||||||
void availableDepthRange( double* minimumDepth, double* maximumDepth );
|
void availableDepthRange( double* minimumDepth, double* maximumDepth );
|
||||||
|
|
||||||
void visibleXAxisRange( double* minX, double* maxX );
|
void visiblePropertyValueRange( double* minX, double* maxX );
|
||||||
void visibleDepthRange( double* minimumDepth, double* maximumDepth );
|
void visibleDepthRange( double* minimumDepth, double* maximumDepth );
|
||||||
|
|
||||||
void setVisibleXRange( double minValue, double maxValue );
|
void setVisiblePropertyValueRange( double minValue, double maxValue );
|
||||||
void setVisibleYRange( double minValue, double maxValue );
|
void setVisibleDepthRange( double minValue, double maxValue );
|
||||||
|
|
||||||
void updateZoomInParentPlot() override;
|
void updateZoomInParentPlot() override;
|
||||||
void updateZoomFromParentPlot() override;
|
void updateZoomFromParentPlot() override;
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
|
|
||||||
void setTickIntervals( double majorTickInterval, double minorTickInterval );
|
void setTickIntervals( double majorTickInterval, double minorTickInterval );
|
||||||
void setMinAndMaxTicksOnly( bool enable );
|
void setMinAndMaxTicksOnly( bool enable );
|
||||||
void setXAxisGridVisibility( RimWellLogPlot::AxisGridVisibility gridLines );
|
void setPropertyValueAxisGridVisibility( RimWellLogPlot::AxisGridVisibility gridLines );
|
||||||
|
|
||||||
void setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType annotationType );
|
void setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType annotationType );
|
||||||
void setAnnotationDisplay( RiuPlotAnnotationTool::RegionDisplay annotationDisplay );
|
void setAnnotationDisplay( RiuPlotAnnotationTool::RegionDisplay annotationDisplay );
|
||||||
@ -201,7 +201,7 @@ public:
|
|||||||
void uiOrderingForXAxisSettings( caf::PdmUiOrdering& uiOrdering );
|
void uiOrderingForXAxisSettings( caf::PdmUiOrdering& uiOrdering );
|
||||||
|
|
||||||
void setFormationsForCaseWithSimWellOnly( bool caseWithSimWellOnly );
|
void setFormationsForCaseWithSimWellOnly( bool caseWithSimWellOnly );
|
||||||
void updateXAxisAndGridTickIntervals();
|
void updatePropertyValueAxisAndGridTickIntervals();
|
||||||
|
|
||||||
void updateLegend() override;
|
void updateLegend() override;
|
||||||
|
|
||||||
@ -244,11 +244,11 @@ private:
|
|||||||
|
|
||||||
void cleanupBeforeClose();
|
void cleanupBeforeClose();
|
||||||
void detachAllPlotItems();
|
void detachAllPlotItems();
|
||||||
void calculateXZoomRange();
|
void calculatePropertyValueZoomRange();
|
||||||
void calculateYZoomRange();
|
void calculateDepthZoomRange();
|
||||||
|
|
||||||
void updateXZoom();
|
void updatePropertyValueZoom();
|
||||||
void updateYZoom();
|
void updateDepthZoom();
|
||||||
|
|
||||||
RiuPlotAxis getDepthAxis() const;
|
RiuPlotAxis getDepthAxis() const;
|
||||||
RiuPlotAxis getValueAxis() const;
|
RiuPlotAxis getValueAxis() const;
|
||||||
@ -272,7 +272,7 @@ private:
|
|||||||
|
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
|
|
||||||
void computeAndSetXRangeMinForLogarithmicScale();
|
void computeAndSetPropertyValueRangeMinForLogarithmicScale();
|
||||||
|
|
||||||
static void simWellOptionItems( QList<caf::PdmOptionItemInfo>* options, RimCase* eclCase );
|
static void simWellOptionItems( QList<caf::PdmOptionItemInfo>* options, RimCase* eclCase );
|
||||||
|
|
||||||
@ -308,19 +308,19 @@ private:
|
|||||||
bool isEmptyVisibleXRange() const;
|
bool isEmptyVisibleXRange() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_xAxisTitle;
|
QString m_propertyValueAxisTitle;
|
||||||
|
|
||||||
caf::PdmField<QString> m_description;
|
caf::PdmField<QString> m_description;
|
||||||
|
|
||||||
caf::PdmChildArrayField<RimWellLogCurve*> m_curves;
|
caf::PdmChildArrayField<RimWellLogCurve*> m_curves;
|
||||||
caf::PdmField<double> m_visibleXRangeMin;
|
caf::PdmField<double> m_visiblePropertyValueRangeMin;
|
||||||
caf::PdmField<double> m_visibleXRangeMax;
|
caf::PdmField<double> m_visiblePropertyValueRangeMax;
|
||||||
caf::PdmField<double> m_visibleDepthRangeMin;
|
caf::PdmField<double> m_visibleDepthRangeMin;
|
||||||
caf::PdmField<double> m_visibleDepthRangeMax;
|
caf::PdmField<double> m_visibleDepthRangeMax;
|
||||||
|
|
||||||
caf::PdmField<bool> m_isAutoScaleXEnabled;
|
caf::PdmField<bool> m_isAutoScalePropertyValuesEnabled;
|
||||||
caf::PdmField<bool> m_isLogarithmicScaleEnabled;
|
caf::PdmField<bool> m_isLogarithmicScaleEnabled;
|
||||||
caf::PdmField<RimWellLogPlot::AxisGridEnum> m_xAxisGridVisibility;
|
caf::PdmField<RimWellLogPlot::AxisGridEnum> m_propertyValueAxisGridVisibility;
|
||||||
|
|
||||||
caf::PdmField<bool> m_explicitTickIntervals;
|
caf::PdmField<bool> m_explicitTickIntervals;
|
||||||
caf::PdmField<bool> m_minAndMaxTicksOnly;
|
caf::PdmField<bool> m_minAndMaxTicksOnly;
|
||||||
@ -365,8 +365,8 @@ private:
|
|||||||
QPointer<RiuWellLogTrack> m_plotWidget;
|
QPointer<RiuWellLogTrack> m_plotWidget;
|
||||||
std::unique_ptr<RiuPlotAnnotationTool> m_annotationTool;
|
std::unique_ptr<RiuPlotAnnotationTool> m_annotationTool;
|
||||||
|
|
||||||
double m_availableXRangeMin;
|
double m_availablePropertyValueRangeMin;
|
||||||
double m_availableXRangeMax;
|
double m_availablePropertyValueRangeMax;
|
||||||
double m_availableDepthRangeMin;
|
double m_availableDepthRangeMin;
|
||||||
double m_availableDepthRangeMax;
|
double m_availableDepthRangeMax;
|
||||||
};
|
};
|
||||||
|
@ -89,7 +89,7 @@ void RimWellMeasurementCollection::deleteAllEmptyCurves()
|
|||||||
|
|
||||||
for ( auto curve : measurementCurves )
|
for ( auto curve : measurementCurves )
|
||||||
{
|
{
|
||||||
if ( curve->curveData()->xValues().empty() )
|
if ( curve->curveData()->propertyValues().empty() )
|
||||||
{
|
{
|
||||||
RimWellLogTrack* track = nullptr;
|
RimWellLogTrack* track = nullptr;
|
||||||
curve->firstAncestorOrThisOfTypeAsserted( track );
|
curve->firstAncestorOrThisOfTypeAsserted( track );
|
||||||
|
@ -116,21 +116,25 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
-rigWellPath->interpolatedPointAlongWellPath( measuredDepthValue ).z() );
|
-rigWellPath->interpolatedPointAlongWellPath( measuredDepthValue ).z() );
|
||||||
}
|
}
|
||||||
|
|
||||||
this->setValuesWithMdAndTVD( values,
|
bool useLogarithmicScale = false;
|
||||||
measuredDepthValues,
|
this->setPropertyValuesWithMdAndTVD( values,
|
||||||
trueVerticalDepthValues,
|
measuredDepthValues,
|
||||||
m_wellPath->wellPathGeometry()->rkbDiff(),
|
trueVerticalDepthValues,
|
||||||
RiaDefines::DepthUnitType::UNIT_METER,
|
m_wellPath->wellPathGeometry()->rkbDiff(),
|
||||||
false );
|
RiaDefines::DepthUnitType::UNIT_METER,
|
||||||
|
false,
|
||||||
|
useLogarithmicScale );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->setValuesAndDepths( values,
|
bool useLogarithmicScale = false;
|
||||||
measuredDepthValues,
|
this->setPropertyValuesAndDepths( values,
|
||||||
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
measuredDepthValues,
|
||||||
0.0,
|
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
||||||
RiaDefines::DepthUnitType::UNIT_METER,
|
0.0,
|
||||||
false );
|
RiaDefines::DepthUnitType::UNIT_METER,
|
||||||
|
false,
|
||||||
|
useLogarithmicScale );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,10 +160,10 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
depthType = wellLogPlot->depthType();
|
depthType = wellLogPlot->depthType();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isLogCurve = false;
|
bool useLogarithmicScale = false;
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( this->curveData()->xPlotValues(),
|
m_plotCurve->setSamplesFromXValuesAndYValues( this->curveData()->propertyValuesByIntervals(),
|
||||||
this->curveData()->depthPlotValues( depthType, displayUnit ),
|
this->curveData()->depthValuesByIntervals( depthType, displayUnit ),
|
||||||
isLogCurve );
|
useLogarithmicScale );
|
||||||
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,9 +74,9 @@ RimWellLogTrack* RimcWellLogPlot_newWellLogTrack::createWellLogTrack( RimWellLog
|
|||||||
plotTrack->setLegendsVisible( true );
|
plotTrack->setLegendsVisible( true );
|
||||||
plotTrack->setPlotTitleVisible( true );
|
plotTrack->setPlotTitleVisible( true );
|
||||||
plotTrack->setShowWindow( true );
|
plotTrack->setShowWindow( true );
|
||||||
plotTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR );
|
plotTrack->setPropertyValueAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR );
|
||||||
plotTrack->setShowRegionLabels( true );
|
plotTrack->setShowRegionLabels( true );
|
||||||
plotTrack->setAutoScaleXEnabled( true );
|
plotTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
plotTrack->updateConnectedEditors();
|
plotTrack->updateConnectedEditors();
|
||||||
wellLogPlot->setShowWindow( true );
|
wellLogPlot->setShowWindow( true );
|
||||||
wellLogPlot->updateConnectedEditors();
|
wellLogPlot->updateConnectedEditors();
|
||||||
|
@ -100,9 +100,9 @@ RimWellLogExtractionCurve*
|
|||||||
|
|
||||||
curve->updateConnectedEditors();
|
curve->updateConnectedEditors();
|
||||||
|
|
||||||
wellLogTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR );
|
wellLogTrack->setPropertyValueAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR );
|
||||||
wellLogTrack->setShowRegionLabels( true );
|
wellLogTrack->setShowRegionLabels( true );
|
||||||
wellLogTrack->setAutoScaleXEnabled( true );
|
wellLogTrack->setAutoScalePropertyValuesEnabled( true );
|
||||||
wellLogTrack->updateConnectedEditors();
|
wellLogTrack->updateConnectedEditors();
|
||||||
wellLogTrack->setShowWindow( true );
|
wellLogTrack->setShowWindow( true );
|
||||||
|
|
||||||
|
@ -60,9 +60,9 @@ public:
|
|||||||
{
|
{
|
||||||
CVF_ASSERT( lasFile );
|
CVF_ASSERT( lasFile );
|
||||||
|
|
||||||
if ( !m_curveData->xValues().empty() )
|
if ( !m_curveData->propertyValues().empty() )
|
||||||
{
|
{
|
||||||
std::vector<double> wellLogValues = m_curveData->xValues( QString::fromStdString( m_unit ) );
|
std::vector<double> wellLogValues = m_curveData->propertyValues( QString::fromStdString( m_unit ) );
|
||||||
for ( size_t vIdx = 0; vIdx < wellLogValues.size(); vIdx++ )
|
for ( size_t vIdx = 0; vIdx < wellLogValues.size(); vIdx++ )
|
||||||
{
|
{
|
||||||
double value = wellLogValues[vIdx];
|
double value = wellLogValues[vIdx];
|
||||||
@ -119,7 +119,7 @@ public:
|
|||||||
{
|
{
|
||||||
m_logCurveData.push_back( SingleChannelData( channelName, unit, comment, curveData ) );
|
m_logCurveData.push_back( SingleChannelData( channelName, unit, comment, curveData ) );
|
||||||
|
|
||||||
for ( double xValue : curveData->xValues() )
|
for ( double xValue : curveData->propertyValues() )
|
||||||
{
|
{
|
||||||
if ( xValue < m_minimumCurveValue )
|
if ( xValue < m_minimumCurveValue )
|
||||||
{
|
{
|
||||||
@ -536,7 +536,7 @@ void RigLasFileExporter::appendLasFileDescriptions( const std::vector<RimWellLog
|
|||||||
{
|
{
|
||||||
curveData = curve->curveData();
|
curveData = curve->curveData();
|
||||||
}
|
}
|
||||||
QString units = curve->curveData()->xUnits();
|
QString units = curve->curveData()->propertyValueUnit();
|
||||||
|
|
||||||
if ( convertCurveUnits || units == RiaWellLogUnitTools<double>::barX100UnitString() )
|
if ( convertCurveUnits || units == RiaWellLogUnitTools<double>::barX100UnitString() )
|
||||||
{
|
{
|
||||||
|
@ -31,11 +31,13 @@
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigWellLogCurveData::RigWellLogCurveData()
|
RigWellLogCurveData::RigWellLogCurveData()
|
||||||
|
: m_isExtractionCurve( false )
|
||||||
|
, m_rkbDiff( 0.0 )
|
||||||
|
, m_useLogarithmicScale( false )
|
||||||
|
, m_depthUnit( RiaDefines::DepthUnitType::UNIT_METER )
|
||||||
|
, m_propertyValueUnitString( RiaWellLogUnitTools<double>::noUnitString() )
|
||||||
|
|
||||||
{
|
{
|
||||||
m_isExtractionCurve = false;
|
|
||||||
m_rkbDiff = 0.0;
|
|
||||||
m_depthUnit = RiaDefines::DepthUnitType::UNIT_METER;
|
|
||||||
m_xUnitString = RiaWellLogUnitTools<double>::noUnitString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -61,14 +63,16 @@ void RigWellLogCurveData::setValuesAndDepths( const std::vector<double>& xValues
|
|||||||
RiaDefines::DepthTypeEnum depthType,
|
RiaDefines::DepthTypeEnum depthType,
|
||||||
double rkbDiff,
|
double rkbDiff,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
bool isExtractionCurve )
|
bool isExtractionCurve,
|
||||||
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
CVF_ASSERT( xValues.size() == depths.size() );
|
CVF_ASSERT( xValues.size() == depths.size() );
|
||||||
|
|
||||||
m_xValues = xValues;
|
m_propertyValues = xValues;
|
||||||
m_depths[depthType] = depths;
|
m_depths[depthType] = depths;
|
||||||
m_depthUnit = depthUnit;
|
m_depthUnit = depthUnit;
|
||||||
m_rkbDiff = rkbDiff;
|
m_rkbDiff = rkbDiff;
|
||||||
|
m_useLogarithmicScale = useLogarithmicScale;
|
||||||
|
|
||||||
// Disable depth value filtering is intended to be used for
|
// Disable depth value filtering is intended to be used for
|
||||||
// extraction curve data
|
// extraction curve data
|
||||||
@ -84,17 +88,19 @@ void RigWellLogCurveData::setValuesAndDepths( const std::vector<double>&
|
|||||||
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
||||||
double rkbDiff,
|
double rkbDiff,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
bool isExtractionCurve )
|
bool isExtractionCurve,
|
||||||
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
for ( auto it = depths.begin(); it != depths.end(); ++it )
|
for ( auto it = depths.begin(); it != depths.end(); ++it )
|
||||||
{
|
{
|
||||||
CVF_ASSERT( xValues.size() == it->second.size() );
|
CVF_ASSERT( xValues.size() == it->second.size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_xValues = xValues;
|
m_propertyValues = xValues;
|
||||||
m_depths = depths;
|
m_depths = depths;
|
||||||
m_depthUnit = depthUnit;
|
m_depthUnit = depthUnit;
|
||||||
m_rkbDiff = rkbDiff;
|
m_rkbDiff = rkbDiff;
|
||||||
|
m_useLogarithmicScale = useLogarithmicScale;
|
||||||
|
|
||||||
// Disable depth value filtering is intended to be used for
|
// Disable depth value filtering is intended to be used for
|
||||||
// extraction curve data
|
// extraction curve data
|
||||||
@ -106,43 +112,43 @@ void RigWellLogCurveData::setValuesAndDepths( const std::vector<double>&
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigWellLogCurveData::setXUnits( const QString& xUnitString )
|
void RigWellLogCurveData::setPropertyValueUnit( const QString& propertyValueUnitString )
|
||||||
{
|
{
|
||||||
m_xUnitString = xUnitString;
|
m_propertyValueUnitString = propertyValueUnitString;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<double> RigWellLogCurveData::xValues() const
|
std::vector<double> RigWellLogCurveData::propertyValues() const
|
||||||
{
|
{
|
||||||
return m_xValues;
|
return m_propertyValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<double> RigWellLogCurveData::xValues( const QString& units ) const
|
std::vector<double> RigWellLogCurveData::propertyValues( const QString& units ) const
|
||||||
{
|
{
|
||||||
std::vector<double> convertedValues;
|
std::vector<double> convertedValues;
|
||||||
if ( units != m_xUnitString &&
|
if ( units != m_propertyValueUnitString &&
|
||||||
RiaWellLogUnitTools<double>::convertValues( depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ),
|
RiaWellLogUnitTools<double>::convertValues( depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ),
|
||||||
m_xValues,
|
m_propertyValues,
|
||||||
&convertedValues,
|
&convertedValues,
|
||||||
m_xUnitString,
|
m_propertyValueUnitString,
|
||||||
units ) )
|
units ) )
|
||||||
{
|
{
|
||||||
return convertedValues;
|
return convertedValues;
|
||||||
}
|
}
|
||||||
return m_xValues;
|
return m_propertyValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RigWellLogCurveData::xUnits() const
|
QString RigWellLogCurveData::propertyValueUnit() const
|
||||||
{
|
{
|
||||||
return m_xUnitString;
|
return m_propertyValueUnitString;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -212,10 +218,10 @@ std::set<RiaDefines::DepthTypeEnum> RigWellLogCurveData::availableDepthTypes() c
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<double> RigWellLogCurveData::xPlotValues() const
|
std::vector<double> RigWellLogCurveData::propertyValuesByIntervals() const
|
||||||
{
|
{
|
||||||
std::vector<double> filteredValues;
|
std::vector<double> filteredValues;
|
||||||
RiaCurveDataTools::getValuesByIntervals( m_xValues, m_intervalsOfContinousValidValues, &filteredValues );
|
RiaCurveDataTools::getValuesByIntervals( m_propertyValues, m_intervalsOfContinousValidValues, &filteredValues );
|
||||||
|
|
||||||
return filteredValues;
|
return filteredValues;
|
||||||
}
|
}
|
||||||
@ -223,8 +229,8 @@ std::vector<double> RigWellLogCurveData::xPlotValues() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<double> RigWellLogCurveData::depthPlotValues( RiaDefines::DepthTypeEnum depthType,
|
std::vector<double> RigWellLogCurveData::depthValuesByIntervals( RiaDefines::DepthTypeEnum depthType,
|
||||||
RiaDefines::DepthUnitType destinationDepthUnit ) const
|
RiaDefines::DepthUnitType destinationDepthUnit ) const
|
||||||
{
|
{
|
||||||
std::vector<double> filteredValues;
|
std::vector<double> filteredValues;
|
||||||
|
|
||||||
@ -279,8 +285,8 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
|||||||
{
|
{
|
||||||
double segmentStartMd = mdIt->second[segmentStartIdx];
|
double segmentStartMd = mdIt->second[segmentStartIdx];
|
||||||
double segmentEndMd = mdIt->second[segmentStartIdx + 1];
|
double segmentEndMd = mdIt->second[segmentStartIdx + 1];
|
||||||
double segmentStartX = m_xValues[segmentStartIdx];
|
double segmentStartX = m_propertyValues[segmentStartIdx];
|
||||||
double segmentEndX = m_xValues[segmentStartIdx + 1];
|
double segmentEndX = m_propertyValues[segmentStartIdx + 1];
|
||||||
|
|
||||||
double segmentStartTvd = 0.0;
|
double segmentStartTvd = 0.0;
|
||||||
double segmentEndTvd = 0.0;
|
double segmentEndTvd = 0.0;
|
||||||
@ -318,7 +324,7 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
|||||||
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> resampledDepths =
|
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> resampledDepths =
|
||||||
{ { RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, tvDepths },
|
{ { RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, tvDepths },
|
||||||
{ RiaDefines::DepthTypeEnum::MEASURED_DEPTH, measuredDepths } };
|
{ RiaDefines::DepthTypeEnum::MEASURED_DEPTH, measuredDepths } };
|
||||||
reSampledData->setValuesAndDepths( xValues, resampledDepths, m_rkbDiff, m_depthUnit, true );
|
reSampledData->setValuesAndDepths( xValues, resampledDepths, m_rkbDiff, m_depthUnit, true, m_useLogarithmicScale );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -327,7 +333,8 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
|||||||
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
|
||||||
0.0,
|
0.0,
|
||||||
m_depthUnit,
|
m_depthUnit,
|
||||||
m_isExtractionCurve );
|
m_isExtractionCurve,
|
||||||
|
m_useLogarithmicScale );
|
||||||
}
|
}
|
||||||
|
|
||||||
return reSampledData;
|
return reSampledData;
|
||||||
@ -346,8 +353,8 @@ void RigWellLogCurveData::interpolateSegment( RiaDefines::DepthTypeEnum resampli
|
|||||||
|
|
||||||
double depth0 = depthIt->second[firstIndex];
|
double depth0 = depthIt->second[firstIndex];
|
||||||
double depth1 = depthIt->second[secondIndex];
|
double depth1 = depthIt->second[secondIndex];
|
||||||
double x0 = m_xValues[firstIndex];
|
double x0 = m_propertyValues[firstIndex];
|
||||||
double x1 = m_xValues[secondIndex];
|
double x1 = m_propertyValues[secondIndex];
|
||||||
double slope = 0.0;
|
double slope = 0.0;
|
||||||
if ( std::fabs( depth1 - depth0 ) > eps )
|
if ( std::fabs( depth1 - depth0 ) > eps )
|
||||||
{
|
{
|
||||||
@ -412,7 +419,7 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
|||||||
if ( std::fabs( depthIt->second[segmentStartIdx] - depth ) < eps ) // already have this depth point,
|
if ( std::fabs( depthIt->second[segmentStartIdx] - depth ) < eps ) // already have this depth point,
|
||||||
// reuse it
|
// reuse it
|
||||||
{
|
{
|
||||||
xValues.push_back( m_xValues[segmentStartIdx] );
|
xValues.push_back( m_propertyValues[segmentStartIdx] );
|
||||||
// Copy all depth types for this segment
|
// Copy all depth types for this segment
|
||||||
for ( auto depthTypeValuesPair : m_depths )
|
for ( auto depthTypeValuesPair : m_depths )
|
||||||
{
|
{
|
||||||
@ -458,7 +465,7 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
|||||||
CAF_ASSERT( foundPoint );
|
CAF_ASSERT( foundPoint );
|
||||||
}
|
}
|
||||||
|
|
||||||
reSampledData->setValuesAndDepths( xValues, resampledDepths, m_rkbDiff, m_depthUnit, true );
|
reSampledData->setValuesAndDepths( xValues, resampledDepths, m_rkbDiff, m_depthUnit, true, m_useLogarithmicScale );
|
||||||
return reSampledData;
|
return reSampledData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,7 +475,7 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
|
|||||||
void RigWellLogCurveData::calculateIntervalsOfContinousValidValues()
|
void RigWellLogCurveData::calculateIntervalsOfContinousValidValues()
|
||||||
{
|
{
|
||||||
std::vector<std::pair<size_t, size_t>> intervalsOfValidValues =
|
std::vector<std::pair<size_t, size_t>> intervalsOfValidValues =
|
||||||
RiaCurveDataTools::calculateIntervalsOfValidValues( m_xValues, false );
|
RiaCurveDataTools::calculateIntervalsOfValidValues( m_propertyValues, m_useLogarithmicScale );
|
||||||
|
|
||||||
m_intervalsOfContinousValidValues.clear();
|
m_intervalsOfContinousValidValues.clear();
|
||||||
|
|
||||||
@ -557,7 +564,7 @@ bool RigWellLogCurveData::calculateDepthRange( RiaDefines::DepthTypeEnum depthTy
|
|||||||
double minValue = HUGE_VAL;
|
double minValue = HUGE_VAL;
|
||||||
double maxValue = -HUGE_VAL;
|
double maxValue = -HUGE_VAL;
|
||||||
|
|
||||||
std::vector<double> depthValues = depthPlotValues( depthType, depthUnit );
|
std::vector<double> depthValues = depthValuesByIntervals( depthType, depthUnit );
|
||||||
for ( size_t vIdx = 0; vIdx < depthValues.size(); vIdx++ )
|
for ( size_t vIdx = 0; vIdx < depthValues.size(); vIdx++ )
|
||||||
{
|
{
|
||||||
double value = depthValues[vIdx];
|
double value = depthValues[vIdx];
|
||||||
|
@ -43,22 +43,26 @@ public:
|
|||||||
|
|
||||||
void setDepthUnit( RiaDefines::DepthUnitType depthUnit );
|
void setDepthUnit( RiaDefines::DepthUnitType depthUnit );
|
||||||
|
|
||||||
void setValuesAndDepths( const std::vector<double>& xValues,
|
void setValuesAndDepths( const std::vector<double>& propertyValues,
|
||||||
const std::vector<double>& depths,
|
const std::vector<double>& depths,
|
||||||
RiaDefines::DepthTypeEnum depthType,
|
RiaDefines::DepthTypeEnum depthType,
|
||||||
double rkbDiff,
|
double rkbDiff,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
bool isExtractionCurve );
|
bool isExtractionCurve,
|
||||||
void setValuesAndDepths( const std::vector<double>& xValues,
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
|
void setValuesAndDepths( const std::vector<double>& propertyValues,
|
||||||
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
||||||
double rkbDiff,
|
double rkbDiff,
|
||||||
RiaDefines::DepthUnitType depthUnit,
|
RiaDefines::DepthUnitType depthUnit,
|
||||||
bool isExtractionCurve );
|
bool isExtractionCurve,
|
||||||
void setXUnits( const QString& xUnitString );
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
std::vector<double> xValues() const;
|
void setPropertyValueUnit( const QString& propertyValueUnitString );
|
||||||
std::vector<double> xValues( const QString& units ) const;
|
|
||||||
QString xUnits() const;
|
std::vector<double> propertyValues() const;
|
||||||
|
std::vector<double> propertyValues( const QString& units ) const;
|
||||||
|
QString propertyValueUnit() const;
|
||||||
|
|
||||||
std::vector<double> depths( RiaDefines::DepthTypeEnum depthType ) const;
|
std::vector<double> depths( RiaDefines::DepthTypeEnum depthType ) const;
|
||||||
|
|
||||||
@ -71,9 +75,9 @@ public:
|
|||||||
|
|
||||||
RiaDefines::DepthUnitType depthUnit() const;
|
RiaDefines::DepthUnitType depthUnit() const;
|
||||||
|
|
||||||
std::vector<double> xPlotValues() const;
|
std::vector<double> propertyValuesByIntervals() const;
|
||||||
std::vector<double> depthPlotValues( RiaDefines::DepthTypeEnum depthType,
|
std::vector<double> depthValuesByIntervals( RiaDefines::DepthTypeEnum depthType,
|
||||||
RiaDefines::DepthUnitType destinationDepthUnit ) const;
|
RiaDefines::DepthUnitType destinationDepthUnit ) const;
|
||||||
std::vector<std::pair<size_t, size_t>> polylineStartStopIndices() const;
|
std::vector<std::pair<size_t, size_t>> polylineStartStopIndices() const;
|
||||||
|
|
||||||
cvf::ref<RigWellLogCurveData> calculateResampledCurveData( double newMeasuredDepthStepSize ) const;
|
cvf::ref<RigWellLogCurveData> calculateResampledCurveData( double newMeasuredDepthStepSize ) const;
|
||||||
@ -95,13 +99,14 @@ private:
|
|||||||
std::vector<std::pair<size_t, size_t>>* intervals );
|
std::vector<std::pair<size_t, size_t>>* intervals );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<double> m_xValues;
|
std::vector<double> m_propertyValues;
|
||||||
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> m_depths;
|
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> m_depths;
|
||||||
bool m_isExtractionCurve;
|
bool m_isExtractionCurve;
|
||||||
double m_rkbDiff;
|
double m_rkbDiff;
|
||||||
|
bool m_useLogarithmicScale;
|
||||||
|
|
||||||
std::vector<std::pair<size_t, size_t>> m_intervalsOfContinousValidValues;
|
std::vector<std::pair<size_t, size_t>> m_intervalsOfContinousValidValues;
|
||||||
|
|
||||||
RiaDefines::DepthUnitType m_depthUnit;
|
RiaDefines::DepthUnitType m_depthUnit;
|
||||||
QString m_xUnitString;
|
QString m_propertyValueUnitString;
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,8 @@ TEST( RimWellLogExtractionCurveImplTest, StripOffInvalidValAtEndsOfVector )
|
|||||||
values.push_back( 3.0 );
|
values.push_back( 3.0 );
|
||||||
values.push_back( HUGE_VAL );
|
values.push_back( HUGE_VAL );
|
||||||
|
|
||||||
auto valuesIntervals = RiaCurveDataTools::calculateIntervalsOfValidValues( values, false );
|
bool includePositiveValuesOnly = false;
|
||||||
|
auto valuesIntervals = RiaCurveDataTools::calculateIntervalsOfValidValues( values, includePositiveValuesOnly );
|
||||||
|
|
||||||
EXPECT_EQ( 1, static_cast<int>( valuesIntervals.size() ) );
|
EXPECT_EQ( 1, static_cast<int>( valuesIntervals.size() ) );
|
||||||
EXPECT_EQ( 2, static_cast<int>( valuesIntervals[0].first ) );
|
EXPECT_EQ( 2, static_cast<int>( valuesIntervals[0].first ) );
|
||||||
@ -40,7 +41,8 @@ TEST( RimWellLogExtractionCurveImplTest, StripOffHugeValAtEndsAndInteriorOfVecto
|
|||||||
values.push_back( 3.0 );
|
values.push_back( 3.0 );
|
||||||
values.push_back( HUGE_VAL );
|
values.push_back( HUGE_VAL );
|
||||||
|
|
||||||
auto valuesIntervals = RiaCurveDataTools::calculateIntervalsOfValidValues( values, false );
|
bool includePositiveValuesOnly = false;
|
||||||
|
auto valuesIntervals = RiaCurveDataTools::calculateIntervalsOfValidValues( values, includePositiveValuesOnly );
|
||||||
|
|
||||||
EXPECT_EQ( 2, static_cast<int>( valuesIntervals.size() ) );
|
EXPECT_EQ( 2, static_cast<int>( valuesIntervals.size() ) );
|
||||||
EXPECT_EQ( 2, static_cast<int>( valuesIntervals[0].first ) );
|
EXPECT_EQ( 2, static_cast<int>( valuesIntervals[0].first ) );
|
||||||
@ -48,3 +50,31 @@ TEST( RimWellLogExtractionCurveImplTest, StripOffHugeValAtEndsAndInteriorOfVecto
|
|||||||
EXPECT_EQ( 5, static_cast<int>( valuesIntervals[1].first ) );
|
EXPECT_EQ( 5, static_cast<int>( valuesIntervals[1].first ) );
|
||||||
EXPECT_EQ( 6, static_cast<int>( valuesIntervals[1].second ) );
|
EXPECT_EQ( 6, static_cast<int>( valuesIntervals[1].second ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
TEST( RimWellLogExtractionCurveImplTest, PositiveValuesOnly )
|
||||||
|
{
|
||||||
|
std::vector<double> values;
|
||||||
|
values.push_back( HUGE_VAL );
|
||||||
|
values.push_back( HUGE_VAL );
|
||||||
|
values.push_back( -1.0 );
|
||||||
|
values.push_back( 0.0 );
|
||||||
|
values.push_back( 0.1 );
|
||||||
|
values.push_back( 0.2 );
|
||||||
|
values.push_back( -1.0 );
|
||||||
|
values.push_back( HUGE_VAL );
|
||||||
|
values.push_back( 2.0 );
|
||||||
|
values.push_back( 3.0 );
|
||||||
|
values.push_back( HUGE_VAL );
|
||||||
|
|
||||||
|
bool includePositiveValuesOnly = true;
|
||||||
|
auto valuesIntervals = RiaCurveDataTools::calculateIntervalsOfValidValues( values, includePositiveValuesOnly );
|
||||||
|
|
||||||
|
EXPECT_EQ( 2, static_cast<int>( valuesIntervals.size() ) );
|
||||||
|
EXPECT_EQ( 4, static_cast<int>( valuesIntervals[0].first ) );
|
||||||
|
EXPECT_EQ( 5, static_cast<int>( valuesIntervals[0].second ) );
|
||||||
|
EXPECT_EQ( 8, static_cast<int>( valuesIntervals[1].first ) );
|
||||||
|
EXPECT_EQ( 9, static_cast<int>( valuesIntervals[1].second ) );
|
||||||
|
}
|
||||||
|
@ -239,8 +239,8 @@ void RiuFlowCharacteristicsPlot::addFlowCapStorageCapCurve( const QDateTime&
|
|||||||
|
|
||||||
RiuQwtPlotCurve* plotCurve =
|
RiuQwtPlotCurve* plotCurve =
|
||||||
createEmptyCurve( m_flowCapVsStorageCapPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
|
createEmptyCurve( m_flowCapVsStorageCapPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
|
||||||
bool isLogCurve = false;
|
bool useLogarithmicScale = false;
|
||||||
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, isLogCurve );
|
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, useLogarithmicScale );
|
||||||
m_flowCapVsStorageCapPlot->replot();
|
m_flowCapVsStorageCapPlot->replot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,9 +253,9 @@ void RiuFlowCharacteristicsPlot::addSweepEfficiencyCurve( const QDateTime&
|
|||||||
{
|
{
|
||||||
CVF_ASSERT( !m_dateToColorMap.empty() );
|
CVF_ASSERT( !m_dateToColorMap.empty() );
|
||||||
|
|
||||||
RiuQwtPlotCurve* plotCurve = createEmptyCurve( m_sweepEffPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
|
RiuQwtPlotCurve* plotCurve = createEmptyCurve( m_sweepEffPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
|
||||||
bool isLogCurve = false;
|
bool useLogarithmicScale = false;
|
||||||
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, isLogCurve );
|
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, useLogarithmicScale );
|
||||||
|
|
||||||
m_sweepEffPlot->replot();
|
m_sweepEffPlot->replot();
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ RiuPlotCurve::~RiuPlotCurve()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuPlotCurve::setSamplesValues( const std::vector<double>& xValues, const std::vector<double>& yValues )
|
void RiuPlotCurve::setSamplesValues( const std::vector<double>& xValues, const std::vector<double>& yValues )
|
||||||
{
|
{
|
||||||
setSamplesInPlot( xValues, yValues, static_cast<int>( xValues.size() ) );
|
setSamplesInPlot( xValues, yValues );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -57,9 +57,9 @@ void RiuPlotCurve::setSamplesValues( const std::vector<double>& xValues, const s
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuPlotCurve::setSamplesFromXValuesAndYValues( const std::vector<double>& xValues,
|
void RiuPlotCurve::setSamplesFromXValuesAndYValues( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve )
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
computeValidIntervalsAndSetCurveData( xValues, yValues, isLogCurve );
|
computeValidIntervalsAndSetCurveData( xValues, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -67,11 +67,11 @@ void RiuPlotCurve::setSamplesFromXValuesAndYValues( const std::vector<double>& x
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
void RiuPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve )
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
auto xValues = RiuPlotCurve::fromQDateTime( dateTimes );
|
auto xValues = RiuPlotCurve::fromQDateTime( dateTimes );
|
||||||
|
|
||||||
computeValidIntervalsAndSetCurveData( xValues, yValues, isLogCurve );
|
computeValidIntervalsAndSetCurveData( xValues, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -79,11 +79,11 @@ void RiuPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>&
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
void RiuPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve )
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
auto xValues = RiuPlotCurve::fromTime_t( dateTimes );
|
auto xValues = RiuPlotCurve::fromTime_t( dateTimes );
|
||||||
|
|
||||||
computeValidIntervalsAndSetCurveData( xValues, yValues, isLogCurve );
|
computeValidIntervalsAndSetCurveData( xValues, yValues, useLogarithmicScale );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -123,9 +123,9 @@ void RiuPlotCurve::setBlackAndWhiteLegendIcon( bool blackAndWhite )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuPlotCurve::computeValidIntervalsAndSetCurveData( const std::vector<double>& xValues,
|
void RiuPlotCurve::computeValidIntervalsAndSetCurveData( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve )
|
bool useLogarithmicScale )
|
||||||
{
|
{
|
||||||
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, isLogCurve );
|
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, useLogarithmicScale );
|
||||||
|
|
||||||
std::vector<double> validYValues;
|
std::vector<double> validYValues;
|
||||||
std::vector<double> validXValues;
|
std::vector<double> validXValues;
|
||||||
@ -133,7 +133,7 @@ void RiuPlotCurve::computeValidIntervalsAndSetCurveData( const std::vector<doubl
|
|||||||
RiaCurveDataTools::getValuesByIntervals( yValues, intervalsOfValidValues, &validYValues );
|
RiaCurveDataTools::getValuesByIntervals( yValues, intervalsOfValidValues, &validYValues );
|
||||||
RiaCurveDataTools::getValuesByIntervals( xValues, intervalsOfValidValues, &validXValues );
|
RiaCurveDataTools::getValuesByIntervals( xValues, intervalsOfValidValues, &validXValues );
|
||||||
|
|
||||||
setSamplesInPlot( validXValues, validYValues, static_cast<int>( validXValues.size() ) );
|
setSamplesInPlot( validXValues, validYValues );
|
||||||
|
|
||||||
setLineSegmentStartStopIndices( RiaCurveDataTools::computePolyLineStartStopIndices( intervalsOfValidValues ) );
|
setLineSegmentStartStopIndices( RiaCurveDataTools::computePolyLineStartStopIndices( intervalsOfValidValues ) );
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ std::vector<double> RiuPlotCurve::fromTime_t( const std::vector<time_t>& timeSte
|
|||||||
void RiuPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
void RiuPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
const std::vector<double>& errorValues,
|
const std::vector<double>& errorValues,
|
||||||
bool isLogCurve,
|
bool useLogarithmicScale,
|
||||||
RiaCurveDataTools::ErrorAxis errorAxis )
|
RiaCurveDataTools::ErrorAxis errorAxis )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -65,21 +65,21 @@ public:
|
|||||||
|
|
||||||
void setSamplesFromXValuesAndYValues( const std::vector<double>& xValues,
|
void setSamplesFromXValuesAndYValues( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve );
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
void setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
void setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve );
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
void setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
void setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve );
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
virtual void setSamplesFromXYErrorValues(
|
virtual void setSamplesFromXYErrorValues(
|
||||||
const std::vector<double>& xValues,
|
const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
const std::vector<double>& errorValues,
|
const std::vector<double>& errorValues,
|
||||||
bool isLogCurve,
|
bool useLogarithmicScale,
|
||||||
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
|
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
|
||||||
|
|
||||||
void setLineSegmentStartStopIndices( const std::vector<std::pair<size_t, size_t>>& lineSegmentStartStopIndices );
|
void setLineSegmentStartStopIndices( const std::vector<std::pair<size_t, size_t>>& lineSegmentStartStopIndices );
|
||||||
@ -130,13 +130,12 @@ public:
|
|||||||
virtual RiuPlotCurveSymbol* createSymbol( RiuPlotCurveSymbol::PointSymbolEnum symbol ) const = 0;
|
virtual RiuPlotCurveSymbol* createSymbol( RiuPlotCurveSymbol::PointSymbolEnum symbol ) const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void
|
virtual void setSamplesInPlot( const std::vector<double>& xValues, const std::vector<double>& yValues ) = 0;
|
||||||
setSamplesInPlot( const std::vector<double>& xValues, const std::vector<double>& yValues, int numSamples ) = 0;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void computeValidIntervalsAndSetCurveData( const std::vector<double>& xValues,
|
void computeValidIntervalsAndSetCurveData( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
bool isLogCurve );
|
bool useLogarithmicScale );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float m_symbolSkipPixelDistance;
|
float m_symbolSkipPixelDistance;
|
||||||
|
@ -179,22 +179,18 @@ void RiuQtChartsPlotCurve::showInPlot()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuQtChartsPlotCurve::setSamplesInPlot( const std::vector<double>& xValues,
|
void RiuQtChartsPlotCurve::setSamplesInPlot( const std::vector<double>& xValues, const std::vector<double>& yValues )
|
||||||
const std::vector<double>& yValues,
|
|
||||||
int numValues )
|
|
||||||
{
|
{
|
||||||
if ( !isQtChartObjectsPresent() ) return;
|
if ( !isQtChartObjectsPresent() ) return;
|
||||||
|
|
||||||
CAF_ASSERT( xValues.size() == yValues.size() );
|
CAF_ASSERT( xValues.size() == yValues.size() );
|
||||||
CAF_ASSERT( numValues <= static_cast<int>( xValues.size() ) );
|
|
||||||
CAF_ASSERT( numValues >= 0 );
|
|
||||||
|
|
||||||
QtCharts::QLineSeries* line = lineSeries();
|
QtCharts::QLineSeries* line = lineSeries();
|
||||||
QtCharts::QScatterSeries* scatter = scatterSeries();
|
QtCharts::QScatterSeries* scatter = scatterSeries();
|
||||||
|
|
||||||
line->clear();
|
line->clear();
|
||||||
scatter->clear();
|
scatter->clear();
|
||||||
for ( int i = 0; i < numValues; i++ )
|
for ( int i = 0; i < static_cast<int>( xValues.size() ); i++ )
|
||||||
{
|
{
|
||||||
line->append( xValues[i], yValues[i] );
|
line->append( xValues[i], yValues[i] );
|
||||||
scatter->append( xValues[i], yValues[i] );
|
scatter->append( xValues[i], yValues[i] );
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
RiuPlotCurveSymbol* createSymbol( RiuPlotCurveSymbol::PointSymbolEnum symbol ) const override;
|
RiuPlotCurveSymbol* createSymbol( RiuPlotCurveSymbol::PointSymbolEnum symbol ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setSamplesInPlot( const std::vector<double>&, const std::vector<double>&, int ) override;
|
void setSamplesInPlot( const std::vector<double>&, const std::vector<double>& ) override;
|
||||||
|
|
||||||
bool isQtChartObjectsPresent() const;
|
bool isQtChartObjectsPresent() const;
|
||||||
QtCharts::QLineSeries* lineSeries() const;
|
QtCharts::QLineSeries* lineSeries() const;
|
||||||
|
@ -337,9 +337,11 @@ void RiuQwtPlotCurve::showInPlot()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuQwtPlotCurve::setSamplesInPlot( const std::vector<double>& xValues, const std::vector<double>& yValues, int numValues )
|
void RiuQwtPlotCurve::setSamplesInPlot( const std::vector<double>& xValues, const std::vector<double>& yValues )
|
||||||
{
|
{
|
||||||
setSamples( xValues.data(), yValues.data(), numValues );
|
CAF_ASSERT( xValues.size() == yValues.size() );
|
||||||
|
|
||||||
|
setSamples( xValues.data(), yValues.data(), static_cast<int>( xValues.size() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -415,13 +417,13 @@ std::pair<double, double> RiuQwtPlotCurve::yDataRange() const
|
|||||||
void RiuQwtPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
void RiuQwtPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
const std::vector<double>& errorValues,
|
const std::vector<double>& errorValues,
|
||||||
bool isLogCurve,
|
bool useLogarithmicScale,
|
||||||
RiaCurveDataTools::ErrorAxis errorAxis )
|
RiaCurveDataTools::ErrorAxis errorAxis )
|
||||||
{
|
{
|
||||||
CVF_ASSERT( xValues.size() == yValues.size() );
|
CVF_ASSERT( xValues.size() == yValues.size() );
|
||||||
CVF_ASSERT( xValues.size() == errorValues.size() );
|
CVF_ASSERT( xValues.size() == errorValues.size() );
|
||||||
|
|
||||||
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, isLogCurve );
|
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, useLogarithmicScale );
|
||||||
std::vector<double> filteredYValues;
|
std::vector<double> filteredYValues;
|
||||||
std::vector<double> filteredXValues;
|
std::vector<double> filteredXValues;
|
||||||
|
|
||||||
@ -454,7 +456,7 @@ void RiuQwtPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setSamplesInPlot( filteredXValues, filteredYValues, static_cast<int>( filteredXValues.size() ) );
|
setSamplesInPlot( filteredXValues, filteredYValues );
|
||||||
|
|
||||||
setLineSegmentStartStopIndices( intervalsOfValidValues );
|
setLineSegmentStartStopIndices( intervalsOfValidValues );
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
const std::vector<double>& xValues,
|
const std::vector<double>& xValues,
|
||||||
const std::vector<double>& yValues,
|
const std::vector<double>& yValues,
|
||||||
const std::vector<double>& errorValues,
|
const std::vector<double>& errorValues,
|
||||||
bool isLogCurve,
|
bool useLogarithmicScale,
|
||||||
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS ) override;
|
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS ) override;
|
||||||
|
|
||||||
void setXAxis( RiuPlotAxis axis ) override;
|
void setXAxis( RiuPlotAxis axis ) override;
|
||||||
@ -97,7 +97,7 @@ protected:
|
|||||||
int from,
|
int from,
|
||||||
int to ) const override;
|
int to ) const override;
|
||||||
|
|
||||||
void setSamplesInPlot( const std::vector<double>&, const std::vector<double>&, int ) override;
|
void setSamplesInPlot( const std::vector<double>&, const std::vector<double>& ) override;
|
||||||
|
|
||||||
QwtPlotIntervalCurve* m_qwtCurveErrorBars;
|
QwtPlotIntervalCurve* m_qwtCurveErrorBars;
|
||||||
bool m_showErrorBars;
|
bool m_showErrorBars;
|
||||||
|
Loading…
Reference in New Issue
Block a user