mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Rename to isLogCurve
This commit is contained in:
@@ -57,7 +57,8 @@ void RimGridCrossPlotCurve::setSamples( const std::vector<double>& xValues, cons
|
||||
|
||||
if ( xValues.empty() || yValues.empty() || !m_plotCurve ) return;
|
||||
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, false );
|
||||
bool isLogCurve = false;
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -684,11 +684,11 @@ bool RimPlotCurve::hasParentPlot() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setSamplesFromXYValues( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues )
|
||||
bool isLogCurve )
|
||||
{
|
||||
if ( m_plotCurve )
|
||||
{
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, keepOnlyPositiveValues );
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,11 +697,11 @@ void RimPlotCurve::setSamplesFromXYValues( const std::vector<double>& xValues,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues )
|
||||
bool isLogCurve )
|
||||
{
|
||||
if ( m_plotCurve )
|
||||
{
|
||||
m_plotCurve->setSamplesFromDatesAndYValues( dateTimes, yValues, keepOnlyPositiveValues );
|
||||
m_plotCurve->setSamplesFromDatesAndYValues( dateTimes, yValues, isLogCurve );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -710,11 +710,11 @@ void RimPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues )
|
||||
bool isLogCurve )
|
||||
{
|
||||
if ( m_plotCurve )
|
||||
{
|
||||
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, yValues, keepOnlyPositiveValues );
|
||||
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, yValues, isLogCurve );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,12 +724,12 @@ void RimPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dat
|
||||
void RimPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
const std::vector<double>& errorValues,
|
||||
bool keepOnlyPositiveValues,
|
||||
bool isLogCurve,
|
||||
RiaCurveDataTools::ErrorAxis errorAxis )
|
||||
{
|
||||
if ( m_plotCurve )
|
||||
{
|
||||
m_plotCurve->setSamplesFromXYErrorValues( xValues, yValues, errorValues, keepOnlyPositiveValues, errorAxis );
|
||||
m_plotCurve->setSamplesFromXYErrorValues( xValues, yValues, errorValues, isLogCurve, errorAxis );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -141,20 +141,18 @@ protected:
|
||||
void setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
const std::vector<double>& errorValues,
|
||||
bool keepOnlyPositiveValues,
|
||||
bool isLogCurve,
|
||||
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
|
||||
|
||||
void setSamplesFromXYValues( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues );
|
||||
void setSamplesFromXYValues( const std::vector<double>& xValues, const std::vector<double>& yValues, bool isLogCurve );
|
||||
|
||||
void setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues );
|
||||
bool isLogCurve );
|
||||
|
||||
void setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues );
|
||||
bool isLogCurve );
|
||||
|
||||
protected:
|
||||
// Overridden PDM methods
|
||||
|
||||
@@ -573,9 +573,8 @@ void RimVfpPlot::populatePlotWidgetWithPlotData( RiuPlotWidget* plotWidget, cons
|
||||
symbol->setSize( 6, 6 );
|
||||
curve->setSymbol( symbol );
|
||||
|
||||
curve->setSamplesFromXValuesAndYValues( plotData.xData( idx ),
|
||||
plotData.yData( idx ),
|
||||
static_cast<int>( plotData.curveSize( idx ) ) );
|
||||
bool isLogCurve = false;
|
||||
curve->setSamplesFromXValuesAndYValues( plotData.xData( idx ), plotData.yData( idx ), isLogCurve );
|
||||
curve->attachToPlot( plotWidget );
|
||||
curve->showInPlot();
|
||||
}
|
||||
|
||||
@@ -357,10 +357,19 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
isUsingPseudoLength = false;
|
||||
}
|
||||
|
||||
bool isLogCurve = false;
|
||||
|
||||
RimWellLogTrack* track = nullptr;
|
||||
firstAncestorOfType( track );
|
||||
if ( track )
|
||||
{
|
||||
isLogCurve = track->isLogarithmicScale();
|
||||
}
|
||||
|
||||
std::vector<double> xPlotValues = curveData()->xPlotValues();
|
||||
std::vector<double> depthPlotValues = curveData()->depthPlotValues( depthType, displayUnit );
|
||||
CAF_ASSERT( xPlotValues.size() == depthPlotValues.size() );
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xPlotValues, depthPlotValues, static_cast<int>( xPlotValues.size() ) );
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xPlotValues, depthPlotValues, isLogCurve );
|
||||
|
||||
m_plotCurve->setLineSegmentStartStopIndices( curveData()->polylineStartStopIndices() );
|
||||
|
||||
|
||||
@@ -470,19 +470,19 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
auto xValues = this->curveData()->xPlotValues();
|
||||
auto yValues = this->curveData()->depthPlotValues( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit );
|
||||
bool keepOnlyPositiveValues = false;
|
||||
bool isLogCurve = false;
|
||||
|
||||
if ( !errors.empty() )
|
||||
{
|
||||
this->setSamplesFromXYErrorValues( xValues,
|
||||
yValues,
|
||||
errors,
|
||||
keepOnlyPositiveValues,
|
||||
isLogCurve,
|
||||
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_X_AXIS );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, keepOnlyPositiveValues );
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, isLogCurve );
|
||||
}
|
||||
|
||||
RimWellLogTrack* wellLogTrack;
|
||||
|
||||
@@ -156,9 +156,10 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
depthType = wellLogPlot->depthType();
|
||||
}
|
||||
|
||||
bool isLogCurve = false;
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( this->curveData()->xPlotValues(),
|
||||
this->curveData()->depthPlotValues( depthType, displayUnit ),
|
||||
static_cast<int>( this->curveData()->xPlotValues().size() ) );
|
||||
isLogCurve );
|
||||
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,8 @@ void RiuFlowCharacteristicsPlot::addFlowCapStorageCapCurve( const QDateTime&
|
||||
|
||||
RiuQwtPlotCurve* plotCurve =
|
||||
createEmptyCurve( m_flowCapVsStorageCapPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
|
||||
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, false );
|
||||
bool isLogCurve = false;
|
||||
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, isLogCurve );
|
||||
m_flowCapVsStorageCapPlot->replot();
|
||||
}
|
||||
|
||||
@@ -252,8 +253,9 @@ void RiuFlowCharacteristicsPlot::addSweepEfficiencyCurve( const QDateTime&
|
||||
{
|
||||
CVF_ASSERT( !m_dateToColorMap.empty() );
|
||||
|
||||
RiuQwtPlotCurve* plotCurve = createEmptyCurve( m_sweepEffPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
|
||||
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, false );
|
||||
RiuQwtPlotCurve* plotCurve = createEmptyCurve( m_sweepEffPlot, dateTime.toString(), m_dateToColorMap[dateTime] );
|
||||
bool isLogCurve = false;
|
||||
plotCurve->setSamplesFromXValuesAndYValues( xVals, yVals, isLogCurve );
|
||||
|
||||
m_sweepEffPlot->replot();
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ void RiuPlotCurve::setSamplesValues( const std::vector<double>& xValues, const s
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotCurve::setSamplesFromXValuesAndYValues( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues )
|
||||
bool isLogCurve )
|
||||
{
|
||||
computeValidIntervalsAndSetCurveData( xValues, yValues, keepOnlyPositiveValues );
|
||||
computeValidIntervalsAndSetCurveData( xValues, yValues, isLogCurve );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -67,11 +67,11 @@ void RiuPlotCurve::setSamplesFromXValuesAndYValues( const std::vector<double>& x
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues )
|
||||
bool isLogCurve )
|
||||
{
|
||||
auto xValues = RiuPlotCurve::fromQDateTime( dateTimes );
|
||||
|
||||
computeValidIntervalsAndSetCurveData( xValues, yValues, keepOnlyPositiveValues );
|
||||
computeValidIntervalsAndSetCurveData( xValues, yValues, isLogCurve );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -79,11 +79,11 @@ void RiuPlotCurve::setSamplesFromDatesAndYValues( const std::vector<QDateTime>&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues )
|
||||
bool isLogCurve )
|
||||
{
|
||||
auto xValues = RiuPlotCurve::fromTime_t( dateTimes );
|
||||
|
||||
computeValidIntervalsAndSetCurveData( xValues, yValues, keepOnlyPositiveValues );
|
||||
computeValidIntervalsAndSetCurveData( xValues, yValues, isLogCurve );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -123,9 +123,9 @@ void RiuPlotCurve::setBlackAndWhiteLegendIcon( bool blackAndWhite )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotCurve::computeValidIntervalsAndSetCurveData( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues )
|
||||
bool isLogCurve )
|
||||
{
|
||||
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, keepOnlyPositiveValues );
|
||||
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, isLogCurve );
|
||||
|
||||
std::vector<double> validYValues;
|
||||
std::vector<double> validXValues;
|
||||
@@ -184,7 +184,7 @@ std::vector<double> RiuPlotCurve::fromTime_t( const std::vector<time_t>& timeSte
|
||||
void RiuPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
const std::vector<double>& errorValues,
|
||||
bool keepOnlyPositiveValues,
|
||||
bool isLogCurve,
|
||||
RiaCurveDataTools::ErrorAxis errorAxis )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,21 +65,21 @@ public:
|
||||
|
||||
void setSamplesFromXValuesAndYValues( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues );
|
||||
bool isLogCurve );
|
||||
|
||||
void setSamplesFromDatesAndYValues( const std::vector<QDateTime>& dateTimes,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues );
|
||||
bool isLogCurve );
|
||||
|
||||
void setSamplesFromTimeTAndYValues( const std::vector<time_t>& dateTimes,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues );
|
||||
bool isLogCurve );
|
||||
|
||||
virtual void setSamplesFromXYErrorValues(
|
||||
const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
const std::vector<double>& errorValues,
|
||||
bool keepOnlyPositiveValues,
|
||||
bool isLogCurve,
|
||||
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
|
||||
|
||||
void setLineSegmentStartStopIndices( const std::vector<std::pair<size_t, size_t>>& lineSegmentStartStopIndices );
|
||||
@@ -136,7 +136,7 @@ protected:
|
||||
private:
|
||||
void computeValidIntervalsAndSetCurveData( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
bool keepOnlyPositiveValues );
|
||||
bool isLogCurve );
|
||||
|
||||
protected:
|
||||
float m_symbolSkipPixelDistance;
|
||||
|
||||
@@ -415,13 +415,13 @@ std::pair<double, double> RiuQwtPlotCurve::yDataRange() const
|
||||
void RiuQwtPlotCurve::setSamplesFromXYErrorValues( const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
const std::vector<double>& errorValues,
|
||||
bool keepOnlyPositiveValues,
|
||||
bool isLogCurve,
|
||||
RiaCurveDataTools::ErrorAxis errorAxis )
|
||||
{
|
||||
CVF_ASSERT( xValues.size() == yValues.size() );
|
||||
CVF_ASSERT( xValues.size() == errorValues.size() );
|
||||
|
||||
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, keepOnlyPositiveValues );
|
||||
auto intervalsOfValidValues = RiaCurveDataTools::calculateIntervalsOfValidValues( yValues, isLogCurve );
|
||||
std::vector<double> filteredYValues;
|
||||
std::vector<double> filteredXValues;
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
const std::vector<double>& xValues,
|
||||
const std::vector<double>& yValues,
|
||||
const std::vector<double>& errorValues,
|
||||
bool keepOnlyPositiveValues,
|
||||
bool isLogCurve,
|
||||
RiaCurveDataTools::ErrorAxis errorAxis = RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS ) override;
|
||||
|
||||
void setXAxis( RiuPlotAxis axis ) override;
|
||||
|
||||
Reference in New Issue
Block a user