GXFFT class

class GXFFT(handle=0)[source]

GXFFT class.

This class allows for the application of predefined filters to data in an OASIS database. The system uses the Winograd algorithm to transform data in the spatial domain to the wavenumber or Fourier domain.

__init__(handle=0)[source]

Initialize self. See help(type(self)) for accurate signature.

add_white_noise(amp, option)[source]

Add white noise to the power spectrum of an FFT object.

Parameters
  • amp (float) – The value added to the real part of all non-DC components of the current power spectrum

  • option (int) – FFT_WHITE_NOISE constants

New in version 9.9.

License: Geosoft Extended End-User License

app_dens(thick, dens)[source]

Appparent density filter

Parameters
  • thick (float) – Thickness (meters) of the earth model

  • dens (float) – Background density (g/cm3) (default = 0)

New in version 5.0.

License: Geosoft Extended End-User License

app_susc(strength)[source]

Apparent susceptiblity filter

Parameters

strength (float) – Total magnetic field strength

New in version 5.0.

License: Geosoft Extended End-User License

Note: Reduction to magnetic pole (red_pol) and downward continuation (contin) should be called BEFORE using app_susc.

b_worth(clen, degree, filter_type)[source]

Butterworth filter

Parameters
  • clen (float) – Central cutoff wavelength (meter)

  • degree (float) – Degree of the filter function (default = 8.0)

  • filter_type (int) – Filter type: 1= Low-pass (regional) filter (default) 0= High-pass (residual) filter

New in version 5.0.

License: Geosoft Extended End-User License

band_pass(llen, hlen, pass_defined)[source]

Bandpass filter (using low and high wavelength cutoffs)

Parameters
  • llen (float) – Low Cutoff wavelength (meters)

  • hlen (float) – High Cutoff wavelength (meter)

  • pass_defined (int) – 1= Pass the defined band (default); 0= Reject the band

New in version 5.0.

License: Geosoft Extended End-User License

contin(dist)[source]

Upward/Downward continuation filter

Parameters

dist (float) – Distance to continue; positive = downwards negative = upwards

New in version 5.0.

License: Geosoft Extended End-User License

cos_roll(llen, hlen, degree, type)[source]

Cosine roll-off filter

Parameters
  • llen (float) – Low wavelength start point (meters)

  • hlen (float) – High wavelength end point (meters)

  • degree (float) – Degree of the filter function (default = 2.0)

  • type (int) – Filter type: 1= Low-pass (regional) filter (default) 0= High-pass (residual) filter

New in version 5.0.

License: Geosoft Extended End-User License

classmethod create(gvv, interv, trend)[source]

Create a New GXFFT with detrend options.

Parameters
Returns

GXFFT Object

Return type

GXFFT

New in version 5.0.

License: Geosoft Extended End-User License

Note: The detrending options control the removal of a trend from the data before the GXFFT is applied. The default data expansion is 10% before GXFFT.

classmethod create_ex(gvv, interv, trend, expansion)[source]

Create a New GXFFT with detrend and expansion options.

Parameters
  • gvv (GXVV) – GXVV to transform.

  • interv (float) – Element space interval

  • trend (int) – FFT_DETREND constants

  • expansion (float) – Minimum expansion %

Returns

GXFFT Object

Return type

GXFFT

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: The detrending options control the removal of a trend from the data before the GXFFT is applied. The expansion options control the minimum data expansion before the GXFFT is applied.

classmethod create_ref(gvv, interv, trend)[source]

Create GXFFT object with detrend options from reference (original) channel, but no GXFFT process.

Parameters
Returns

GXFFT Object

Return type

GXFFT

New in version 5.0.

License: Geosoft Extended End-User License

Note: This just creates an object. It is intended to be called immediately after with set_vv.

classmethod create_ref_ex(gvv, interv, trend, expansion, d_cmult)[source]

Create GXFFT object with detrend and expansion options from reference (original) channel, but no GXFFT process.

Parameters
  • gvv (GXVV) – GXVV contains channel data to perform GXFFT operations upon.

  • interv (float) – Element space interval, should be the same as in create_ex call

  • trend (int) – FFT_DETREND constants

  • expansion (float) – Minimum expansion %, should be the same as in create_ex call

  • d_cmult (float) – DC level multiple

Returns

GXFFT Object

Return type

GXFFT

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: This just creates an object. It is intended to be called immediately after with set_vv.

gaus(dev, type)[source]

Gaussian filter

Parameters
  • dev (float) – Standard deviation cutoff of function (meters)

  • type (int) – Filter type: 1= Low-pass (residual) filter (default) 0= High-pass (regional) filter

New in version 5.0.

License: Geosoft Extended End-User License

get_vv(gv_vr, gv_vi)[source]

Copies real and imaginary GXVV’s to user GXVV’s.

Parameters
  • gv_vr (GXVV) – Real component

  • gv_vi (GXVV) – Imaginary component

New in version 5.0.

License: Geosoft Extended End-User License

h_drv(order)[source]

Horizontal derivative

Parameters

order (float) – Order of differentiation (default = 1)

New in version 5.0.

License: Geosoft Extended End-User License

h_int()[source]

Horizontal integration

New in version 5.1.4.

License: Geosoft Extended End-User License

high_pass(wlen, fid_int)[source]

High bandpass filter

Parameters
  • wlen (float) – Cutoff wavelength (meter)

  • fid_int (float) – Fiducial increment of the GXFFT’s channel data

New in version 5.0.

License: Geosoft Extended End-User License

inverse(gvv, gv_vm)[source]

Inverse the GXFFT from wave number domain to space domain

Parameters
  • gvv (GXVV) – Output GXVV

  • gv_vm (GXVV) – Original GXVV which was used to create GXFFT (will be used as mask for output GXVV; no masking if this parameter is NULL)

New in version 5.0.

License: Geosoft Extended End-User License

is_null()[source]

Check if this is a null (undefined) instance

Returns

True if this is a null (undefined) instance, False otherwise.

Return type

bool

low_pass(wlen)[source]

Low bandpass filter

Parameters

wlen (float) – Cutoff wavelength (meters)

New in version 5.0.

License: Geosoft Extended End-User License

classmethod null()[source]

A null (undefined) instance of GXFFT

Returns

A null GXFFT

Return type

GXFFT

nyquist()[source]

Gets the Nyquist frequency (wavenumbers/sample unit).

Returns

Nyquist frequency (wavenumbers/sample unit).

Return type

float

New in version 5.0.

License: Geosoft Extended End-User License

rc_filter(clen, filter_type)[source]

RC filter

Parameters
  • clen (float) – Central cutoff wavelength (meter)

  • filter_type (int) – Filter type: 1= Low-pass (regional) filter (default) 0= High-pass (residual) filter

New in version 8.5.

License: Geosoft Extended End-User License

red_pol(inc, dec, incp, dir)[source]

Reduction to magnetic pole

Parameters
  • inc (float) – Geomagnetic inclination (degrees)

  • dec (float) – Geomagnetic declination (degrees)

  • incp (float) – Inclination (degrees) for amplitude correction (default = 20.0)

  • dir (float) – Direction (degrees) of Line from North

New in version 5.0.

License: Geosoft Extended End-User License

samp_incr()[source]

Gets the original sample increment.

Returns

Original sample increment.

Return type

float

New in version 5.0.

License: Geosoft Extended End-User License

set_vv(gv_vr, gv_vi)[source]

Sets real and imaginary VVs in GXFFT.

Parameters
  • gv_vr (GXVV) – Real component

  • gv_vi (GXVV) – Imaginary component

New in version 5.0.

License: Geosoft Extended End-User License

Note: The GXVV must have been obtained from the same GXFFT using the set_vv method.

spectrum(gvv)[source]

Calculates a power spectrum

Parameters

gvv (GXVV) – Output power spectrum GXVV

New in version 5.0.

License: Geosoft Extended End-User License

v_drv(order)[source]

Vertical derivative

Parameters

order (float) – Order of differentiation (default = 1)

New in version 5.0.

License: Geosoft Extended End-User License

v_int()[source]

Vertical integration

New in version 5.0.

License: Geosoft Extended End-User License

wave_incr()[source]

Get the wave number increment.

Returns

Wave number increment

Return type

float

New in version 5.0.

License: Geosoft Extended End-User License

write_spectrum(gvv, out_file)[source]

Writes a power spectrum to a file

Parameters
  • gvv (GXVV) – Output power spectrum GXVV

  • out_file (str) – File name for output spectrum

New in version 5.0.

License: Geosoft Extended End-User License

FFT_DETREND constants

Detrending option

FFT_DETREND_NONE

No trend remove

gxapi.FFT_DETREND_NONE = 0
FFT_DETREND_ENDS

Detrend order 1 using only two end points

gxapi.FFT_DETREND_ENDS = 1
FFT_DETREND_ALL

Detrend order 1 using all data points

gxapi.FFT_DETREND_ALL = 2
FFT_DETREND_MEAN

Remove mean value

gxapi.FFT_DETREND_MEAN = 3

FFT_WHITE_NOISE constants

Add white noise option

FFT_WHITE_NOISE_ADD

Add the input value to the real part of all non-DC components of the current power spectrum

gxapi.FFT_WHITE_NOISE_ADD = 0
FFT_WHITE_NOISE_SET

Set non-DC components to the input value and set the DC value to 0.0

gxapi.FFT_WHITE_NOISE_SET = 1