2015-10-15 04:27:12 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-10-15 04:27:12 -05:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-10-15 04:27:12 -05:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-10-15 04:27:12 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-06-13 08:41:52 -05:00
|
|
|
#include "RiaDefines.h"
|
2020-01-29 05:52:07 -06:00
|
|
|
#include "RiaWellLogUnitTools.h"
|
2015-12-02 05:19:35 -06:00
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
2020-01-29 05:52:07 -06:00
|
|
|
#include <QString>
|
|
|
|
|
2019-11-19 06:19:56 -06:00
|
|
|
#include <map>
|
|
|
|
#include <set>
|
2015-10-15 04:27:12 -05:00
|
|
|
#include <vector>
|
|
|
|
|
2015-10-15 05:41:12 -05:00
|
|
|
class RigWellLogCurveDataTestInterface;
|
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2015-10-15 04:27:12 -05:00
|
|
|
//==================================================================================================
|
|
|
|
class RigWellLogCurveData : public cvf::Object
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RigWellLogCurveData();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RigWellLogCurveData() override;
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2023-03-06 07:34:22 -06:00
|
|
|
void clear();
|
|
|
|
|
2021-06-09 07:51:26 -05:00
|
|
|
void setDepthUnit( RiaDefines::DepthUnitType depthUnit );
|
|
|
|
|
2022-02-14 04:49:37 -06:00
|
|
|
void setValuesAndDepths( const std::vector<double>& propertyValues,
|
2019-11-19 06:19:56 -06:00
|
|
|
const std::vector<double>& depths,
|
|
|
|
RiaDefines::DepthTypeEnum depthType,
|
2020-01-08 03:31:01 -06:00
|
|
|
double rkbDiff,
|
2019-11-19 06:19:56 -06:00
|
|
|
RiaDefines::DepthUnitType depthUnit,
|
2022-02-14 04:49:37 -06:00
|
|
|
bool isExtractionCurve,
|
|
|
|
bool useLogarithmicScale );
|
|
|
|
|
|
|
|
void setValuesAndDepths( const std::vector<double>& propertyValues,
|
2019-11-19 06:19:56 -06:00
|
|
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
2020-01-08 03:31:01 -06:00
|
|
|
double rkbDiff,
|
2019-11-19 06:19:56 -06:00
|
|
|
RiaDefines::DepthUnitType depthUnit,
|
2022-02-14 04:49:37 -06:00
|
|
|
bool isExtractionCurve,
|
|
|
|
bool useLogarithmicScale );
|
|
|
|
|
|
|
|
void setPropertyValueUnit( const QString& propertyValueUnitString );
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2022-02-14 04:49:37 -06:00
|
|
|
std::vector<double> propertyValues() const;
|
|
|
|
std::vector<double> propertyValues( const QString& units ) const;
|
|
|
|
QString propertyValueUnit() const;
|
2019-11-19 06:19:56 -06:00
|
|
|
|
|
|
|
std::vector<double> depths( RiaDefines::DepthTypeEnum depthType ) const;
|
2022-02-23 06:57:02 -06:00
|
|
|
std::vector<double> depths( RiaDefines::DepthTypeEnum depthType, RiaDefines::DepthUnitType destinationDepthUnit ) const;
|
2019-11-19 06:19:56 -06:00
|
|
|
|
|
|
|
std::set<RiaDefines::DepthTypeEnum> availableDepthTypes() const;
|
|
|
|
|
2023-02-26 03:48:40 -06:00
|
|
|
bool calculateDepthRange( RiaDefines::DepthTypeEnum depthType, RiaDefines::DepthUnitType depthUnit, double* minMD, double* maxMD ) const;
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RiaDefines::DepthUnitType depthUnit() const;
|
2015-12-02 05:19:35 -06:00
|
|
|
|
2023-02-26 03:48:40 -06:00
|
|
|
std::vector<double> propertyValuesByIntervals() const;
|
|
|
|
std::vector<double> depthValuesByIntervals( RiaDefines::DepthTypeEnum depthType, RiaDefines::DepthUnitType destinationDepthUnit ) const;
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<std::pair<size_t, size_t>> polylineStartStopIndices() const;
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<RigWellLogCurveData> calculateResampledCurveData( double newMeasuredDepthStepSize ) const;
|
2020-06-23 08:35:17 -05:00
|
|
|
cvf::ref<RigWellLogCurveData> calculateResampledCurveData( RiaDefines::DepthTypeEnum resamplingDepthType,
|
|
|
|
const std::vector<double>& depths ) const;
|
2023-05-24 08:07:43 -05:00
|
|
|
static void interpolateSegment( RiaDefines::DepthTypeEnum resamplingDepthType,
|
|
|
|
std::vector<double>& resampledValues,
|
|
|
|
std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& resampledDepths,
|
|
|
|
double targetDepthValue,
|
|
|
|
size_t firstIndex,
|
|
|
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& originalDepths,
|
|
|
|
const std::vector<double>& propertyValues,
|
|
|
|
double eps );
|
|
|
|
|
|
|
|
static std::pair<std::vector<double>, std::map<RiaDefines::DepthTypeEnum, std::vector<double>>>
|
|
|
|
createResampledValuesAndDepths( RiaDefines::DepthTypeEnum resamplingDepthType,
|
|
|
|
const std::vector<double>& targetDepths,
|
|
|
|
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& originalDepths,
|
|
|
|
const std::vector<double>& propertyValues );
|
2016-09-19 04:17:36 -05:00
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void calculateIntervalsOfContinousValidValues();
|
2015-10-15 04:27:12 -05:00
|
|
|
|
2022-02-23 06:57:02 -06:00
|
|
|
static std::vector<double> depthsForDepthUnit( const std::vector<double>& depths,
|
|
|
|
RiaDefines::DepthUnitType sourceDepthUnit,
|
|
|
|
RiaDefines::DepthUnitType destinationDepthUnit );
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static void splitIntervalAtEmptySpace( const std::vector<double>& depthValues,
|
|
|
|
size_t startIdx,
|
|
|
|
size_t stopIdx,
|
|
|
|
std::vector<std::pair<size_t, size_t>>* intervals );
|
2015-12-02 06:39:16 -06:00
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
private:
|
2022-02-14 04:49:37 -06:00
|
|
|
std::vector<double> m_propertyValues;
|
2019-11-19 06:19:56 -06:00
|
|
|
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> m_depths;
|
|
|
|
bool m_isExtractionCurve;
|
2020-01-08 03:31:01 -06:00
|
|
|
double m_rkbDiff;
|
2022-02-14 04:49:37 -06:00
|
|
|
bool m_useLogarithmicScale;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
|
|
|
std::vector<std::pair<size_t, size_t>> m_intervalsOfContinousValidValues;
|
2015-10-15 05:41:12 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RiaDefines::DepthUnitType m_depthUnit;
|
2022-02-14 04:49:37 -06:00
|
|
|
QString m_propertyValueUnitString;
|
2019-09-06 03:40:57 -05:00
|
|
|
};
|