コード例 #1
0
        public void TestSetUp()
        {
            _logGenerator      = new Log200Generator();
            _wellboreReference = new DataObjectReference
            {
                ContentType = EtpContentTypes.Witsml200.For(ObjectTypes.Wellbore),
                Title       = _logGenerator.Name("Wellbore"),
                Uuid        = _logGenerator.Uid()
            };

            _timeLog = new Log()
            {
                TimeDepth = "Time", Citation = _logGenerator.CreateCitation(_logGenerator.Name("Citation")), Wellbore = _wellboreReference, Uuid = _logGenerator.Uid()
            };
            _depthLog = new Log()
            {
                TimeDepth = "Depth", Citation = _logGenerator.CreateCitation(_logGenerator.Name("Citation")), Wellbore = _wellboreReference, Uuid = _logGenerator.Uid()
            };

            _measuredDepthIndex = _logGenerator.CreateMeasuredDepthIndex(IndexDirection.increasing);
            _dateTimeIndex      = _logGenerator.CreateDateTimeIndex();
            _elapseTimeIndex    = _logGenerator.CreateElapsedTimeIndex(IndexDirection.increasing);

            _booleanPointMetadata = _logGenerator.CreatePointMetadata("confidence", "confidence", EtpDataType.boolean);
            _floatPointMetadata   = _logGenerator.CreatePointMetadata("Confidence", "Confidence", EtpDataType.@float);

            _depthLogChannelSet = _logGenerator.CreateChannelSet(_depthLog);
            _depthLogChannelSet.Index.Add(_measuredDepthIndex);
            _depthLogChannelSet.Index.Add(_dateTimeIndex);
            _depthLogChannelSet.Channel.Add(_logGenerator.CreateChannel(_depthLog, _depthLogChannelSet.Index, "Rate of Penetration", "ROP", UnitOfMeasure.mh, "Velocity", EtpDataType.@double, pointMetadataList: _logGenerator.List(_booleanPointMetadata)));
            _depthLogChannelSet.Channel.Add(_logGenerator.CreateChannel(_depthLog, _depthLogChannelSet.Index, "Hookload", "HKLD", UnitOfMeasure.klbf, "Force", EtpDataType.@double, null));
            _timeLogChannelSet = _logGenerator.CreateChannelSet(_timeLog);
            _timeLogChannelSet.Index.Add(_elapseTimeIndex);
            _timeLogChannelSet.Channel.Add(_logGenerator.CreateChannel(_timeLog, _timeLogChannelSet.Index, "Rate of Penetration", "ROP", UnitOfMeasure.mh, "Velocity", EtpDataType.@double, pointMetadataList: _logGenerator.List(_floatPointMetadata)));
        }
コード例 #2
0
        public void Log200Generator_Can_Generate_Depth_Log_Data_MultiChannelSet()
        {
            var channelSet2 = _logGenerator.CreateChannelSet(_depthLog);

            channelSet2.Index.Add(_measuredDepthIndex);
            channelSet2.Index.Add(_dateTimeIndex);
            channelSet2.Channel.Add(_logGenerator.CreateChannel(_depthLog, channelSet2.Index, "GR", "GR", UnitOfMeasure.gAPI, "gamma_ray", EtpDataType.@double, pointMetadataList: _logGenerator.List(_floatPointMetadata)));

            var channelSetList = new List <ChannelSet> {
                _depthLogChannelSet, channelSet2
            };
            var numDataValue = 150;

            _logGenerator.GenerateChannelData(channelSetList, numDataValue);
            Assert.AreEqual(2, channelSetList.Count);
            Assert.AreEqual(2, channelSetList[0].Channel.Count);
            Assert.AreEqual(1, channelSetList[1].Channel.Count);

            var dataValues = _logGenerator.DeserializeChannelSetData(channelSetList[0].GetData());

            Assert.AreEqual(numDataValue, dataValues.Count);
            Assert.AreEqual(2, dataValues[0].Count);
            Assert.AreEqual(2, dataValues[0][0].Count);
            Assert.AreEqual(2, dataValues[0][1].Count);

            dataValues = _logGenerator.DeserializeChannelSetData(channelSetList[1].GetData());
            Assert.AreEqual(numDataValue, dataValues.Count);
            Assert.AreEqual(2, dataValues[0].Count);
            Assert.AreEqual(2, dataValues[0][0].Count);
            Assert.AreEqual(1, dataValues[0][1].Count);
        }