Borehole

class wellcad.com.Borehole(dispatch)
add_log(log)

Adds the log object passed as argument of the function into the calling borehole document.

Parameters:

log (Log) – An object of the log to copy.

Returns:

A copy of the log.

Return type:

Log

adjust_image_brightness_and_contrast(log=None, prompt_user=None)

Adjusts the brightness and contrast in RGB logs

Parameters:
  • log (str or int, optional) – A string specifying the log name or an integer representing the index of the log to be processed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False, the new brightness and contrast values will be determined automatically.

adjust_pick_to_extremum(fws_log=None, arrival_log=None, prompt_user=None, config=None)

Adjusts the pick given in arrival_log to the next maximum or minimum amplitude in fws_log.

Parameters:
  • fws_log (int or str, optional) – Zero based index or title of the fws log. If not provided, the process dialog box will be displayed.

  • arrival_log (int or str, optional) – Zero based index or title of the arrival time log. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [AdjustPickToExtremum]
    PickPositivPolarity = yes
    FilterWidth = 5
    

Returns:

Object of the log containing the pick times shifted to the nearest amplitude extremum.

Return type:

Log

allow_export_file(enable, password)

Changes the protection status for exporting data.

Parameters:
  • enable (bool) – Set to True to allow the export of data from the borehole document.

  • password (str) – The password used to allow this option.

allow_insert_annotation(enable, password)

Changes the protection status for inserting annotations.

Parameters:
  • enable (bool) – Set to True to allow adding new annotations in the borehole document.

  • password (str) – The password used to allow this option.

allow_insert_log(enable, password)

Changes the protection status for inserting new logs.

Parameters:
  • enable (bool) – Set to True to allow adding new logs to the borehole document.

  • password (str) – The password used to allow this option.

allow_modify_annotation(enable, password)

Changes the protection status to modify annotations.

Parameters:
  • enable (bool) – Set to True to allow editing existing annotations in the borehole document.

  • password (str) – The password used to allow this option.

allow_modify_headers_content(enable, password)

Changes the protection status of the header content.

Parameters:
  • enable (bool) – Set to True to allow edition of the document header data.

  • password (str) – The password used to allow this option.

allow_save_template(enable, password)

Changes the protection status for saving layout templates.

Parameters:
  • enable (bool) – Set to True to allow saving layout templates of the borehole document.

  • password (str) – The password used to allow this option.

apply_conditional_testing(log_if=None, log_then=None, prompt_user=None, config=None)

Applies conditional testing (If-Then-Else) to image log values.

Parameters:
  • log_if (str or int, optional) – Zero based index (integer) or title (string) of the log used for the ‘If’ clause.

  • log_then (str or int, optional) – Zero based index (integer) or title (string) of the log used for the ‘Then’ clause.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ApplyConditionalTesting]
    Condition = != / <= / >= / > / < / ==
    ConditionValue = 100.0
    IsSecondCondition = yes / no
    SecondLogTest = <title of second log to test>
    OperatorSecondCondition = AND / OR
    SecondCondition = != / <= / >= / > / < / ==
    SecondConditionValue = 120.0
    ThenValue = NULL
    ElseValue = Amplitude
    

Returns:

A newly created log.

Return type:

Log

apply_natural_gamma_borehole_correction(log=None, prompt_user=None, config=None)

Applies borehole corrections to FWS and Well logs

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [BoreholeConditionCorrections]
    DeadTime = 7.2 ' in us
    EnableDeadTime = yes
    EnableFactors = yes
    FactorName1 = Water Factor
    FactorName2 = Pipe Factor
    Top1 = 0.0
    Bot1 = 2.85
    Factor1-1 = 1
    Factor1-2 = 1.49
    Top2 = 2.85
    Bot2 = bot
    Factor2-1 = 1.12
    Factor2-2 = 1
    

Returns:

A log containing the corrected count rates.

Return type:

Log

apply_semblance_processing(prompt_user=None, config=None)

Performs a velocity analysis for the multiple receivers.

Parameters:
  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file. The configuration file can contain the following options:

    [ApplySemblanceProcessing]
    Rx1_Log = RX1
    Rx1_Offset = 0.0
    Rx1_TxDistance = 0.6
    Rx1_Unit = m
    Rx2_Log = RX2
    Rx2_Offset = 0.0
    Rx2_TxDistance = 0.8
    Rx2_Unit = m
    Rx3_Log= ...
    
    [FwsVelocityAnalysis]
    EnableFilter=false
    FreqFilterLowPass=2.5 ; in kHz
    FreqFilterLowPass=5.0
    FreqFilterHighPass=30.0
    FreqFilterHighCut=35.0
    ToolDiameter=50.0
    ToolDiameterUnit=mm ;mm, cm, inch
    BoreholeDiameter=100.0
    BoreholeDiameterUnit=mm ;mm, cm, inch
    FluidSlowness=666.67
    FluidSlownessUnit=us/m ; us/ft, us/m, ft/us, m/s, us/m
    

Returns:

The log containing the semblance results.

Return type:

Log

apply_stand_off_correction(log=None, prompt_user=None, config=None)

Corrects intercept times for the stand-off of tool and formation.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog settings will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ApplyStandOffCorrection]
    ; LogUnit : s, ms, msec, us, usec, sec
    ; ToolSpacingUnit, ToolDiameterUnit, HoleDiameterUnit : m, mm, inch, cm, ft
    ; FluidVelocityUnit : us/ft, us/m, ft/us, m/s
    ; VelocityUnit : us/ft, us/m, ft/us, m/s
    ; HoleDiameter, FluidVelocity : log name or constant
    LogUnit=us
    ToolSpacing=0.6
    ToolSpacingUnit=m ; m, mm, inch, cm, ft
    ToolDiameter=50
    ToolDiameterUnit=mm
    HoleDiameter=100
    HoleDiameterUnit=mm
    FluidVelocity=1500
    FluidVelocityUnit=m/s
    VelocityUnit=m/s
    

Returns:

The resulting log.

Return type:

Log

apply_structure_apparent_to_true_correction(log=None, prompt_user=None, config=None)

Corrects the apparent azimuth and dip angles in a Structure log

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    
    

    [ApplyStructureApparentToTrueCorrection] AzimuthLog = azimuth log name TiltLog = tilt log name ReferenceIsNorth = yes / no

Returns:

The corrected log.

Return type:

Log

apply_structure_true_to_apparent_correction(log=None, prompt_user=None, config=None)

Recalculates the apparent azimuth and dip angles in a Structure log from the true structure angles.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ApplyStructureApparentToTrueCorrection]
    AzimuthLog = azimuth log name
    TiltLog = tilt log name
    ReferenceIsNorth = yes / no
    

Returns:

The computed log.

Return type:

Log

apply_template(path, prompt_if_not_found=None, create_new_logs=None, create_new_layers=None, apply_annotation_settings=None, replace_header=None, keep_charts=None, new_charts=None, overwrite_workspaces=None, new_workspaces=None, delete_non_associated_logs=None, config=None)

Loads and applies a document layout template (.WDT)

Parameters:
  • path (str) – The path and name of the template WDT file.

  • prompt_if_not_found (bool, optional) – If True, a dialog box will be displayed for each log not found. Default : True.

  • create_new_logs (bool, optional) – If True, new logs will be loaded from the template. Default : False.

  • create_new_layers (bool, optional) – If True, new annotation layers will be loaded from the template. Default : False.

  • apply_annotation_settings (bool, optional) – If True, settings will be applied to annotations. Default : False.

  • replace_header (bool, optional) – If True, the current document header will be replaced. Default : True.

  • keep_charts (bool, optional) – If True, cross-plot charts will be kept in the document. Default : True.

  • new_charts (bool, optional) – If True, cross-plot charts will be loaded from the template. Default : False.

  • overwrite_workspaces (bool) – If True, work spaces in the document will be overwritten. Default : False.

  • new_workspaces (bool, optional) – If True, work spaces will be loaded from the template. Default : False.

  • delete_non_associated_logs (bool, optional) – If True, only logs from the template will be kept in the document. Default : True.

  • config (str, optional) – Path and filename of the configuration file or parameter string.

Returns:

True if successful, False otherwise.

Return type:

bool

apply_total_gamma_calibration(log=None, prompt_user=None, config=None)

Applies a calibration factor or equation to the values in the specified Well Log.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [BoreholeConditionCorrections]
    K-Factor=2*0.00001028
    

Returns:

A log containing the modified gamma values.

Return type:

Log

auto_joint_detection(log, prompt_user=None, config=None)

Detects the joints from the main log (data source) used in the workspace.

Note: only compatible with WellCAD version 5.7 and onwards.

Parameters:
  • log (str or int) – The title or the zero based index of the log. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [AutoJointDetection]
    Sensitivity = 5
    TopAndBottom = yes
    

property auto_update

The auto update status of the borehole.

Type:

bool

average_filter_fws_log(log=None, filter_width=None, filter_type=None)

Applies a moving average filter to the traces of an FWS log.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns None.

  • filter_width (float, optional) – Length of the filter window in us. If not provided, default value will be used.

  • filter_type (int, optional) –

    If not provided, default value will be used. Type of the filter :

    • 0 = moving average

    • 1 = weighted average

Returns:

The resulting log.

Return type:

Log

block_log(log=None, prompt_user=None, config=None)

Calculates statistical values for each depth interval determined from a reference log or specified by the user.

Parameters:
  • log (str or int, optional) – The title or the zero based index of the log.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [BlockLog]
    CircularData = yes / no
    DataUnit = degrees / radians
    ReferenceInterval = Lithology / 10.0
    Cumulate = yes / no
    OutputLogAsText = yes / no
    OutputLogAsGraphic = yes / no
    Minimum = yes / no
    Maximum = yes / no
    Mode = yes / no
    Average = yes / no
    Median = yes / no
    StdDev = yes / no
    Percentage = yes / no
    Sum = yes / no
    SumNorm= yes / no
    Area = yes / no
    MeanAbsoluteDeviation = yes / no
    GeometricMean = yes / no
    GeometricStdDev = yes / no
    Skewness = yes / no
    Kurtosis = yes / no
    Quartiles = yes / no
    AveragePlusStdDev = yes / no
    AverageMinusStdDev = yes / no
    RMS = Yes / No
    Value1 = 50 / NULL
    Value2 = 100
    Resolution = 0.1
    EmptyIntervalMode = Interpolate / Maximum / Minimum / Null
    

bond_index(log=None, prompt_user=None, config=None)

Computes the bond index of the cement behind the casing.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [FwsBondIndex]
    CementAmplitude = 2 'in mV
    FreePipeAmplitude = 62.2 'in mV
    

Returns:

The resulting log containing the bond index.

Return type:

Log

property bottom_depth

The bottom depth of a borehole in units of the master depth axis.

Type:

float

breakout_auto_pick(log=None, prompt_user=None, config=None)

Autodetects breakouts from a travel time or radius image log.

The return value is a breakout log. Additionally, a log representing breakout “length” (radial breakout distance) is added to the borehole document.

Parameters:
  • log (int or str, optional) – Title or index of the log containing travel time or radius values.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [BreakoutAutoPick]
    ; input : log
    ; output : log
    
    Sensitivity = 5
    

Returns:

A breakout log of the detected breakouts

Return type:

Log

calculate_acoustic_caliper(log=None, prompt_user=None, config=None)

Calculates borehole radius and caliper values from acoustic travel time measurements.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CalculateAcousticCaliper]
    ; CaliperUnit : mm, cm, in
    ; FluidVelocityUnit : m/s, km/s, m/ms, m/us, ft/s, ft/ms, ft/us, s/km, s/m, us/m, s/ft, us/ft
    ; ToolRadius : in mm
    TravelTimeUnit = 0.1
    CaliperUnit = mm
    ToolRadius = 19
    TimeWindow = TimeWndLog / 74
    FluidVelocity = VelocityLog / 1440
    FluidVelocityUnit= m/s
    CurveOutput = yes / no
    ImageOutput  = yes / no
    

calculate_apparent_metal_loss(log=None, prompt_user=None, config=None)

Calculates an apparent metal loss value for each trace of radius values stored in an image log.

Note: This function is deprecated in WellCAD 5.7 and onwards. Please use calculate_apparent_metal_loss_ex instead.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CalculateApparentMetalLoss]
    ; The units of the internal / external pipe radius values must be the same as the unit
    ; of the radius values in the image log.
    InternalPipeRadius = 1.9
    ExternalPipeRadius = 2.2
    

Returns:

A log giving the metal loss.

Return type:

Log

calculate_apparent_metal_loss_ex(log=None, prompt_user=None, config=None)

Calculates an apparent metal loss value for each trace of radius/thickness values stored in an image log or well log.

Note: only compatible with WellCAD version 5.7 and onwards.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, either here or in the config, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [MetalLoss]
    ; ID : name of a well log or img log
    ; Thickness : name of a well log or img log
    ; NomOD : name of a well log or value
    ; NomThickness : name of a well log or value
    ; NomODUnit, NomThicknessUnit : inch or mm, default to mm
    ; DepthRange : Maximum, UserDefined, Zones, LogZones
    ; ZonesDepthRange : top1, bot1, top2, bot2, ... topN, botN
    ; LogZonesDepthRange = logname, depthsectionName1, depthsectionName2, ....depthsectionname3
    ID=
    Thickness=
    NomOD=50
    NomODUnit=mm
    NomThickness=10
    NomThicknessUnit=mm
    DepthRange=Maximum
    TopDepth = 10
    BottomDepth = 19
    ZonesDepthRange=
    LogZonesDepthRange = Litho,06,05#1
    

calculate_borehole_closure(prompt_user=None, config=None)

Calculates the deviation path closure distance, closure angle and DLS.

Parameters:
  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CalculateBoreholeClosure]
    ; AzimuthLog : the title of the log corresponding to the azimuth.
    ; TiltLog : the title of the log corresponding to the tilt.
    ; NorthingLog : the title of the log corresponding to the deviation along the north axis.
    ; EastingLog : the title of the log corresponding to the deviation along the east axis.
    AzimuthLog = AZI
    TiltLog = TILT
    NorthingLog = NORTH
    EastingLog = EAST
    

calculate_borehole_coordinates(prompt_user=None, config=None)

Calculates the deviation path coordinates Northing, Easting and TVD.

Parameters:
  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CalculateBoreholeCoordinates]
    ; Method : Classic Tangential, Balanced Tangential, Radius Of Curvature, MinimumCurvature
    ; AzimuthLog : the title of the log corresponding to the azimuth.
    ; TiltLog : the title of the log corresponding to the tilt.
    Method = Classic Tangential
    Unit = m / ft
    AzimuthLog = AZI
    TiltLog = TILT
    NewDepthLog = yes / no
    CountTVDFromLogTop = yes / no
    TVDStartDepth = 0.0
    MagDeclination = 11.5
    EstimateErrors = yes / no
    AziError = 0.1
    TiltError = 0.1
    

calculate_borehole_deviation(prompt_user=None, config=None)

Calculates borehole Azimuth, RBR and Tilt from magnetometer and inclinometer / accelerometer data.

Parameters:
  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CalculateBoreholeDeviation]
    ; MagX, MagY, MagZ : the title of the corresponding log
    ; InclX, InclY, InclZ : the title of the corresponding log
    MagX = Mag X
    MagY = Mag Y
    MagZ = Mag Z
    InclX = Acc X
    InclY = Acc Y
    InclZ =
    MagXPositive = yes / no
    MagYPositive = yes / no
    MagZPositive = yes / no
    InclXPositive = yes / no
    InclYPositive = yes / no
    InclZPositive = yes / no
    IsAccelerometer = yes / no
    MarkerPosition = 182.5
    

calculate_borehole_volume(prompt_user=None, config=None)

Calculates the volume of an entire hole or annulus (e.g. between casing and borehole wall) from an Image logs containing radius values or a Well logs providing caliper values.

Parameters:
  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    Note: This configuration is for WellCAD version 5.7 and onwards. For prior version, see the next section.

    [VolumeProcess]
    ; OuterDiam, InnerDiam : name of a well log, img log or a constant value
    ; OuterDiamUnit, InnerDiamUnit : inch or mm, default to mm
    ; OuterDiam1, InnerDiam1 : name of a well log, img log or a constant value.
    ; Use either OuterDiam, InnerDiam or OuterDiam1, InnerDiam1 but not both !
    ; OuterDiamUnit1, InnerDiamUnit1 : inch or mm, default to mm.
    ; Use either OuterDiamUnit, InnerDiamUnit or OuterDiamUnit1, InnerDiamUnit1 but not both !
    ; OuterDiam2, InnerDiam2 : name of a well log
    ; OuterDiamUnit2, InnerDiamUnit2 : inch or mm, default to mm
    ; IntervalRef : name of a well log or value (if value, in depth units of the borehole doc)
    ; DepthRange : Maximum, UserDefined, Zones, LogZones
    ; LogZonesDepthRange=logname, depthsectionName1, depthsectionName2, ....depthsectionname3
    OuterDiam=
    OuterDiamUnit=mm
    InnerDiam=
    InnerDiamUnit=mm
    OuterDiam1=w_diam_ext
    OuterDiamUnit1=mm
    OuterDiam2=
    OuterDiamUnit2=mm
    OuterDiam3=
    OuterDiamUnit3=mm
    OuterDiam4=
    OuterDiamUni4t=mm
    InnerDiamUnit=mm
    InnerDiam1=
    InnerDiamUnit1=mm
    OuterDiamAsDiameter=yes
    InnerDiamAsDiameter=yes
    AnnularVolume=no
    BottomToTop=yes
    VolumeUnit=litre
    DisplayTick=no
    SmallTickFreq=1
    MediumTickFreq=10
    LargeTickFreq=100
    DisplayNumerical=no
    NumericalFreq=10
    NbDecimals=2 ; Specify the number of digits if DisplayNumerical is on.
    DisplayInterval=no
    IntervalRef=10
    DisplayCurve=yes
    DepthRange=Maximum
    TopDepth=10
    BottomDepth=19
    ZonesDepthRange=
    LogZonesDepthRange=Litho,06,05#1
    

calculate_casing_thickness(log=None, prompt_user=None, config=None)

Calculates thickness values for a casing pipe from acoustic thickness travel time measurements.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CalculateCasingThickness]
    ; ThicknessUnit : mm, cm, in
    ; SteelVelocityUnit : m/s, km/s, m/ms, m/us, ft/s, ft/ms, ft/us, s/km, s/m, us/m, s/ft, us/ft
    ; CurveOutput : output min, max, average thickness
    ; ImageOutput  : output the thickness as an image log
    TravelTimeUnit = 0.01
    SteelVelocity = VelocityLog / 5200
    SteelVelocityUnit= m/s
    CurveOutput = yes / no
    ImageOutput = yes / no
    

calculate_fluid_velocity(log=None, prompt_user=None, config=None)

Estimates the fluid velocity from travel time measurements and given calibration points.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CalculateFluidVelocity]
    ; If the AutoFill option is used the CalibrationPoints are not used.
    ; ToolRadius : in mmm
    ; TimeWindow : log name or value
    ; CalibrationPoint1 : depth, diameter in mm
    ; AutoFillFrom : depth value or 'Top'
     ; AutoFillTo : depth value or 'Bottom'
    TravelTimeUnit = 0.1
    ToolRadius = 19
    TimeWindow = TimeWndLog / 74
    CalibrationPoint1 = 20.44, 96
    CalibrationPoint2 = 36.85, 96
    CalibrationPoint3 = ...
    ExtendTrends = yes / no
    AutoFillFrom = 0 / Top
    AutoFillTo = 0 / Bottom
    AutoFillCaliper = 0 / Log Name
    AutoFillStepSize = 1.0
    

Returns:

A log giving the fluid velocity.

Return type:

Log

calculate_mechanical_properties(p_slowness=None, s_slowness=None, density=None)

Computes a set of rock mechanical parameters from the input data.

Parameters:
  • p_slowness (int or str, optional) – Zero based index or title of the log containing the p-slowness data. If not provided, the process dialog box will be displayed.

  • s_slowness (int or str, optional) – Zero based index or title of the log containing the s-slowness data. If not provided, the process dialog box will be displayed.

  • density (int or str, optional) – Zero based index or title of the log containing the density data.

calculate_spectrum_total_count(log=None, prompt_user=None, config=None)

Extracts the total count, min, max, average or median from each spectrum trace of the specified log

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [SpectralGamma_Statistic]
    ; WinLow, WinHigh expressed in channel number or keV according to Channel
    Total = yes
    Min = yes
    Max = yes
    Ave = yes
    Median = yes
    UseWindow = yes
    Channel = yes
    WinLow = 410
    WinHigh = 2850
    

cased_hole_normalization(log=None, prompt_user=None, config=None)

Subtracts the trace average, median, min, max or a custom value from all data points of the same trace.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CasedHoleNormalization]
    ; Method : Mean, Median, Min, Max, Other
    ; The Value parameter is used when the Method has been set to Other
    ; Value : log name or constant numerical value
    Method = Mean
    Value = 10.5
    

Returns:

The resulting log.

Return type:

Log

cased_hole_ultrasonics(wavelet_log=None, zone_log=None, prompt_user=None, config=None)

Processes ultrasonic waveforms from a wavelet log using the processing parameters from a zone log.

Parameters:
  • wavelet_log (int or str, optional) – Zero based index or title of the wavelet log to process. If not provided, the process dialog box will be displayed.

  • zone_log (int or str, optional) – Zero based index or title of the zone log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CasedHoleUltrasonics]
    ; Thickness : output the thickness as an image log
    ; Cadi  : output the cadi as an image log
    ; Score  : output the score as an image log
    Thickness = yes / no
    Cadi = yes / no
    Score = yes / no
    

cement_bond(log=None, prompt_user=None, config=None)

Determines the cement bond based on the Standard Gate Method.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [CementBondProcess]
    ; Logs : comma-separated FWS log names of the receivers to be processed
    Logs=WVFS1,WVFS2,WVFS3
    AreRadiiSectors=no
    EnableT0Gate=yes
    EnableTXGate=no
    T0GateStart=237.4
    T0GateLength=40
    TXGateBlanking=0
    TXGateThreshold=15
    EnableCalibration=no
    BLGateStart=50
    BLGateLength=25
    FreePipeTargetAmplitude=100
    FreePipeTargetAmplitudeUnits=mV
    FreePipeTopDepth=0
    FreePipeBotDepth=0
    

centralize(log=None, prompt_user=None, config=None)

Corrects travel time or multi-finger-caliper data for de-centralization effects and outputs a new image log.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [Centralize]
    ; UseRange : use clipping range
    UseRange = yes / no
    CaliperLow = 0
    CaliperHigh = 0
    OutputEccentricity = yes / no
    OutputEccentricityDir = yes / no
    

Returns:

A log with the data corrected for decentralization.

Return type:

Log

check_formula(formula)

Verifies the syntax of a formula used in a Formula Log.

Parameters:

formula (str) – The formula that needs to be checked. Example: “({GR}-min({GR}))/(max({GR})- min({GR}))”

Returns:

Whether the formula is correct or not.

Return type:

bool

clear_log_contents(log)

Removes the data from a log and leaves the log empty.

Parameters:

log (str or int) – The title or the zero based index of the log to remove.

color_classification(log=None, prompt_user=None, config=None)

Builds color classes from an RGB Log based on user specified reference colors.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the RGB log to process.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ColorClassification]
    OutputImage = yes
    OutputAnalysis = yes
    NoiseReduction = 10
    Class1="Class 1";"0,255,0";58;50;"166,143,81"
    Class2="Class 2";"255,0,255";37;50;"44,42,34"
    Class3="Class 3";"255,255,0";34;50;"251,165,75"
    

Returns:

Returns an RGB Log or an Analysis Log depending on the configuration file. Returns the RGB Log if both options are selected.

Return type:

Log

compensated_velocity(log=None, prompt_user=None, config=None)

Slowness or velocity computed from two receiver arrival times.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log containing the travel times to the first receiver.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [FwsCompensatedVelocity]
    ; RX1Log, RX2Log : log name
    ; RX1LogUnit, RX2LogUnit : s, ms, msec, us, usec, sec
    ; SpacingUnit : m, mm, inch, ft, cm
    ; VelocityUnit : us/ft, us/m, ft/us, m/s
    RX1Log =RX1 - dt
    RX2Log = RX2 - dt
    RX1LogUnit = us
    RX2LogUnit = us
    Spacing = 0.2
    SpacingUnit = m
    VelocityUnit =us/m
    

Returns:

The resulting log.

Return type:

Log

compressive_strength(log=None, prompt_user=None, config=None)

Computes the compressive strength of the cement behind a casing.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. A cement bond amplitude log (Well or Mud log type) or amplitude map (Image log) can be used. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [FwsCompressiveStrength]
    CasingOD = 7 ' in inch
    CasingWeight = 23 ' in lbs/ft
    

Returns:

The resulting log containing the compressive strength.

Return type:

Log

compute_gr(log_k=None, log_u=None, log_th=None, prompt_user=None, config=None)

Computes total gamma ray from K, U and Th isotope concentrations using the MEDUSA calibration file.

Parameters:
  • log_k (int or str, optional) – Zero based index or title of the log containing the concentrations of K.

  • log_u (int or str, optional) – Zero based index or title of the log containing the concentrations of U.

  • log_th (int or str, optional) – Zero based index or title of the log containing the concentrations of Th.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [SpectralGammaMedusaCGR]
    CalibrationFilePath=C:\Tools\Calibrations\QL40-SGR-154904.mcf
    

Returns:

A log containing the gamma ray values.

Return type:

Log

connect_to(server_name, server_address, port_number)

Connects the current borehole document to an external data source provider.

Parameters:
  • server_name (str) – The name of the server (TFD is currently the only one supported)

  • server_address (str) – The IP address of the computer to connect to.

  • port_number (int) – The part number to connect to.

Returns:

True if successful, False otherwise.

Return type:

bool

convert_log_to(log, log_type, prompt_user=None, config=None)

New log object by converting one log type into another.

Please refer to the WellCAD documentation about which log type conversions are possible.

Parameters:
  • log (str or int) – The title or the zero based index of the log to convert.

  • log_type (int) – The type of log to be created.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ConvertLog]
    ; Analysis, Percentage Log to Litho log
    ; ComponentNames : list of component names to convert, if not specified all components are taken
    ComponentNames=A,B
    ; Bio Log to Bio Log
    ; TaxonNames : list of taxon names to convert, if not specified all taxons are taken
    TaxonNames=A,B
    ; Image, RGB Log to WellLog
    StartIndex=0
    Increment=1
    ; Breakout Log to Breakout, Mud Log
    FilterOnAttributes= yes / no
    AttributeName1=Type
    AttributeList1=RF,MB,…
    AttributeName2=Condition
    AttributeList2=Open,Loose,…
    FilterOnAzimuth= yes / no
    AzimuthLow=0
    AzimuthHigh=360
    FilterOnTilt= yes / no
    TiltLow=30
    TiltHigh=90
    FilterOnLength= yes / no
    LengthLow=0
    LengthHigh=100
    FilterOnOpening= yes / no
    OpeningLow=0
    OpeningHigh=45
    ; Comment Log to Litho Log
    LithoDatabase=C:/Default.lth
    ; CoreDesc Log to Interval Log
    ; CoreDescItemNames : list of symbol codes to convert
    CoreDescItemNames=AX3, AX5, BZ5
    ; Structure Log to Structure, Mud Log
    FilterOnAttributes=TRUE
    AttributeName1=Type
    AttributeList1=RF,MB
    AttributeName2=Condition
    AttributeList2=Open,Loose
    FilterOnAzimuth= yes / no
    AzimuthLow=0
    AzimuthHigh=360
    FilterOnTilt= yes / no
    DipLow=30
    DipHigh=90
    FilterOnOpening= yes / no
    ApertureLow=0
    ApertureHigh=100
    ; Structure, Breakout Log to Marker Log
    DisplayIndex= yes / no
    DisplayAzimuth= yes / no
    DisplayTilt= yes / no
    DisplayAttributes= yes / no
    ; Interval Log to Mud Log
    ; ConvertValue : 0=Min, 1=Max, 2=Ave
    ; AttachDepthTo : 1=attach to top, 2=middle, 3=bottom
    ConvertValue=0
    AttachDepthTo=2
    ; Mud Log to Well Log
    ; Interpolation : 0 = No Interpolation, 1 = Prev. Data, 2 = Interpol.
    CreateNewLog= yes / no
    SamplingRate=0.1
    MaximumGap=10.0
    Interpolation=0
    Tolerance=0.1
    CircularData = yes / no
    DataUnit = degrees / radians
    ; Mud Log to Depth Log
    ; ConversionType : 1=from m, 2=from ft, 3=from sec; 4=msec, 5=usec
    ConversionType=1
    ; Mud Log to Litho Log
    ; <ClassifierName>=<LithoName> (classification name and corresponding litho code)
    LithoDatabase=C:/Default.lth
    className1 = Coal
    className2 = Limestone
    ; Percent Log to Analysis Log
    SamplingRate=0.1
    ; RGB Log to Image Log (int, float 2 and float 4)
    ; Color : 0=all, 1=red, 2=green, 3=blue
    Color=0
    ; Stack Log to Well Log
    SamplingRate=0.1
    ; Strata Log to Comment, Litho Log
    ; ColumnNames : list of column titles
    ColumnNames=columnname1, columname4
    ; VSP Log to Well Log
    ; TraceNames : list of trace titles
    TraceNames=
    ; Well Log to Depth Log
    ; ConversionType : 1=from m, 2=from ft, 3=from sec; 4=msec, 5=usec
    ConversionType=1
    ; Well Log to Litho Log
    ; <ClassifierName>=<LithoName> (classification name and corresponding litho code)
    ; SplitLithoLog : creates one litho column per litho type
    LithoDatabase=C:/Default.lth
    className1 = Coal
    className2 = Limestone
    SplitLithoLog= yes / no
    ; Litho Log to Strata Log
    ; SplitColumns : creates one column per litho type
    SplitColumns= yes / no (creates one column per litho type)
    ; Litho Log to Litho Log
    ; LithoBedNames : list of litho codes to convert, if not specified all components are taken
    LithoBedNames=sst,lst,dst
    

Returns:

The object of the new log.

Return type:

Log

correct_bad_traces(log=None)

Replaces NULL data traces in Image, RGB and FWS logs.

Parameters:

log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

correct_dead_sensor(log=None, prompt_user=None, config=None)

Corrects the Null and invalid data columns in Image logs.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [DeadSensor]
    ; Method : Automatic, Range, Columns
    ; ReplaceBy : Null, Average, Median, Interpolate, LogName or a numerical value
    Method = Automatic
    ReplaceBy = Average
    ; If Method = Automatic
    WindowHeight = 0
    Discrimination = 0.125
    MinDataHeight = 0
    ; If Method = Range
    WindowHeight = 0
    Low = 0
    High = 0
    ; If Method = Columns
    ; Columns : single index value or range like 15-20
    Columns = 1
    

Returns:

A log with the corrected data.

Return type:

Log

create_linked_log(log)

Creates a linked log that shares data with the specified log.

Parameters:

log (str or int) – The title or the zero based index of the log to create the linked log from.

create_new_workspace(workspace_type, config)

Creates a new workspace object.

Parameters:
  • workspace_type (int) –

    • 1 = ISI workspace

    • 2 = Casing integrity

    • 3 = NMR

  • config (str) –

    Path to a configuration file containing the workspace initialization parameters. The configuration file can contain the following options:

    [ISIWorkspace]
    Name= workspace name
    Log= log name
    Caliper=100
    DepthOfImage=0
    CaliperUnit=mm / inch
    ApertureUnit=mm / inch/10
    LengthUnit=m / mm / cm / ft / inch / inch/10
    RunApparentToTrue=yes
    Azimuth= log name
    Tilt= log name
    ImageOrientation=North / High Side
    RunRecalculateAzimuth=yes
    RotationAngle=-12
    NavigationLog=ICM (log name or nothing)
    ' RGB OTV image
    ImageType= 0,
    'Greyscale OTV image.
    ImageType=1
    ' Diamond-drilled hole, ATV image
    ImageType=2
    'RC-drilled hole, ATV image
    ImageType=3
    'FMI image
    ImageType=4
    ICMPalette=0,0,0,255,56,255,0,0,12,64,224,208,21,50,205,50,31,255,255,0,39,255,215,0,47,255,104,32
    [CasingIntegrityWorkspace]
    Name= workspace name
    Log= log name
    LogUnit=mm / inch
    DataType=radius / diameter
    DrillerCasingTable=C:/Temp/Table.txt
    DrillerCasingTableDepthUnit=meters / feet
    DrillerCasingTableWeightUnit=lbs/ft / kg/m
    DrillerCasingTableODUnit=inch / mm
    [NMRWorkspace]
    Name= workspace name
    T2Distribution= log name
    TraceUnitOfT2Distribution=milliseconds / seconds
    DefaultLithoDatabase=C:/Program Files/Advanced Logic Technology/WellCAD/Dictionaries/NMR Volumes.lth
    FluidVolumeComponents=Bound Water, Moveable Water
    FluidVolumeLithoUseAssociatedColor=no
    DefaultCutoffValues=33
    LastDefaultCutoffValueMax=yes
    DisplayPermeabilityTIMModel=yes
    PermeabilityTIMModelVariableC=1 (i.e. premultiplier)
    PermeabilityTIMModelExponentM=4
    PermeabilityTIMModelExponentN=2
    PermeabilityTIMModelBFVandFFVLimit= Bound Water
    DisplayPermeabilitySDRModel=yes
    PermeabilitySDRModelVariableC=1 (i.e. premultiplier)
    PermeabilitySDRModelExponentM=4
    PermeabilitySDRModelExponentN=2
    DisplayDryMatrixDensity=no
    BulkDensity=Bulk_Density
    

Returns:

The new workspace object.

Return type:

Workspace

delete_metadata(id)

Removes a metadata id and value pair. Warning: if this metadata is used within a header, the metadata id will remain valid and it’s value will be set to null.

Only compatible with WellCAD version 5.7 and onwards.

Parameters:

id (str) – The metadata id.

property depth

The reference/master vertical axis. Can be in depth or time.

Type:

Depth

depth_match_log(log=None, depth_log=None)

Depth matches the specified log using the links created from the specified depth_log (i.e. a shift table).

Parameters:
  • log (str or int, optional) – The title or the zero based index of the log. If not provided, the Depth Matcher dialog box will be displayed.

  • depth_log (str or int, optional) – The title or the zero based index of the Depth log containing the shift table. If not provided, the Depth Matcher dialog box will be displayed.

depth_shift_log(log, shift, top_depth=None, bottom_depth=None)

Allows the depth shifting of the log’s data by the specified amount. By default, the entire data column will be shifted (i.e. block shift). If a Top and Bottom depth has been specified only the data within the specified interval will be shifted.

Parameters:
  • log (str or int) – The title or the zero based index of the log.

  • shift (float) – The amount of depth shift to be applied. A negative value will shift the data up and a positive value applies a downward shift.

  • top_depth (float, optional) – The upper depth limit of the shifted interval. If not provided, this is the current top depth of the log

  • bottom_depth (float, optional) – The lower depth limit of the shifted interval. If not provided, this is the current bottom depth of the log

disconnect_from(server_name, server_address)

Cuts the connection between the borehole document and the external data source provider.

Parameters:
  • server_name (str) – The name of the server (TFD is currently the only one supported)

  • server_address (str) – The IP address of the computer connected to.

Returns:

True if successful, False otherwise.

Return type:

bool

do_print(enable_dialog=None, top_depth=None, bottom_depth=None, nb_of_copies=None)

Sends the current document to the printer. If the print dialog box is displayed the user can select the printer otherwise the printer installed as default is used.

Parameters:
  • enable_dialog (bool, optional) – Whether to display the print dialog box or not.

  • top_depth (float, optional) – The start depth of the interval to print If not provided, the current top depth of the document will be used.

  • bottom_depth (float, optional) – The bottom depth of the printed depth interval. If not provided, the current bottom depth of the document will be used.

  • nb_of_copies (int, optional) – The number of copies to be printed.

ellipse_fitting(log=None, prompt_user=None, config=None)

Computes an image log with best fit ellipses from travel time or radius logs

Optionally, this will also add three extra logs to the workspace: * Semi-minor axis log * Semi-major axis log * Ellipse orientation (semi-major axis from 0 to 180 degrees)

Parameters:
  • log (int or str, optional) – Title or index of the log containing travel time or radius values.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [EllipseFitting]
    ; input : log (image log)
    ; output : log (image log)
    
    ClipLow = 0
    ClipHigh = 100
    EnableClipping = yes
    OutputEllipseParameters = yes
    

Returns:

An image log containing the ellipses calculated from the input log

Return type:

Log

elog_correction(prompt_user=None, config=None)

Applies the environmental corrections for normal resisitivity data.

Parameters:
  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ElogCorrection]
    ; Method : QL40-Elog (Bridle), QL40-Elog (Surface fish), Schlumberger
    ; LogN8 : the title of the log corresponding to the electrode N8.
    ; LogN16 : the title of the log corresponding to the electrode N16.
    ; LogN32 : the title of the log corresponding to the electrode N32.
    ; LogN64 : the title of the log corresponding to the electrode N64.
    ; LogNx : the title of the log corresponding to the electrode Nx.
    Method=QL40-Elog (Bridle)
    LogN8=N8
    LogN16=N16
    LogN32=
    LogN64=
    LogNx=
    ElectrodeSpacingNx=8
    ElectrodeSpacingNxUnit=inch (in inch, in, inches or mm)
    ElectrodeDiameter=1.57
    ElectrodeDiameterUnit=inch (in inch, in, inches or mm)
    BoreholeDiameter=2.20
    BoreholeDiameterUnit=inch (in inch, in, inches or mm)
    FluidResistivity=25 (log name or value in ohm.m)
    

Returns:

An object of the last corrected log.

Return type:

Log

enable_protection(enable, password)

Changes the protection status of a document using a password

Parameters:
  • enable (bool) – Set to True to protect the borehole document.

  • password (str) – The password used to allow this option.

extend_log(log, top_depth, bottom_depth)

Extends the allocated depth range of Well, Formula and Analysis Logs.

Parameters:
  • log (str or int) – The title or the zero based index of the Well log.

  • top_depth (float) – The new top depth of the log in units of the current depth axis.

  • bottom_depth (float) – The new bottom depth of the log in units of the current depth axis.

extract_color_components(log=None, method=None, color_model=None, prompt_user=None)

Allows the extraction of color data from an RGB Log.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • method (int, optional) –

    The methode used. Available models are:

    • 0 = Average

    • 1 = Mode

    • 2 = Image Log

  • color_model (int, optional) –

    The color model used. Available models are:

    • 0 = RGB

    • 1 = HSV

    • 2 = YUV

    • 3 = CIELAB

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

extract_e1_amplitude(fws_log=None, arrival_log=None, prompt_user=None)

Uses the E1 arrival time to extract the E1 amplitude.

Parameters:
  • fws_log (int or str, optional) – Zero based index or title of the log to process.

  • arrival_log (int, str or float, optional) – int, str : Zero based index or title of the log containing the first E1 arrival times. float : constant E1 arrival time

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user.

Returns:

The resulting log containing the E1 amplitude.

Return type:

Log

extract_grain_size_statistics(log=None, prompt_user=None, config=None)

Computes statistics from a grain size distribution curve.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log containing the grain size values. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [GrainSizeStatistics]
    ; Method : 0 = Logarithmic (original Folk and Ward; default),
    ; 1 = Geometric (modified Folk and Ward),
    ; 2 = Logarithmic method of moments,
    ; 3= Geometric method of moments
    Mean = yes
    Median = yes
    Sorting = yes
    Skewness = yes
    Kurtosis = yes
    Histo = yes
    

extract_image_log_statistics(log=None, prompt_user=None, config=None)

Extracts minimum, maximum, average, median and other statistical values fulfilling an optional condition from each image log trace.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ExtractImageLogStatistics]
    Minimum = yes / no
    Maximum = yes / no
    Mode = yes / no
    Average = yes / no
    Median = yes / no
    StandardDeviation = yes / no
    Percentage = yes / no
    MeanAbsoluteDeviation = yes / no
    GeometricMean = yes / no
    GeometricStandardDeviation = yes / no
    Skewness = yes / no
    Kurtosis = yes / no
    Quartiles = yes / no
    RMS = yes / no
    RMSD = yes / no
    Condition = 0 (None) / 1 (lower than Value 1) / 2 (larger than Value1) / 3 (lower and equal)
    / 4 (larger and equal) / 5 (equal) / 6 (not equal) / 7 (between Value1 and Value2)
    / 8 (between and equal to Value1 and Value2)
    Value1 = 50
    Value2 = 100
    OneOutputlogPerImageLog = yes / no
    DepthRange = Maximum / UserDefined / Zones / LogZones
    TopDepth = 1.0
    BottomDepth = 200.0
    ZonesDepthRange = 10.0, 20.0, 50.0, 80.0 (top1, bottom1,...,topN, bottomN)
    LogZonesDepthRange=Litho,06,05 (log name, interval code 1, interval code 2,...)
    

extract_structure_interval_statistic(log=None, prompt_user=None, config=None)

Allows determination of statistical values (e.g. frequency of dips) per interval from a structure log.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ExtractStructureIntervalStatistic]
    Reference = 5.0 / Log
    OutputMinAzimuth = yes / no
    OutputMaxAzimuth = yes / no
    OutputAverageAzimuth = yes / no
    OutputMinDip = yes / no
    OutputMaxDip = yes / no
    OutputAverageDip = yes / no
    OutputMinTilt = yes / no
    OutputMaxTilt = yes / no
    OutputAverageTilt = yes / no
    OutputMinAperture = yes / no
    OutputMaxAperture = yes / no
    OutputAverageAperture = yes / no
    OutputMinLength = yes / no
    OutputMaxLength = yes / no
    OutputAverageLength = yes / no
    OutputMinOpening = yes / no
    OutputMaxOpening = yes / no
    

Returns:

One of the computed log.

Return type:

Log

extract_well_log_statistics(logs=None, prompt_user=None, config=None)

Extracts minimum, maximum, average, median and other statistical values fulfilling an optional condition from each Well log

Parameters:
  • logs (list, optional) – The list of the titles or the zero base indexes of the logs to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ExtractWellLogStatistics]
    ; Condition : 0=None, 1=lower than Value 1, 2=larger than Value1, 3=lower and equal,
    ; 4=larger and equal,5=equal, 6=not equal, 7=between Value1 and Value2,
    ; 8=between and equal to Value1 and Value2
    Minimum = yes / no
    Maximum = yes / no
    Mode = yes / no
    Average = yes / no
    Median = yes / no
    StandardDeviation = yes / no
    Percentage = yes / no
    MeanAbsoluteDeviation = yes / no
    GeometricMean = yes / no
    GeometricStandardDeviation = yes / no
    Skewness = yes / no
    Kurtosis = yes / no
    Quartiles = yes / no
    RMS = yes / no
    RMSD = yes / no
    Condition = 0
    Value1 = 50
    Value2 = 100
    OneOutputlogPerImageLog = yes / no
    

extract_window_peak_amplitude(log=None, prompt_user=None, config=None)

Extracts the maximum amplitude found in a time window of a FWS log trace.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ExtractWindowPeakAmplitude]
    ; WindowStart : value or log name, units : us
    ; WindowLength : value, units : us
    ; PickType : 0 = peak, 1 = max, 2 = average
    WindowStart=0
    WindowLength=15
    PickMax=yes
    PickPos=yes
    PickType=1
    EnableResampling=yes
    

Returns:

The resulting log containing the amplitude.

Return type:

Log

file_export(file_name=None, prompt_user=None, config=None, log_file=None)

Exports the document to the specified file.

Supported file formats are LAS, DLIS, EMF, CGM, JPG, PNG, TIF, BMP, WCL and PDF. Please refer to the WellCAD help file for a description of the export parameters to be used in the configuration file and parameter string.

Parameters:
  • file_name (str, optional) – The path and name of the file to export. If not provided, the dialog will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [LASExport]
    ; LAS files
    ; For compatibility with older versions of WellCAD:
    NbEndDepthDigits = 4
    NbSmpRateDigits = 4
    LASVersion = 2 / 3
    Log1 = Depth,Auto,Auto (Log name, Precision, Column width)
    Log2 = GR, 0, 10
    'Log3 = … (if no Log is specified all logs will be exported)
    MaxDepthRange = yes / no
    TopDepth = 0.0
    BottomDepth = 150.0
    SamplingRate = 0.1
    EnableHeader = yes / no
    EnableWrap = yes / no
    NullValue = -999.25
    Delimiter = 0 (Comma) /1 (Tab) / 2 (Space)
    CheckConstSmpRate = yes (optional)
    LimitLineLength = no (optional)
    ShortMnemonics = no (optional)
    AlignColumns = yes (optional)
    ForceDecimalPoint = yes (optional)
    SignificantDigits = 7 (optional)
    [DLISExport]
    ; DLIS files
    ; If no Log is specified all logs will be exported
    Log1 = GR
    Log2 = RHO
    [ImageExport]
    ; JPG, PNG, BMP, GIF, TIF files
    MaxDepthRange = yes / no
    TopDepth= 0.0
    BottomDepth= 10.0
    Resolution=300
    [EMFExport]
    ; EMF files
    MaxDepthRange = yes / no
    TopDepth= 0.0
    BottomDepth= 10.0
    [CGMExport]
    ; CGM files
    MaxDepthRange = yes / no
    TopDepth= 0.0
    BottomDepth= 10.0
    [PDFExport]
    ; PDF files
    MaxDepthRange = yes / no
    TopDepth= 0.0
    BottomDepth= 10.0
    ; Single page
    PageStyle=Single
    ShowProgress=TRUE
    OpenPDFFile=TRUE
    ; Standard page
    PageStyle=Standard
    Orientation=Portrait / Landscape
    PaperSize=A4
    ShowProgress=TRUE
    OpenPDFFile=TRUE
    ; Custom page
    PageStyle=Custom
    Orientation=Portrait
    'Orientation=Landscape
    PaperWidth=2100
    PaperLength=2970
    ShowProgress=TRUE
    OpenPDFFile=TRUE
    [WCLExport]
    ; WCL files
    Format = 5.0
    

  • log_file (str, optional) – Path and name of the file to log error messages.

Returns:

True if successful, False otherwise.

Return type:

bool

fill_log(log, top_depth, bottom_depth, step, thickness, user_defined_intervals=None, interval_log=None)

Fill a Cross-section Log or a Polar & Rose Log with intervals automatically.

Parameters:
  • log (str or int) – The title or the zero based index of the log.

  • top_depth (float) – The top depth of the first interval in units of the current depth axis.

  • bottom_depth (float) – The last depth at which an interval could start in units of the current depth axis.

  • step (float) – The frequency of the intervals in units of the current depth axis (every 2 m).

  • thickness (float) – The interval thickness in units of the current depth axis.

  • user_defined_intervals (bool, optional) – If set to False the intervals will be loaded from a reference log.

  • interval_log (str or int, optional) – The title or the zero based index of the log containing the reference intervals.

filter_image_log(log=None, prompt_user=None, config=None)

Average, median and clipping filter for image logs.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [FilterImageLog]
    FilterType = Average / Median / Despiking
    FilterWidth = 3
    FilterHeight = 3
    HighCutLimit = 75
    LowCutLimit = 15
    

Returns:

The computed log.

Return type:

Log

filter_log(log, prompt_user=None, config=None)

Calculates a new filtered data set of a Well Log.

Parameters:
  • log (str or int) – The title or the zero based index of the log. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [FilterLog]
    ; FilterType : Median, MovingAverage, WeightedAverage
    ; DataUnit : degrees, radians
    FilterType =
    FilterWidth = 5
    MaxDepthRange = yes
    TopDepth = 5.0
    BottomDepth = 10.0
    CircularData = yes
    DataUnit = degrees
    

Returns:

An object of the filtered log.

Return type:

Log

freq_filter_fws_log(log, low_cut, low_pass, high_pass, high_cut)

Applies a frequency filter to the traces of an FWS log.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns None.

  • low_cut (float) – The low cut-off frequency of filter in kHz. If not provided, default value will be used.

  • low_pass (float) – The low pass frequency of filter in kHz. If not provided, default value will be used.

  • high_pass (float) – The high pass frequency of filter in kHz. If not provided, default value will be used.

  • high_cut (float) – The high cut-off frequency of filter in kHz. If not provided, default value will be used.

Returns:

Object of the filtered FWS log.

Return type:

Log

get_log(index_or_name)

Gets an existing log object in the document.

Parameters:

index_or_name (int or str) – The zero based index or the name of the log.

Returns:

The log object with the specified index or name, or None if the index is out of bounds or if name does not match any of the log name.

Return type:

Log

get_metadata(id)

Gets the value metadata value.

Only compatible with WellCAD version 5.7 and onwards.

Parameters:

id (str) – The metadata id.

Returns:

The value associated with the metadata.

Return type:

str

grain_size_sorting(log_min, log_max, prompt_user=None, config=None)

Classifies grain size values based on min and max logs.

Parameters:
  • log_min (int or str, optional) – Zero based index or title of the log containing logged minimum grain size value. If not provided, the method returns None.

  • log_max (int or str, optional) – Zero based index or title of the log containing logged maximum grain size value. If not provided, the method returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [GrainSizeSorting]
    ; Method : 0 = Logarithmic (original Folk and Ward; default),
    ; 1 = Geometric (modified Folk and Ward),
    ; 2 = Logarithmic method of moments,
    ; 3= Geometric method of moments
    BlockedAverage = yes
    

Returns:

A log containing the sorted values

Return type:

Log

property header

The document header for this borehole document.

Type:

Header

hydraulic_conductivity(log=None, prompt_user=None, config=None)

Computes the hydraulic conductivity from permeability data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the permeability values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [HydraulicConductivity]
    ; Density, Viscosity, DensityTemperature, ViscosityTemperature : log name or value
    ; Temperature units : degC, degF, degK
    ; Permeability units : m2, Darcy, mD, sq.ft
    ; Density units : kg/m3, g/m3, g/cc, lb/in3, lb/ft3
    ; Viscosity units : Pa.s, cP, p, dyn.s/cm2
    Density=1000
    DensityUnit= kg/m3
    Viscosity=0.000890439
    ViscosityUnit=Pa.s
    DensityTemperature=25
    DensityTemperatureUnit=degC
    ViscosityTemperature=25
    ViscosityTemperatureUnit=degC
    

Returns:

A Log object of the resulting hydraulic conductivity.

Return type:

Log

image_complexity_map(log=None, prompt_user=None, config=None)

Computes the complexity map from an RGB or image log.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ImageComplexityMap]
    LogType=1
    ;RGB OTV image: 0,
    ;Greyscale OTV image: 1,
    ;Diamond-drilled hole, ATV image: 2,
    ;RC-drilled hole, ATV image: 3,
    ;FMI image: 4,
    Palette=0,0,0,255,56,255,0,0,12,64,224,208,21,50,205,50,31,255,255,0,39,255,215,0,47,255,104,32
    

Returns:

The computed log.

Return type:

Log

insert_new_log(log_type)

Creates a new log and log object.

Parameters:

log_type (int, optional) –

The type of log. Allowed values are :

  • 1 = Well Log

  • 2 = Formula Log

  • 3 = Mud Log

  • 4 = FWS Log

  • 5 = Image Log

  • 6 = Structure Log

  • 7 = Litho Log

  • 8 = Comment Log

  • 9 = Engineering Log

  • 10 = RGB Log

  • 13 = Interval Log

  • 14 = Analysis Log

  • 15 = Percent Log

  • 16 = CoreDesc Log

  • 17 = Depth Log

  • 18 = Strata Log

  • 19 = Stacking Pattern Log

  • 20 = Polar and Rose Log

  • 21 = Cross Section Log

  • 22 = OLE Log

  • 23 = Shading Log

  • 24 = Marker Log

  • 25 = Breakout Log

  • 26 = Bio Log

  • 27 = Lineation Log

Returns:

A log object.

Return type:

Log

integrated_travel_time(log=None, prompt_user=None, config=None)

Computes the integrated travel time from slowness or velocity data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [IntegratedTravelTime]
    TimeOffset = 0 'in us
    TWT = Yes/No
    

Returns:

The resulting log containing the integrated times.

Return type:

Log

interpolate_log(log, prompt_user=None, config=None)

Allows the interpolation of Mud and Well Log data to close no data gaps in a data set.

Parameters:
  • log (str or int) – The title or the zero based index of the log. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [InterpolateLog]
    MaximumGap = 0.25
    CircularData = yes / no
    DataUnit = degrees / radians
    

Returns:

An object of the interpolated log.

Return type:

Log

maximize_window()

Enlarges the document window to fit the WellCAD frame.

Works only if document windows are not tabbed.

merge_logs(log_a, log_b, ave_overlap=None, create_new=None)

Merges the data of the two specified logs.

Parameters:
  • log_a (str or int) – The title or the zero based index of the log. If no new log is created this log will receive the data from log_b.

  • log_b (str or int) – The title or the zero based index of the log.

  • ave_overlap (bool, optional) – If set to False log_a will overwrite log_b, if set to True, data from the two logs will be averaged over the depth overlap.

  • create_new (bool) – If set to False log_b will be pushed into log_a and the log_b will be removed

merge_same_log_items(log)

Merges consecutive data intervals of same litho codes, text or data within the specified log. This function applies to Litho, Comment, Engineering, CoreDesc, Interval, Stack and Bio logs.

Parameters:

log (str or int, optional) – The title or the zero based index of the log.

property metadata_keys

A Tuple of strings containing the metadata keys. (WellCAD 5.7 and onwards)

Type:

tuple

minimize_window()

Shrinks the document window to an icon.

Works only if document windows are not tabbed.

mirror_image(log=None)

Rearranges the data within an image log so that the data appears mirrored when compared to the original image.

Parameters:

log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

property name

The title of a borehole document.

Type:

str

property nb_metadata

The number of metadata. (WellCAD 5.7 and onwards)

Type:

int

property nb_of_logs

The number of logs in a borehole.

Type:

int

nmr_fluid_volumes(log=None, prompt_user=None, config=None)

Computes the fluid volumes from a T2 distribution.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path and name of the configuration file or a parameter string. The configuration file or string can contain the following options:

    
    

    [NMRFluidVolumes] LithoDatabase= UseLithoDatabaseAssociatedColor= yes/no Components= Cutoff= DepthRange=Maximum / UserDefined / Zones /LogZones TopDepth=20 BottomDepth=22 LogZones : top1, bot1, top2, bot2, … topN, botN LogZonesDepthRange=logname, depthsectionName1, depthsectionName2, ….depthsectionname3

Returns:

The resulting log object

Return type:

Log

nmr_permeability(log=None, prompt_user=None, config=None)

Computes the permeability from a T2 distribution.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path and name of the configuration file or a parameter string. The configuration file or string can contain the following options:

    
    

    [NMRPermeability] T2DistributionTraceUnit= seconds / milliseconds UseTimeMaxCutoff= yes / no MaxCutoffValue=-1 DisplayTIMModel= yes / no VariableCforTIMModel=1 ExponentMforTIMModel=4 BFVCutoffForTIMModel=2 BFVCutoffForTIMModel=0.3 UseTimeMaxForFFVCutoff= yes / no FFVCutoffForTIMModel=0 DisplaySDRModel= yes / no VariableCforSDRModel=4 ExponentMforSDRModel=4 ExponentNforSDRModel=2 DisplayT2LogMean= yes / no DepthRange=Maximum / UserDefined / Zones /LogZones TopDepth=20 BottomDepth=22 LogZones : top1, bot1, top2, bot2, … topN, botN LogZonesDepthRange=logname, depthsectionName1, depthsectionName2, ….depthsectionname3

nmr_total_porosity(log=None, prompt_user=None, config=None)

Computes the total porosity from a T2 distribution.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path and name of the configuration file or a parameter string. The configuration file or string can contain the following options:

    [NMRTotalPorosity]
    MaxCutoffValue=-1
    UseTimeMaxCutoff= yes / no
    
    DepthRange=Maximum / UserDefined / Zones /LogZones
    TopDepth=20
    BottomDepth=22
    LogZones : top1, bot1, top2, bot2, ... topN, botN
    LogZonesDepthRange=logname, depthsectionName1, depthsectionName2, ....depthsectionname3
    

Returns:

The resulting log object

Return type:

Log

normalize(log=None, prompt_user=None, config=None)

Normalizes the data in a Percentage or Analysis Log.

Parameters:
  • log (str or int, optional) – The title or the zero based index of the log.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [AnalysisLogNormalize]
    ComponentsToDelete= 20, 05#1, Artifacts (Codes of the patterns to be
    removed separated by commas)
    CreateNewLog=yes
    At100=yes
    

normalize_image(log=None, prompt_user=None, config=None)

Applies Static or Dynamic normalization to image logs

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [NormalizeImage]
    Mode = Static /Dynamic_1D / Dynamic_2D / HighPass
    WindowHeight = 0.3
    WindowWidth = 5
    

Returns:

The normalized log.

Return type:

Log

property odbc

An ODBC object that allows interaction with a database.

Type:

Odbc

orient_image_to_highside(log=None, prompt_user=None, config=None)

Rotates an image log to high side according to the deviation channels provided.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [OrientImageToHighside]
    InclX = Acc X
    InclY = Acc Y
    InclZ =
    InclXPositive = yes / no
    InclYPositive = yes / no
    InclZPositive = yes / no
    IsAccelerometer = yes / no
    MarkerPosition = 180.2
    

orient_image_to_north(log=None, prompt_user=None, config=None)

Rotates an image log to magnetic north according to the deviation channels provided.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [OrientImageToNorth]
    MagX = Mag X
    MagY = Mag Y
    MagZ = Mag Z
    InclX = Acc X
    InclY = Acc Y
    InclZ =
    MagXPositive = yes / no
    MagYPositive = yes / no
    MagZPositive = yes / no
    InclXPositive = yes / no
    InclYPositive = yes / no
    InclZPositive = yes / no
    IsAccelerometer = yes / no
    MarkerPosition = 180.2
    

outer_inner_radius_diameter(log=None, prompt_user=None, config=None)

The process takes an Image, Well or Mud log as input and computes from radius/diameter and thickness values an outer radius/diameter value.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [OuterInnerRadiusDiameter]
    ; InputType : InnerRadius, OuterRadius, InnerDiameter, OuterDiameter
    ; OutputType : InnerRadius, OuterRadius, InnerDiameter, OuterDiameter
    ; Thickness = log name or value
    Thickness = THK
    InputType = InnerRadius
    OutputType = OuterDiameter
    

Returns:

A log giving the outer radius/diameter.

Return type:

Log

property page

A page object for the borehole document.

Type:

Page

permeability(log=None, prompt_user=None, config=None)

Estimates permeability from porosity data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the neutron porosity values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [Permeability]
    CementationFactor=1.0
    

Returns:

A log of the resulting permeability.

Return type:

Log

pick_e1_arrival(fws_log=None, dt_log=None, prompt_user=None, config=None)

Determines the arrival time of the E1 amplitude.

Parameters:
  • fws_log (int or str, optional) – Zero based index or title of the FWS log to process. If not provided, the process dialog box will be displayed.

  • dt_log (int or str, optional) – Zero based index or title of the arrival time log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [PickE1Arrival]
    PickPositivPolarity = yes
    FilterWidth = 5
    

Returns:

The resulting log containing the E1 arrival times.

Return type:

Log

pick_first_arrival(log=None, prompt_user=None, config=None)

Picks the first arrival time using the standard threshold or advanced method.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file. The configuration file can contain the following options:

    [FwsFirstArrival]
    ;Method=Standard Threshold Pickup Algorithm
    Method=Advanced Threshold Pickup Algorithm
    
    [Standard Threshold Pickup Algorithm]
    Blanking=100.0
    Threshold=15.0
    BackInterpolation=yes
    LockToSampling=yes
    ; the next two are advanced settings
    BaseLine=0.0
    AutoAdjustThreshold=no
    
    [Advanced Threshold Pickup Algorithm]
    Blanking=0.0
    Threshold=3.0
    LargeWidth=120.0
    SmallWidth=40.0
    

Returns:

The resulting log containing the first arrival times.

Return type:

Log

porosity_archie(log=None, prompt_user=None, config=None)

Computes porosity from formation resistivity data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the formation resistivity (Rt) values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [PorosityArchie]
    ; Method : 0 = Standard, 1 = FreshWater, 2 = shale, 3= shaleAndFreshWater
    ; Rw and Rsh units: ohm.m, ohm.ft
    Method = 1
    Vsh = log name or constant value
    Rw = log name or constant value
    RwUnit=ohm.m
    Rsh = 30.0
    RshUnit=ohm.m
    CementationFactor = 1.0
    CementationExponent = 2.0
    Cs = 1.0
    

Returns:

A log of the resulting porosity.

Return type:

Log

porosity_density(log=None, prompt_user=None, config=None)

Computes porosity from density data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the density values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [PorosityDensity]
    ; Method : 0 = Standard, 1 = Shale
    ; MatrixDensity, FluidDensity, ShaleVolume : value or log
    ; Density units: g/cc or kg/m3
    MatrixDensity=2.7
    MatrixDensityUnit=g/cc
    FluidDensity=1.0
    FluidDensityUnit=g/cc
    ShaleVolume=0
    ShaleDensity=1.5
    ShaleDensityUnit=g/cc
    

Returns:

A log of the resulting porosity.

Return type:

Log

porosity_neutron(log=None, prompt_user=None, config=None)

Applies a shale correction to neutron porosity data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the neutron porosity values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [PorosityNeutron]
    ; Vsh : log name
    ; ShaleNPhi = value
    Vsh=VSh
    ShaleNPhi=50
    

Returns:

A log of the resulting corrected porosity.

Return type:

Log

porosity_sonic(log=None, prompt_user=None, config=None)

Computes porosity from transit time data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the formation resistivity (Rt) values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [PorositySonic]
    ; Method : 0 = Wylie, 1 = WylieCompaction, 2 = AbbreviatedRaymerHunt, 3 = RaymerHunt
    ; Slowness units: us/ft, us/m, ft/us, m/s
    Method = 1
    MatrixSlowness = log name or constant value
    MatrixSlownessUnit = us/ft
    FluidSlowness= = log name or constant value
    FluidSlownessUnit = us/ft
    Compaction= = log name or constant value
    C = 0.67
    

Returns:

A log of the resulting porosity.

Return type:

Log

process_medusa_spectrum_data(log_spectrum=None, log_time=None, prompt_user=None, config=None)

Performs a full spectrum analysis using a calibration after Medusa

Parameters:
  • log_spectrum (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • log_time (int or str, optional) – Zero based index or title of the log with the live time data. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [SpectralGammaMedusaProcess]
    CalibrationFilePath = C:\Temp\NSG1234.mcf
    EnableFittedSpectrum = yes
    EnableConcentrationErrors = yes
    EnableStabilizationFactor = yes
    DeadTime = 5 (in us/pulse)
    HoleDiameter = 96 / Caliper (fixed value or data from log in mm)
    CasingThickness = 8 / Thickness (fixed value or data from log mm)
    CasingType = 0 (Steel) / 1 (PVC)
    FluidDensity = 1.1 / RHOFL (fixed value or data from log in g/ccm)
    FluidK = 0.0 / K (Potassium concentration in the fluid; fixed value or data from log in Bq/kg)
    FluidU = 0.0 / U (eq Uranium concentration in the fluid; fixed value or data from log in Bq/kg)
    FluidTh = 0.0 / Th (Thorium concentration in the fluid; fixed value or data from log in Bq/kg)
    ToolPosition = 0 (Alongside) / 1 (Centered)
    

process_nmrsa_data(log=None, prompt_user=None, config=None)

Performs a post-processing of NMRSA’s BMR tool raw data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path and name of the configuration file or a parameter string. The configuration file or string can contain the following options:

    [NMRSA]
    UseDefaultOutputs = yes / no
    MasterCalibrationFile=
    ProcessingConfigurationFile=
    DepthRange=Maximum / UserDefined / Zones /LogZones
    TopDepth=20
    BottomDepth=22
    LogZones : top1, bot1, top2, bot2, ... topN, botN
    LogZonesDepthRange=logname, depthsectionName1, depthsectionName2, ....depthsectionname3
    

process_reflected_tube_wave(log=None, prompt_user=None, config=None)

Extracts the cumulative energy from reflected tube wave arrivals.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog settings will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ProcessReflectedTubeWave]
    ; Side : both,  upper, lower
    Side = both
    Offset = 25.0 'measured in us
    Blanking = 50.0 'measured in us
    FluidSlowness = 696.0 'measured in us/m
    TxFrequency = 15000.0 'measured in Hz
    

Returns:

The resulting log containing the cumulative energy.

Return type:

Log

process_spectrum_data(log=None, prompt_user=None, config=None)

Performs a windows stripping based on a calibration model

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [SpectralGamma]
    OutputWindowCounts = yes / no
    ProcessModel = "C:\Temp\Test.sgm"
    

radius_to_from_diameter(log=None, prompt_user=None, config=None)

Converts values data in an Image log from radius to diameter values or vice versa.

Parameters:
  • log (int or str) – Zero based index or title of the log to process. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [RadiusToFromDiameter]
    ;  Method : TwoTimesRadius, OppositeValues, HalfDiameter
    Method = TwoTimesRadius
    

Returns:

A log giving diameter/radius.

Return type:

Log

read_database(script_path)

Opens and interprets an SQL script to download data from a database.

Parameters:

script_path (str) – The path to the SQL script to be called

Returns:

Whether the operation was successful or not.

Return type:

bool

recalculate_structure_azimuth(log=None, prompt_user=None, config=None)

Adds or subtracts a value from all Azimuth data within a structure log.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [RecalculateStructureAzimuth]
    Angle = 45 / Log
    RotateClockwise = yes / no
    MaxDepthRange = yes / no
    TopDepth = 0.0
    BottomDepth = 1.0
    

recalculate_structure_dip(log=None, prompt_user=None, config=None)

Correct the dip angle data within a structure log for new caliper settings.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [RecalculateStructureDip]
    Caliper = Log / 200.0
    CaliperUnit = mm / in
    MaxDepthRange = yes / no
    TopDepth = 0
    BottomDepth = 1
    

refresh_window()

Performs a one time refresh of the borehole view

remove_log(log)

Deletes the specified log from the borehole document.

Parameters:

log (str or int) – The title or the zero based index of the log to remove.

remove_structural_dip(log=None, prompt_user=None, config=None)

Removes a given regional dip and azimuth from the data in a structure log and recalculates new Dip and Azimuth angles.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [RemoveStructuralDip]
    Azimuth = Log /45
    Dip = Log /10
    MaxDepthRange = yes / no
    TopDepth = 0.0
    BottomDepth = 1.0
    

Returns:

The computed log.

Return type:

Log

representative_picks(log=None, prompt_user=None, config=None)

Used to derive the most representative picks from a Structure log given user defined classification limits.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [RepresentativePicks]
    TopDepth=0.0
    BottomDepth=10.0
    TiltWindow=5.0 (structural dip angle interval, here +/- 5 degrees)
    AzimuthWindow=15.0 (structural azimuth angle interval, here +/- 15 degrees)
    DepthWindow=0.5
    KeepFeaturesUngrouped=TRUE / FALSE
    

Returns:

The computed log.

Return type:

Log

resample_log(log, prompt_user=None, config=None)

Resamples a data set according to a new constant sampling rate or sample point determined from a reference log.

Parameters:
  • log (str or int) – The title or the zero based index of the log. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ResampleLog]
    ; For mud / well logs
    ; ReferenceLog : log title of a Mud or Percentage Log
    SamplingRate = 0.1
    ReferenceLog = Plugs
    UseReferenceLog = yes / no
    UseNearestPoint = yes / no
    CircularData = yes / no
    DataUnit = degrees / radians
    ; For image logs
    VerticalSamplingFactor = 1
    RadialSamplingFactor = 1
    RadialDownSampling = yes / no
    

retinex_filter_rgb_log(log=None, prompt_user=None, config=None)

Applies a retinex filter to the RGB log.

Note: only compatible with WellCAD version 5.7 and onwards.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) – Not Used for this function.

Returns:

The computed log.

Return type:

Log

reverse_amplitude(log=None)

Inverts the amplitudes in a FWS log.

Parameters:

log (int or str, optional) – Zero based index or title of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

rop_average(log=None, prompt_user=None, config=None)

Computes the average rate of penetration over specified depth intervals for a Mud Log or a Well Log.

Parameters:
  • log (str or int, optional) – The title or the zero based index of the log.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ROPAverage]
    ReferenceInterval=Litho ; log title or constant value indicating the interval height
    OutputLogAsGraphic=no
    OutputLogAsText=yes
    DepthRange=Maximum ;Maximum, UserDefined, Zones, LogZones
    TopDepth=105
    BottomDepth=120
    ;LogZones : top1, bot1, top2, bot2, ... topN, botN
    LogZones=
    ; LogZonesDepthRange=logname, depthsectionName1, depthsectionName2, ....depthsectionname3
    LogZonesDepthRange=Litho,06,05#1
    

Returns:

The newly created Log.

Return type:

Log

rotate_image(log=None, prompt_user=None, config=None)

Rotate the image data by adding an angle (clockwise rotation) or subtracting it (counterclockwise rotation).

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [RotateImage]
    RotateBy= 1.2 / Log
    RotateClockwise = yes / no
    

rqd(log=None, prompt_user=None, config=None)

Computes the Rock Quality Designation from the structure picks in a Structure Log.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [RQD]
    CorePieceLength = 0.1
    CoreLength = 1
    AttributeName1 = Defect Type
    AttributeValues1 = JT-MAJ, JT-MED, JT-MIN,
    AttributeName2 = Defect Condition
    AttributeValues2 = cont, part
    DepthRange = Maximum / UserDefined / Zones
    'UserDefined
    TopDepth=25
    BottomDepth=30
    'Zones
    ZonesDepthRange = 20,26, 24,30
    

Returns:

The computed log.

Return type:

Log

save_as(path)

Saves the borehole document as WCL file.

Parameters:

path (str, optional) – The file path to the WellCAD borehole document file to save. If no file path is provided, the user will be prompted to select a file using a standard File Save As dialog box.

Returns:

True if successful, False otherwise.

Return type:

bool

set_draft_mode(display_mode=None)

Toggles the view of the borehole document.

Parameters:

display_mode (int, optional) –

The document viewing mode. A borehole document can be displayed in the following modes:

  • 0 = Page Layout

  • 1 = Draft and fit

  • 2 = Draft

set_metadata(id, value)

Sets a metadata value. If the id doesn’t exist, this will create it and set the value.

Only compatible with WellCAD version 5.7 and onwards.

Parameters:
  • id (str) – The metadata id.

  • value (str) – The value to set the metadata to.

set_visible_depth_range(top_depth=None, bottom_depth=None)

Adjusts the depth range displayed in a borehole view.

Parameters:
  • top_depth (float) – The top depth of the visible depth range. If not provided, the current top depth of the document will be used

  • bottom_depth (float) – The bottom depth of the visible depth range. If not provided, the current bottom depth of the document will be used

shale_volume(log=None, prompt_user=None, config=None)

Estimates the shale volume from Gamma Ray or SP data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the Gamma Ray or SP values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ShaleVolume]
    Equation = 0
    ; 0 = Linear (default), 1 = Larionov (Tertiary), 2 = Steiber,
    ; 3 = Clavier, 4 = Larionov (older rocks)
    Shale=150
    ShaleValueType=1
    ; ...Type: 0 = value, 1 = minmax, 2 = avginterval
    ShaleTopDepth=0
    ShaleBotDepth=0
    Sandstone=75
    SandstoneValueType=1
    ; ...Type: 0 = value, 1 = minmax, 2 = avginterval
    SandstoneTopDepth=0
    SandstoneBotDepth=0
    

Returns:

A log of the resulting shale volume.

Return type:

Log

sharpen_rgb_log(log=None, prompt_user=None, config=None)

Sharpens the RGB log.

Note: only compatible with WellCAD version 5.7 and onwards.

Parameters:
  • log (str or int, optional) – Zero based index (integer) or title (string) of the log to process. If not provided, a dialog box displaying a list of available logs will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration file. If no configuration file has been specified, default values will be used.

  • config (str, optional) – Not Used for this function.

Returns:

The computed log.

Return type:

Log

shear_wave_velocity(log=None, prompt_user=None, config=None)

Computes the shear wave velocity from pressure wave velocity data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the pressure wave velocity values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ShearWaveVelocity]
    ; input : Vp in m/s, ft/us, us/m, us/ft
    ; Density, Vp : log name or constant value (for density)
    ; Density units : kg/m3, g/cc, lb/ft3, lb/in3
    ; Methods allowed : 0 (Castagna), 1 (Brocher), 2 (Carroll), 3 (Christensen)
    
    Density = 3
    DensityUnit = g/cc
    Method = 0
    

Returns:

A log of the resulting shear wave velocity.

Return type:

Log

shift_correction(log=None, prompt_user=None, config=None)

Corrects the drift of data (e.g. MFC) in Image logs.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns ‘’None’’.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [ShiftCorrection]
    ; Zone1 : name, top, bottom, value
    OutputCorrections = yes / no
    ExtendTrends = yes / no
    Zone1=ref1, 25.0, 26.0, 101.2
    Zone2=ref2, 45.0, 47.0, 125.3
    

Returns:

A log that has been corrected.

Return type:

Log

show_window()

Puts the borhole into focus.

slice_log(log, slice_depth, create_top=None, create_bottom=None, keep_original=None)

Allows the separation of the log data into a top and bottom section. New logs can be created holding the data of the top and bottom parts of the data set.

Parameters:
  • log (str or int) – The title or the zero based index of the log to slice.

  • slice_depth (float) – The depth at which the slice will be made.

  • create_top (bool, optional) – If set to TRUE (default) a new log will be created holding the data from the current top of the data set down to the slice depth..

  • create_bottom (bool, optional) – If set to TRUE (default) a new log will be created holding the data from the slice depth down to the bottom of the data set.

  • keep_original (bool, optional) – If set to TRUE (default) the original log will be kept in the document.

slice_traces(log=None, prompt_user=None, config=None)

Allows the user to keep only a portion of a FWS log’s traces. Updates the log in place.

Note: only compatible with WellCAD version 5.7 and onwards.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [SliceTraces]
    start = 0  ; in log units
    end = 0  ; in log units
    

spectrometric_ratios(log_a=None, log_b=None, log_c=None, prompt_user=None, config=None)

Computes spectrometric ratios like U/Th or U/k

By default, the ratios log_b/log_a, log_b/log_c and log_c/log_a will be computed.

Parameters:
  • log_a (int or str, optional) – Zero based index or title of the log to process.

  • log_b (int or str, optional) – Zero based index or title of the log to process.

  • log_c (int or str, optional) – Zero based index or title of the log to process.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [SpectrometricRatios]
    ; ratio : A / B
    A=K
    B=U
    

stack_traces(is_spectrum=None, log=None, prompt_user=None, config=None)

Stacks multiple FWS traces to create and average trace.

Parameters:
  • is_spectrum (bool, optional) – Whether the log is a spectrum or not.

  • log (int or str, optional) – Zero based index or title of the log to process. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [StackTraces]
    NumberOfStacks = 5
    

Returns:

The resulting log.

Return type:

Log

title(name)

Gets the title object for the specified name.

Parameters:

name (str, optional) – The name of the log or the name of a title box.

Returns:

The Title object if found, otherwise “None”

Return type:

Title

property top_depth

The top depth of a borehole in units of the master depth axis.

Type:

float

transmissivity(log=None, prompt_user=None, config=None)

Computes the transmissivity from hydraulic conductivity data.

Parameters:
  • log (int or str, optional) – Zero based index or title of the well or mud log containing the hydraulic conductivity values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [Transmissivity]
    ; default is false
    BottomToTop=yes
    ;OutputUnit allowed : ft^2/day, ft^2/s, m^2/s, mm^2/day
    OutputUnit=m^2/day
    ;DepthRange : Maximum, UserDefined, Zones, LogZones
    DepthRange=Maximum
    TopDepth=10
    BottomDepth=19
    ;LogZones : top1, bot1, top2, bot2, ... topN, botN
    LogZones=
    ; LogZonesDepthRange=logname, depthsectionName1, depthsectionName2, ....depthsectionname3
    LogZonesDepthRange=Litho,06,05#1
    

Returns:

A log of the resulting transmissivity.

Return type:

Log

tvd(log=None, prompt_user=None, config=None)

Calculates a TVD either from another TVD log (Depth Log) or from a tilt log (Well Log).

Parameters:
  • log (str or int, optional) – The title or the zero based index of the log.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [TVD]
    Output=TVD /Elevation
    ExtrapolateBack=yes /no
    TVDAtZero=0.0
    

Returns:

The newly created Log containing the TVD data.

Return type:

Log

unit_conversion(log=None, prompt_user=None, config=None)

Converts the units used in a log.

Units are organized in categories (e.g. Length, Weight or Temperature).

Parameters:
  • log (str or int, optional) – The title or the zero based index of the log.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [UnitConversion]
    Category=Length / Weight / Temperature
    FromUnit=mm
    ToUnit=in
    CreateNewLogs=yes/no
    

property version_build

The build number of WellCAD (deprecated).

Type:

int

property version_major

The major version number of WellCAD.

Type:

int

property version_minor

The minor version number of WellCAD.

Type:

int

property version_patch

The patch number of WellCAD.

Type:

int

water_resistivity(log=None, prompt_user=None, config=None)

Temperature correction for fluid conductivity or resistivity.

Parameters:
  • log (int or str, optional) – Zero based index or title of the log containing the conductivity or resistivity values. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (bool, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [WaterResistivity]
    Temperature = log name or constant value
    TemperatureUnit = degC / degF / degK
    RefTemperature = log name or constant value
    RefTemperatureUnit = degC / degF / degK
    Method = 0 (Arp) / 1 (Hilchie)
    

Returns:

A log of the corrected conductivity or resistivity.

Return type:

Log

water_salinity(log=None, prompt_user=None, config=None)

Salinity estimation from fluid conductivity.

Parameters:
  • log (int or str, optional) – Zero based index or title of the fluid conductivity log to process. If not provided, the process returns None.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [WaterSalinity]
    Temperature = log name or constant value
    TemperatureUnit = degC / degF / degK
    

Returns:

A log of the resulting salinity.

Return type:

Log

workspace(workspace_id)

Gets an existing workspace object in the document.

Parameters:

workspace_id (int or str) – The zero based index or the name of the workspace

Returns:

The workspace object with the specified index or name, or None if the index is out of bounds or if name does not match any of the workspace name.

Return type:

Workspace or None

write_database(script_path)

Opens and interprets an SQL script to upload data to a database.

Parameters:

script_path (str) – The path to the SQL script to be called

Returns:

Whether the operation was successful or not.

Return type:

bool

zonation(logs=None, prompt_user=None, config=None)

Splits log data into zones.

This is an automated version of the Zonation process in WellCAD.

Parameters:
  • logs (list, optional) – The list of the titles or the zero base indexes of the logs to process. If not provided, the process dialog box will be displayed.

  • prompt_user (bool, optional) – Whether dialog boxes are displayed to interact with the user. If set to False the processing parameters will be retrieved from the specified configuration. If no configuration has been specified, default values will be used. Default is True.

  • config (str, optional) –

    Path to a configuration file or a parameter string. The configuration file can contain the following options:

    [Zonation]
    UseIntervalThickness = yes/no (set to "no" to neglect theNbOuptutIntervals parameter)
    NbOutputIntervals = 2
    IntervalMinThickness = 0.5
    UseLithoLogAsOutput = yes/no