An example of loading a well dataset from a .las file using its default settings:
wellData = WellData("F:\\Data\\Segy\\Attributes\\WellDataFile.las")
An example of loading a well dataset using a given trajectory XML string (string divided into lines for easier reading):
XMLString = '<Mapping>
<FileDescriptor AzimuthColumn="5" DepthUnit="m" InclinationColumn="6"
MeasuredDepthColumn="3" TrueValueDepthColumn="4"
WellHeadDelimiter="whitespace & tab" WellHeadXCoordColumn="5"
WellHeadXCoordLine="3" WellHeadYCoordColumn="5"
WellHeadYCoordLine="4" X-CoordinatesColumn="1"
Y-CoordinatesColumn="2" delimiter="whitespace & tab"
hasXYCoordColumns="true" isManualKb="true" kb="0" kbColumn="4"
kbDelimeter="whitespace & tab" kbRow="5" noOfLinesToSkip="0"/>
</Mapping>'
wellData = WellData("F:\\Data\\Segy\\Attributes\\WellDataFile.las", XMLString)
With the above constructor, the deviation file is assumed to be the filepath of your .las ending instead with .dev (in this example,
"F:\\Data\\Segy\\Attributes\\WellDataFile.dev"). If you have a deviation file that doesn't match names, use the constructor below to pass a deviation file:
wellData = WellData("F:\\Data\\Segy\\Attributes\\WellDataFile.las", "F:\\Data\\Segy\\Attributes\\Deviation.dev", XMLString)
An example of data chooser for selecting one file:
chooser = WellDataChooser()
wellData = chooser.getSelectedData()
An example of data chooser for selecting multiple files:
chooser = MultipleWellDataChooser()
wellDataArray = chooser.getSelectedData()
Example of getting all range key names for a well dataset:
keyNamesArray = wellData.getKeyNames()
Using this information, you can access specific key range information by using the following method:
tvdMin = wellData.getKeyMinimum("TVD")
tvdMax = wellData.getKeyMaximum("TVD")
Example of getting all markers for a well dataset:
markerArray = wellData.getAllMarkers()
Example of getting all marker names for a well dataset:
markerNameArray = wellData.getAllMarkerNames()
Example of getting a marker's measured depth:
markerMDValue = marker.getMD()
Example of getting all data curves in a well dataset
logCurveArray = wellData.getAllCurves()
Example of getting all data curve names in a well dataset:
logCurveNamesArray = wellData.getAllCurveNames()
Using this information, you can access a specific curve by using the following method:
specificLogCurve = wellData.getCurve("specificLogCurveName")
Example of finding the measured depth range of the curve:
minMD = logCurve.getMDMinimum()
maxMD = logCurve.getMDMaximum()
Example of creating a LogCurveReader by selecting a range of measured depth values in the curve:
curveReader = logCurve.select()
The above will select the entirety of the curve. To select a specific data range, use the example below:
curveReader = logCurve.select(minMD, maxMD)
You can also create LogCurveReader by passing a MeasuredDepthRangeQuery:
query = MeasuredDepthRangeQuery(logCurve.getMDMinimum(), logCurve.getMDMaximum())
curveReader = logCurve.select(query)
You can also add a decimation to the query:
query = MeasuredDepthRangeQuery(logCurve.getMDMinimum(), logCurve.getMDMaximum(), 0)
curveReader = logCurve.select(query)
Example of getting all deviations in a well dataset:
deviationArray = wellData.getAllDeviations()
Example of getting all deviation names in a well dataset:
deviationNamesArray = wellData.getAllDeviationNames()
Using this information, you can access a specific curve by using the following method:
specificDeviation = wellData.getDeviation("specificDeviationName")
You can use the LogCurveReader for deviations just the same as you can for regular LogCurves. See above for some code examples
Example of getting all log arrays from a well dataset:
logArrays = wellData.getAllLogArrays()
Example of getting all log array names from a well dataset:
logArrayNames = wellData.getAllLogArrayNames()
Beyond this, Log Arrays operate similarly to Log Curves, and share the same methods.
Example of getting the trajectory from a well dataset:
trajectory = wellData.getTrajectory()
Example of getting the XML string of the trajectory descriptor file of the well dataset:
trajectoryXML = wellData.getTrajectoryDescriptorXML()
Example of getting the CRS Mode of the trajectory:
crsMode = trajectory.getCRSMode()
Example of getting the EPSG Code of the trajectory:
epsgCode = trajectory.getEPSGCode()
Example of getting the KB of the trajectory:
kB = trajectory.getKB()
Example of selecting a section of the trajectory based on a given MeasureDepthRangeQuery:
trajectoryReader = trajectory.select(query);
Example of getting the top's TVD and MD values:
tvd = trajectory.getTopTVD()
md = trajectory.getTopMD()
INTViewer provides a quick way to add calculated log curves from the user interface.
Right-click the "Log Curves' node to open the following formula dialog, and enter the formula of your choice using the log curve names as variables.
After clicking OK, the log curve will be added to the well log track.
You can perform the same function programmatically using this code as a template:
wellData=WellData('F:/Data/34_10-A-9H.las')
logCurve=LogCurve('Log Curve', wellData, 'Custom', 'Calculated from Formula', 'RHOB/DT', 'nounit')
wellData.addLogCurve(logCurve)
Follow this tutorial for an example on how to perform complex calculations.