pygmi.maggrv.dataprep#
A set of Magnetic Data routines.
Classes#
Calculate analytic signal via a GUI. |
|
GUI to perform upward and downward continuation on potential field data. |
|
Class used to gather information via a GUI, for function tilt1. |
|
Perform Reduction to the Pole on Magnetic data. |
Functions#
|
Tilt angle calculations. |
|
Continuation. |
|
Taylor Continuation. |
|
Tilt angle calculations. |
|
Next power of 2. |
|
Reduction to the pole. |
|
Apply a 2D Mean of Least Variance (MLV) Edge Preserving Filter. |
Module Contents#
- class pygmi.maggrv.dataprep.ASig(parent=None)#
Bases:
pygmi.misc.BasicModuleCalculate analytic signal via a GUI.
- Parameters:
parent – Reference to the parent routine. The default is None.
- setupui()#
Set up UI.
- 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.dataprep.asig(data1, showlog=print, piter=iter)#
Tilt angle calculations.
- Based on work by Gordon Cooper (School of Geosciences, University of the
Witwatersrand, Johannesburg, South Africa)
- Parameters:
data1 (pygmi.raster.datatypes.Data) – PyGMI data with matrix of double to be filtered.
showlog (collections.abc.Callable[..., None]) – Show information using a function. The default is print.
piter (collections.abc.Iterable) – Progress bar iterator. The default is iter.
- Returns:
Analytic signal
- Return type:
MaskedArray
- class pygmi.maggrv.dataprep.Continuation(parent=None)#
Bases:
pygmi.misc.BasicModuleGUI to perform upward and downward continuation on potential field data.
- Parameters:
parent – Reference to the parent routine. The default is None.
- setupui()#
Set up UI.
- 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.
- acceptall()#
Accept option.
Updates self.outdata, which is used as input to other modules.
- pygmi.maggrv.dataprep.fftcont(data, h, showlog=print, piter=iter)#
Continuation.
- Parameters:
data (pygmi.raster.datatypes.Data) – PyGMI raster data.
h (float) – Height.
showlog (collections.abc.Callable[..., None]) – Function for printing text. The default is print.
piter (collections.abc.Iterable) – Progress bar iterable. The default is iter.
- Returns:
PyGMI raster data.
- Return type:
Data
- pygmi.maggrv.dataprep.taylorcont(data, h, showlog=print, piter=iter)#
Taylor Continuation.
- Parameters:
data (pygmi.raster.datatypes.Data) – PyGMI raster data.
h (float) – Height.
showlog (collections.abc.Callable[..., None]) – Function for printing text. The default is print.
piter (collections.abc.Iterable) – Progress bar iterable. The default is iter.
- Returns:
PyGMI raster data.
- Return type:
Data
- class pygmi.maggrv.dataprep.Tilt1(parent=None)#
Bases:
pygmi.misc.BasicModuleClass used to gather information via a GUI, for function tilt1.
- Parameters:
parent – Reference to the parent routine. The default is None.
- setupui()#
Set up UI.
- 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.dataprep.tilt1(data1, azi, s, k=2, showlog=print, piter=iter)#
Tilt angle calculations.
- Based on work by Gordon Cooper (School of Geosciences, University of the
Witwatersrand, Johannesburg, South Africa)
- Parameters:
data1 (pygmi.raster.datatypes.Data) – data with matrix of double to be filtered
azi (float) – directional filter azimuth in degrees from East
s (int) – size of smoothing matrix to use - must be odd input 0 for no smoothing
k (int) – Factor for EHGA filter. Must be > 0. Optional.
showlog (collections.abc.Callable[..., None]) – Show information using a function. The default is print.
piter (collections.abc.Iterable) – Progress bar iterator. The default is iter.
- Returns:
t1 (
MaskedArray) – Standard tilt angleth (
MaskedArray) – Hyperbolic tilt anglet2 (
MaskedArray) – Second order tilt angleta (
MaskedArray) – Tilt Based Directional Derivativetdx (
MaskedArray) – Total Derivativetahg (
MaskedArray) – Tilt Angle of the Horizontal Gradientehga (
MaskedArray) – Enhanced Horizontal Gradient Amplitude
- Return type:
tuple[numpy.ma.MaskedArray, numpy.ma.MaskedArray, numpy.ma.MaskedArray, numpy.ma.MaskedArray, numpy.ma.MaskedArray, numpy.ma.MaskedArray, numpy.ma.MaskedArray]
- pygmi.maggrv.dataprep.nextpow2(n)#
Next power of 2.
- Based on work by Gordon Cooper (School of Geosciences, University of the
Witwatersrand, Johannesburg, South Africa).
- Parameters:
n (float | numpy.typing.NDArray) – Current value.
- Returns:
Next power of 2 output.
- Return type:
floatorndarray
- class pygmi.maggrv.dataprep.RTP(parent=None)#
Bases:
pygmi.misc.BasicModulePerform Reduction to the Pole on Magnetic data.
- Parameters:
parent – Reference to the parent routine. The default is None.
- setupui()#
Set up UI.
- 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.
- acceptall()#
Accept option.
Updates self.outdata, which is used as input to other modules.
- pygmi.maggrv.dataprep.rtp(data, I_deg, D_deg, Ia=20, showlog=print, piter=iter)#
Reduction to the pole.
- Parameters:
data (pygmi.raster.datatypes.Data) – PyGMI raster data.
I_deg (float) – Magnetic inclination.
D_deg (float) – Magnetic declination.
Ia (float) – Amplitude correction inclination Ia in degree. The default is 20.
showlog (collections.abc.Callable[..., None]) – Show information using a function. The default is print.
piter (collections.abc.Iterable) – Progress bar iterator. The default is iter.
- Returns:
PyGMI raster data.
- Return type:
Data
- pygmi.maggrv.dataprep.mlv_filter(image, win_size=5)#
Apply a 2D Mean of Least Variance (MLV) Edge Preserving Filter.
- Parameters:
image (numpy.typing.NDArray) – 2D grayscale input image (float32 or float64).
win_size (int) – Size of the square window (must be an odd integer), by default 5
- Returns:
Filtered 2D image.
- Return type:
ndarray