mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-10 08:03:05 -06:00
#821 Implemented a method to do resampling of the well log data. Untested.
This commit is contained in:
parent
0fc911e50b
commit
5e9308f7b3
@ -175,6 +175,55 @@ std::vector< std::pair<size_t, size_t> > RigWellLogCurveData::polylineStartStopI
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateReSampeledCurveData(double newMeasuredDepthStepSize)
|
||||
{
|
||||
std::vector<double> xValues;
|
||||
std::vector<double> measuredDepths;
|
||||
std::vector<double> tvDepths;
|
||||
|
||||
size_t segmentStartIdx = 0;
|
||||
|
||||
if(m_measuredDepths.size() > 0)
|
||||
{
|
||||
double currentMd = m_measuredDepths[0];
|
||||
|
||||
while(segmentStartIdx < m_measuredDepths.size() - 1)
|
||||
{
|
||||
double segmentStartMd = m_measuredDepths[segmentStartIdx];
|
||||
double segmentEndMd = m_measuredDepths[segmentStartIdx + 1];
|
||||
double segmentStartX = m_xValues[segmentStartIdx];
|
||||
double segmentEndX = m_xValues[segmentStartIdx +1];
|
||||
double segmentStartTvd = tvDepths[segmentStartIdx];
|
||||
double segmentEndTvd = tvDepths[segmentStartIdx +1];
|
||||
|
||||
while(currentMd <= segmentEndMd)
|
||||
{
|
||||
measuredDepths.push_back(currentMd);
|
||||
double endWeight = (currentMd - segmentStartMd)/ (segmentEndMd - segmentStartMd);
|
||||
xValues.push_back((1.0-endWeight) * segmentStartX + endWeight*segmentEndX);
|
||||
|
||||
// The tvd calculation is a simplification. We should use the wellpath, as it might have a better resolution, and have a none-linear shape
|
||||
// This is much simpler, and possibly accurate enough ?
|
||||
|
||||
tvDepths.push_back((1.0-endWeight) * segmentStartTvd + endWeight*segmentEndTvd);
|
||||
|
||||
currentMd += newMeasuredDepthStepSize;
|
||||
}
|
||||
|
||||
segmentStartIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
cvf::ref<RigWellLogCurveData> reSampledData = new RigWellLogCurveData;
|
||||
|
||||
reSampledData->setValuesWithTVD(xValues, measuredDepths, tvDepths, m_depthUnit);
|
||||
|
||||
return reSampledData;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -59,6 +59,7 @@ public:
|
||||
std::vector<double> measuredDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const;
|
||||
std::vector< std::pair<size_t, size_t> > polylineStartStopIndices() const;
|
||||
|
||||
cvf::ref<RigWellLogCurveData> calculateReSampeledCurveData(double newMeasuredDepthStepSize);
|
||||
private:
|
||||
void calculateIntervalsOfContinousValidValues();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user