Depth

class wellcad.com.Depth(dispatch)

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

Depth objects allow setting properties for the master depth axis such as scale, unit, decimals, ….

Example

>>> import wellcad.com
>>> app = wellcad.com.Application()
>>> app.new_borehole()
<wellcad.com._borehole.Borehole object at 0x0000018B3DAF9D30>
>>> borehole = app.get_active_borehole()
>>> depth = borehole.depth
property decimals

the number of decimals displayed in the depth string of the master depth axis.

Type:

int

property horizontal_grid

The depth grid type.

The available types are the following:

  • 0 = none

  • 1 = major grid lines only

  • 2 = major & minor grid lines

Type:

int

property horizontal_grid_spacing

The depth grid spacing for the master depth axis

Type:

float

property left_position

The position of the left side of the master depth column as a fraction of the document width.

In the case that this is set to be a value higher than right_position, the two attributes will swap. Values will be clamped in the range [0.0, 1.0].

Type:

float

property right_position

The position of the right side of the master depth column as a fraction of the document width.

In the case that this is set to be a value lower than left_position, the two attributes will swap. Values will be clamped in the range [0.0, 1.0].

Type:

float

property scale

The depth scale used for the master depth axis.

The resulting scale is 1:scale.

Example

>>> depth.scale = 100 # Scale is 1:100
Type:

float

set_position(left, right)

Sets the position and width of the master depth column.

Values given outside the range of [0.0, 1.0] will be clamped. If left > right, the arguments are swapped.

Parameters:
  • left (float) – The position of the left side of the depth column as a fraction of the document width.

  • right (float) – The position of the right side of the depth column as a fraction of the document width.

property unit

The depth unit

The available units are the following:

  • 0 = meter

  • 1 = feet

Type:

int

property used_as_depth_scale

Whether this depth scale is used as the current reference axis.

Setting this property to True on another depth log changes the property to False on this object. If no other depth log is used as the depth scale, the main depth log will automatically be used as the depth scale.

Type:

bool