pygmi.maggrv.tiltdepth#

Tilt Depth Routine.

Based on work by EH Stettler

References

Salem et al., 2007, Leading Edge, Dec,p1502-5

Classes#

TiltDepth

Primary class for the Tilt Depth.

Functions#

tiltdepth(data[, inc, dec, pbar, showlog])

Calculate tilt depth.

distpc(dx, dy, dx0, dy0, dcnt)

Find closest distances.

vgrad(cnt)

Get contour gradients at vertices.

Module Contents#

class pygmi.maggrv.tiltdepth.TiltDepth(parent=None)#

Bases: pygmi.misc.BasicModule

Primary class for the Tilt Depth.

Parameters:

parent – Reference to the parent routine. The default is None.

setupui()#

Set up UI.

rtp_choice()#

Check if RTP must be done.

save_depths()#

Save depths.

Returns:

True if successful, False otherwise.

Return type:

bool

change_cbar()#

Change the colour map for the colour bar.

calculate()#

Routine which occurs when apply button is pressed.

settings(nodialog=False)#

Entry point into item.

Parameters:

nodialog (bool) – Run settings without a dialog. The default is False.

Returns:

True if successful, False otherwise.

Return type:

bool

saveproj()#

Save project data from class.

pygmi.maggrv.tiltdepth.tiltdepth(data, inc=None, dec=None, pbar=None, showlog=print)#

Calculate tilt depth.

Output is stored in self.outdata.

Parameters:
  • data (pygmi.raster.datatypes.Data) – PyGMI raster dataset.

  • inc (float | None) – Magnetic inclination, by default None.

  • dec (float | None) – Magnetic declination, by default None.

  • piter – Progress bar iterator. The default is None.

  • showlog (collections.abc.Callable[..., None]) – Display information. The default is print.

  • pbar (object | None)

Returns:

Resulting depths and coordinates.

Return type:

GeoDataFrame

pygmi.maggrv.tiltdepth.distpc(dx, dy, dx0, dy0, dcnt)#

Find closest distances.

Parameters:
  • dx (numpy.typing.NDArray) – X array.

  • dy (numpy.typing.NDArray) – Y array.

  • dx0 (float) – X point to measure distance from.

  • dy0 (float) – Y point to measure distance from.

  • dcnt (int) – Starting index to measure distance from.

Returns:

Index of closest distance found in x and y arrays.

Return type:

int

pygmi.maggrv.tiltdepth.vgrad(cnt)#

Get contour gradients at vertices.

Parameters:

cnt (matplotlib.axes.Axes.contour) – Output from Matplotlib’s axes.contour.

Returns:

  • gx (ndarray) – X gradients.

  • gy (ndarray) – Y gradients.

  • cgrad (ndarray) – Contour gradient.

  • cntid (ndarray) – Contour index.

Return type:

tuple[numpy.typing.NDArray, numpy.typing.NDArray, numpy.typing.NDArray, numpy.typing.NDArray]