GXIP class

class geosoft.gxapi.GXIP
This class is used in the IP System for the import, export
and processing of Induced Polarization data.

Note:

The following defines are used in GX code but are not
part of any functions:

IP_ARRAY constants
IP_CHANNELS constants
IP_LINES constants
a_spacing((GXDB)arg1, (str)arg2) → float:
Return the A-Spacing for the input line. If necessary, first imports the specified line into the IP object.
Parameters:
Returns:

The A-Spacing value. If there are multiple A-Spacings, the base or smallest value. This value could be rDUMMY for some arrays (such as 3D) where no A-Spacing is explicitly defined.

Return type:

float

New in version 8.1.0.

average_duplicates_qc((GXDB)arg1, (str)arg2, (str)arg3, (int)arg4) → None:
Average duplicate samples in a database.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.3.0.

Note:

Averages all values with shared station and N values,
as long as the mask channel is defined at that FID.
Previous averaged values (IP_DATA_AVG) are overwritten according to the
overwrite flag.
If the QC channel is selected, only those rows of data where the QC channel
value is "1" will be included in the average.
static convert_ubcip2_d_to_grid((str)arg1, (GXPG)arg2, (GXVV)arg3, (GXVV)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (int)arg9) → None:
Convert a UBC 2D model to a regular grid.
Parameters:
  • arg1 (str) – Output grid file name
  • arg2 (geosoft.gxapi.GXPG) – Model data
  • arg3 (geosoft.gxapi.GXVV) – Model cells sizes (input)
  • arg4 (geosoft.gxapi.GXVV) – Model cells sizes (input)
  • arg5 (float) – Top-left corner X
  • arg6 (float) – Top-left corner Z
  • arg7 (float) – Output grid cell size in X
  • arg8 (float) – Output grid cell size in Z
  • arg9 (int) – Output reciprocal of values (0:No, 1:Yes) for resistivity?
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

Uses TIN gridding to sample the model.
By setting the final value, a resistivity grid can be
created from conductivity data.
static create() → GXIP:
Create IP.
Returns:IP Object
Return type:geosoft.gxapi.GXIP

New in version 5.0.0.

create_default_job((str)arg1, (int)arg2) → None:
Create a default job from scratch.
Parameters:
  • arg1 (str) – File name of the INI file to create (forces correct suffix)
  • arg2 (int) – IP_PLOT constants
Returns:

Nothing

Return type:

None

New in version 6.1.0.

export_data_to_ubc_3d((GXDB)arg1, (GXLST)arg2, (int)arg3, (int)arg4, (str)arg5, (str)arg6, (str)arg7, (int)arg8, (str)arg9, (str)arg10) → None:
Export of IP data to UBC 3D IP format.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – DB object
  • arg2 (geosoft.gxapi.GXLST) – Lines to export (Name, Symbol)
  • arg3 (int) – Locations only (0: No, 1: Yes)?
  • arg4 (int) – Include Z values (0: No, 1: Yes)?
  • arg5 (str) – IP channel name (can be “” if exporting locations only)
  • arg6 (str) – Error channel name (can be “” if exporting locations only)
  • arg7 (str) – Mask channel name (can be “”)
  • arg8 (int) – IPTYPE (1: Vp, 2: Chargeability)
  • arg9 (str) – Comments (can be “”)
  • arg10 (str) – Output OBS file name
Returns:

Nothing

Return type:

None

New in version 9.2.

Note:

Outputs a *.DAT" file of the survey data for use in the
UBC IP 3D inversion programmes.
export_i2_x((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (str)arg6, (str)arg7, (str)arg8, (str)arg9, (str)arg10, (str)arg11) → None:
Export line(s) to an Interpex RESIX I2X format file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to export from
  • arg2 (str) – Name of the file
  • arg3 (str) – Name of the line
  • arg4 (str) – Resistivity (data) channel
  • arg5 (str) – IP (data) channel (can be “”)
  • arg6 (str) – Image model resistivity channel (can be “”)
  • arg7 (str) – Image model IP channel (can be “”)
  • arg8 (str) – Image model synthetic resistivity channel (can be “”)
  • arg9 (str) – Image model synthetic IP channel (can be “”)
  • arg10 (str) – Resistivity (polygon) channel (can be “”)
  • arg11 (str) – IP (polygon) channel (can be “”)
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Exports a line to an ".I2X" file.
export_ipdata((GXDB)arg1, (str)arg2, (str)arg3) → None:
Exports data in the Geosoft IPDATA format.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to export from
  • arg2 (str) – Channel to export
  • arg3 (str) – Title for IPDATA files
Returns:

Nothing

Return type:

None

New in version 5.0.0.

export_ipdata_dir((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Exports data in the Geosoft IPDATA format in the specified directory
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to export from
  • arg2 (str) – Channel to export
  • arg3 (str) – Title for IPDATA files
  • arg4 (str) – Directory for IPDATA files
Returns:

Nothing

Return type:

None

New in version 6.4.0.

export_ipred((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (int)arg5, (str)arg6, (float)arg7, (float)arg8, (int)arg9) → None:
Exports pseudo-section in the Geosoft IPRED format.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to export from
  • arg2 (str) – Title for first line of file
  • arg3 (str) – Channel to process
  • arg4 (str) – File suffix (type)
  • arg5 (int) – IP_FILTER constants
  • arg6 (str) – The Fraser Filter weights
  • arg7 (float) – First Station position (rDUMMY for default)
  • arg8 (float) – Last Station position (rDUMMY for default)
  • arg9 (int) – Maximum n spacing
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The Fraser Filter weights apply to each N expansion above,
and are listed as w1,w2,w3,...   Unspecified values beyond
the list's end are set to 1.0.
export_ipred_dir((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (int)arg5, (str)arg6, (float)arg7, (float)arg8, (int)arg9, (str)arg10) → None:
Exports pseudo-section in the Geosoft IPRED format in the specified directory
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to export from
  • arg2 (str) – Title for first line of file
  • arg3 (str) – Channel to process
  • arg4 (str) – File suffix (type)
  • arg5 (int) – IP_FILTER constants
  • arg6 (str) – The Fraser Filter weights
  • arg7 (float) – First Station position (rDUMMY for default)
  • arg8 (float) – Last Station position (rDUMMY for default)
  • arg9 (int) – Maximum n spacing
  • arg10 (str) – Directory to export to
Returns:

Nothing

Return type:

None

New in version 6.4.0.

Note:

The Fraser Filter weights apply to each N expansion above,
and are listed as w1,w2,w3,...   Unspecified values beyond
the list's end are set to 1.0.
export_line_ipdata((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Exports one line of data in the Geosoft IPDATA format.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to export from
  • arg2 (str) – Line to export
  • arg3 (str) – Channel to export
  • arg4 (str) – Title for IPDATA files
Returns:

Nothing

Return type:

None

New in version 5.1.8.

export_sgdf((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Exports data to a Scintrex Geophysical Data Format file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to export from
  • arg2 (str) – SGDF file to create
  • arg3 (str) – Time Domain channel or Frequency Amplitude Channel
  • arg4 (str) – Frequency Domain Phase channel (optional)
Returns:

Nothing

Return type:

None

New in version 5.0.0.

export_ubc_res3((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (str)arg6, (str)arg7, (float)arg8) → None:
Export of IP Resistivity data to UBC format.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – DB object
  • arg2 (str) – Output line name
  • arg3 (str) – Output voltage channel name
  • arg4 (str) – Output current channel name
  • arg5 (str) – Output error channel name (“” for none)
  • arg6 (str) – Output OBS file name
  • arg7 (str) – Output TOPO file name
  • arg8 (float) – version number (3 or 5)
Returns:

Nothing

Return type:

None

New in version 8.1.0.

Note:

Outputs a *.DAT" file of the survey data for use in the
UBC 2D inversion programme DCINV2D.
Voltage and current channels should be in units such that
V/I gives volts/amp (or mV/mA).
static export_ubc_res_control((str)arg1, (int)arg2, (int)arg3, (float)arg4, (str)arg5, (str)arg6, (str)arg7, (str)arg8, (float)arg9, (str)arg10, (str)arg11) → None:
Export a control file for using in the UBC DCINV2D programme.
Parameters:
  • arg1 (str) – Output control file name
  • arg2 (int) – niter
  • arg3 (int) – irest
  • arg4 (float) – chifact
  • arg5 (str) – RES obs file
  • arg6 (str) – mesh file
  • arg7 (str) – topography file (required)
  • arg8 (str) – initial model file (can be “” or “NULL”)
  • arg9 (float) – reference model conductivity
  • arg10 (str) – alphas
  • arg11 (str) – weights file
Returns:

Nothing

Return type:

None

New in version 6.4.0.

Note:

UBC Version 3.
Outputs a control file for use in the
UBC 2D resistivity inversion programme DCINV2D.
Superceded by ExportUBCResControl2_IP, which has a selection for output version number.
static export_ubc_res_control_v5((str)arg1, (int)arg2, (float)arg3, (str)arg4, (str)arg5, (int)arg6, (str)arg7, (int)arg8, (str)arg9, (int)arg10, (str)arg11, (int)arg12, (str)arg13, (str)arg14) → None:
Export a control file for using in the UBC DCINV2D programme.
Parameters:
  • arg1 (str) – Output control file name
  • arg2 (int) – niter
  • arg3 (float) – chifact
  • arg4 (str) – RES obs file
  • arg5 (str) – topography file (required)
  • arg6 (int) – Mesh type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
  • arg7 (str) – mesh file (can be “”) or value
  • arg8 (int) – Initial model type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
  • arg9 (str) – initial model file (can be “”) or value
  • arg10 (int) – Reference model type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
  • arg11 (str) – reference model file (can be “”) or value(
  • arg12 (int) – Alphas type IP_UBC_CONTROL constants FILE, VALUE, LENGTH or DEFAULT
  • arg13 (str) – alphas file (can be “”), value or length
  • arg14 (str) – weights file
Returns:

Nothing

Return type:

None

New in version 8.1.0.

Note:

UBC Version 5
                       Outputs a control file for use in the
UBC 2D resistivity inversion programme DCINV2D.
export_ubcip3((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (str)arg6, (float)arg7) → None:
Export of IP data to UBC format.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – DB object
  • arg2 (str) – Output line name
  • arg3 (str) – Output IP channel name
  • arg4 (str) – Output error channel name (“” for none)
  • arg5 (str) – Output OBS file name
  • arg6 (str) – Output TOPO file name
  • arg7 (float) – version number (3 or 5)
Returns:

Nothing

Return type:

None

New in version 8.1.

Note:

Outputs a *.DAT" file of the survey data for use in the
UBC 2D inversion programme IPINV2D.
Include error channel output and version-specific formatting.
static export_ubcip_control((str)arg1, (int)arg2, (int)arg3, (float)arg4, (str)arg5, (str)arg6, (str)arg7, (str)arg8, (str)arg9, (str)arg10, (str)arg11, (str)arg12) → None:
Export a control file for using in the UBC IPINV2D programme.
Parameters:
  • arg1 (str) – Output control file name
  • arg2 (int) – niter
  • arg3 (int) – irest
  • arg4 (float) – chifact
  • arg5 (str) – IP obs file
  • arg6 (str) – conductivity file
  • arg7 (str) – mesh file
  • arg8 (str) – topography file
  • arg9 (str) – initial model file
  • arg10 (str) – reference model
  • arg11 (str) – alphas
  • arg12 (str) – weights file
Returns:

Nothing

Return type:

None

New in version 6.4.0.

Note:

UBC Version 3 Control file.
Outputs a control file for use in the
UBC 2D IP inversion programme IPINV2D.
static export_ubcip_control_v5((str)arg1, (int)arg2, (float)arg3, (str)arg4, (str)arg5, (int)arg6, (str)arg7, (int)arg8, (str)arg9, (int)arg10, (str)arg11, (int)arg12, (str)arg13, (int)arg14, (str)arg15, (str)arg16) → None:
Export a control file for using in the UBC IPINV2D programme.
Parameters:
  • arg1 (str) – Output control file name
  • arg2 (int) – niter
  • arg3 (float) – chifact
  • arg4 (str) – RES obs file
  • arg5 (str) – topography file (required)
  • arg6 (int) – Conductivity type IP_UBC_CONTROL constants FILE or VALUE
  • arg7 (str) – Conductivity file (can be “”) or value
  • arg8 (int) – Mesh type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
  • arg9 (str) – mesh file (can be “”) or value
  • arg10 (int) – Initial model type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
  • arg11 (str) – initial model file (can be “”) or value
  • arg12 (int) – Reference model type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
  • arg13 (str) – reference model file (can be “”) or value(
  • arg14 (int) – Alphas type IP_UBC_CONTROL constants FILE, VALUE, LENGTH or DEFAULT
  • arg15 (str) – alphas file (can be “”), value or length
  • arg16 (str) – weights file
Returns:

Nothing

Return type:

None

New in version 8.1.0.

Note:

UBC Version 5 Control file.
get_chan_domain((GXDB)arg1, (str)arg2) → int:
Is this channel registered as a Time or Frequency domain channel?
Parameters:
Returns:

IP_DOMAIN constants

Return type:

int

New in version 5.1.8.

static get_chan_label((str)arg1, (str_ref)arg2, (str_ref)arg3) → None:
Get the default label and units for a given channel.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

get_channel_info((GXDB)arg1, (str)arg2, (int_ref)arg3, (float_ref)arg4, (int_ref)arg5, (GXVV)arg6) → None:
Time Windows or Frequency info from a channel.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.1.0.

get_electrode_locations_and_mask_values((GXDB)arg1, (str)arg2, (int)arg3, (GXVV)arg4, (GXVV)arg5, (GXVV)arg6, (GXVV)arg7) → None:
Get unique electrodes, along with current mask info.
Parameters:
Returns:

Nothing

Return type:

None

New in version 9.0.0.

Note:

The mask values are determined from the first row where a given electrode is found.
Values returned for all currently selected lines.
get_electrode_locations_and_mask_values2((GXDB)arg1, (str)arg2, (int)arg3, (GXVV)arg4, (GXVV)arg5, (GXVV)arg6, (GXVV)arg7, (GXVV)arg8) → None:
Get unique electrodes, along with current mask info.
Parameters:
Returns:

Nothing

Return type:

None

New in version 9.2.0.

Note:

The mask values are determined from the first row where a given electrode is found.
Values returned for all currently selected lines.
get_n_value_lst((GXDB)arg1, (GXLST)arg2) → None:
Fill a list with unique N values in selected lines.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.1.0.

static get_qc_channel((GXDB)arg1, (int)arg2, (str_ref)arg3) → int:
Get the QC channel handle, if it exists.
Parameters:
Returns:

Channel handle, NULLSYMB constant if not found

Return type:

int

New in version 9.2.0.

Note:

For IP, looks for "QC_IP", then "QC_OffTime", then "QC".
For Resistivity, looks for "QC_Res", then "QC_OnTime" (case insensitive).
get_topo_line((GXDB)arg1, (str)arg2, (float)arg3, (float)arg4, (float)arg5, (GXVV)arg6) → None:
Get topography values for a line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import data to
  • arg2 (str) – Line name
  • arg3 (float) – Starting “X” (station) value (rDUMMY for default)
  • arg4 (float) – Ending “X” (station) value (rDUMMY for default)
  • arg5 (float) – “X” increment along the line (rDUMMY for default = half “A” separation)
  • arg6 (geosoft.gxapi.GXVV) – Returned topography values
Returns:

Nothing

Return type:

None

New in version 6.4.2.

Note:

If topography info is available, returns values calculated for
the input line. If no topography is available, returned values
will be dummies. Values between actual data are interpolated using
the Akima spline. Ends are extrapolated using the end data points.
import_dump((int)arg1, (GXDB)arg2, (str)arg3) → None:
Imports data from an IP instrument dump file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

import_grid((GXDB)arg1, (str)arg2, (str)arg3) → None:
Imports data from a grid
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import data to
  • arg2 (str) – The name of the grid file, with decorations
  • arg3 (str) – The name of the channel to import to
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Data is imported to the specified channel.
The values are interpolated at each row's X and Y
positions.
import_i2_x((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (str)arg6, (str)arg7, (str)arg8, (str)arg9, (str)arg10, (str)arg11, (int)arg12) → None:
Imports an Interpex RESIX I2X format file to a line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import to
  • arg2 (str) – Name of file to import
  • arg3 (str) – Line to import to
  • arg4 (str) – Resistivity (data) channel
  • arg5 (str) – IP (data) channel (can be “”)
  • arg6 (str) – Image model resistivity channel (can be “”)
  • arg7 (str) – Image model IP channel (can be “”)
  • arg8 (str) – Image model synthetic resistivity channel (can be “”)
  • arg9 (str) – Image model synthetic IP channel (can be “”)
  • arg10 (str) – Resistivity (polygon) channel (can be “”)
  • arg11 (str) – IP (polygon) channel (can be “”)
  • arg12 (int) – IP_I2XIMPMODE constants
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Imports a single ".I2X" file to a specified line.
If the line does not exist, it will be created.
import_i2_x_ex((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (str)arg6, (str)arg7, (str)arg8, (str)arg9, (str)arg10, (str)arg11, (str)arg12, (str)arg13, (int)arg14) → None:
Same as geosoft.gxapi.GXIP.import_i2_x(), with Zonge data imported as well.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import to
  • arg2 (str) – Name of file to import
  • arg3 (str) – Line to import to
  • arg4 (str) – Resistivity (data) channel
  • arg5 (str) – IP (data) channel (can be “”)
  • arg6 (str) – Image model resistivity channel (can be “”)
  • arg7 (str) – Image model IP channel (can be “”)
  • arg8 (str) – Image model synthetic resistivity channel (can be “”)
  • arg9 (str) – Image model synthetic IP channel (can be “”)
  • arg10 (str) – Resistivity (polygon) channel (can be “”)
  • arg11 (str) – IP (polygon) channel (can be “”)
  • arg12 (str) – Zonge Resistivity channel (can be “”)
  • arg13 (str) – Zonge IP channel (can be “”)
  • arg14 (int) – IP_I2XIMPMODE constants
Returns:

Nothing

Return type:

None

New in version 6.1.0.

Note:

Imports a single ".I2X" file to a specified line.
If the line does not exist, it will be created.
import_instrumentation_gdd((GXDB)arg1, (str)arg2) → None:
Imports an Instrumentation GDD format file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.0.0.

import_ipdata((GXDB)arg1, (str)arg2, (str)arg3) → None:
Imports data in the Geosoft IPDATA format.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import to
  • arg2 (str) – IPDATA file name
  • arg3 (str) – Channel to import to
Returns:

Nothing

Return type:

None

New in version 5.0.0.

import_ipdata2((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Imports data in the Geosoft IPDATA format - up to two arrays.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import to
  • arg2 (str) – IPDATA file name
  • arg3 (str) – Channel to import to (default is “IP”)
  • arg4 (str) – (optional) Second channel to import to
Returns:

Nothing

Return type:

None

New in version 5.1.0.

Note:

The second channel may be specified for frequency domain data sets
with two array channels; e.g. amplitude and phase, or real and
imaginary parts. If the second channel is specified, and no
time or frequncy information is specified in the header (using
the T= or F= fields) then the import is assumed to be frequency
domain.
import_ipred((GXDB)arg1, (str)arg2, (str)arg3) → None:
Imports data from the Geosoft IPRED format.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import to
  • arg2 (str) – File to import from
  • arg3 (str) – Channel to import
Returns:

Nothing

Return type:

None

New in version 5.1.0.

Note:

This import produces a limited IP data set with no Current "I",
Voltage "Vp" or Apparent Resistivity "ResApp" values.
import_merge_ipred((GXDB)arg1, (str)arg2, (str)arg3) → None:
Imports IPRED data to an existing line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import to
  • arg2 (str) – File to import from
  • arg3 (str) – Channel to import
Returns:

Nothing

Return type:

None

New in version 5.1.8.

Note:

Exits with error if the line does not exist.
Data is merged on basis of Stn and N value.
import_sgdf((GXDB)arg1, (str)arg2) → None:
Imports data from a Scintrex Geophysical Data Format file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

import_topo_csv((GXDB)arg1, (str)arg2) → None:
Imports topography data from a CSV line-station file
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to calculate topography for
  • arg2 (str) – The name of CSV file
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The elevation of each point in the current database
is interpolated from the input topography values.
import_topo_grid((GXDB)arg1, (str)arg2) → None:
Imports topography data from a grid
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to calculate topography for
  • arg2 (str) – The name of the grid file, with decorations
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The elevation of each point in the current database
is interpolated from the input topography grid.
static import_ubc2_d_topo((str)arg1, (float_ref)arg2, (GXVV)arg3, (GXVV)arg4) → None:
Import a Topography file from the UBC IPINV2D programme.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

Imports the maximum elevation (top of mesh)
as well as the topo (X, Z) values.
static import_ubc2_dmod((str)arg1, (int)arg2) → GXPG:
Import a MOD file from the UBC IPINV2D programme.
Parameters:
  • arg1 (str) – UBC MOD file name to import
  • arg2 (int) – 0 - CON, 1 - CHG
Returns:

PG Object

Return type:

geosoft.gxapi.GXPG

New in version 7.1.0.

Note:

Imports the MOD file values to a PG object.
The CON/CHG selection is necessary because the import sets
padding values to dummies based on the type of file.
static import_ubc2_dmsh((str)arg1, (float_ref)arg2, (float_ref)arg3, (GXVV)arg4, (GXVV)arg5) → None:
Import a MSH file from the UBC IPINV2D programme.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

Imports the MSH file geometry.
import_zonge_avg((GXDB)arg1, (str)arg2, (float)arg3, (int)arg4, (float)arg5) → None:
Imports a Zonge AVG format file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to import to
  • arg2 (str) – FLD file name
  • arg3 (float) – Line number (will be scaled if applicable)
  • arg4 (int) – IP_STNSCALE constants
  • arg5 (float) – Line, station multiplier (for IP_STNSCALE_VALUE)
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

See geosoft.gxapi.GXIP.import_zonge_fld()
import_zonge_fld((GXDB)arg1, (str)arg2, (int)arg3, (float)arg4) → None:
Imports a Zonge FLD format file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The Zonge Line and Station numbers may not be the X or Y position
values, and a conversion is required.
The line direction is taken from the IP setup values.
is_null() → bool

Check if the instance of geosoft.gxapi.GXIP is null (undefined)

Returns:True if this is a null instance of geosoft.gxapi.GXIP, False otherwise.
Return type:bool`
is_valid_line((GXDB)arg1, (str)arg2) → int:
See if a given database line is registered for the IP system
Parameters:
Returns:

1 if the line is a valid IP line, 0 if not

Return type:

int

New in version 8.1.0.

line_array_type((GXDB)arg1, (str)arg2) → int:
Return the type of IP array for the input line. If necessary, first imports the specified line into the IP object
Parameters:
Returns:

IP_ARRAY constants

Return type:

int

New in version 8.1.0.

new_xy_database((GXDB)arg1, (GXDB)arg2, (GXVV)arg3, (str)arg4, (float)arg5) → None:
Create a subset database using a mask channel, "N" value
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

A mask channel can be used to select a subset of the data.
A single N value can also be selected (Dummy for all).
static null() → GXIP

A null (undefined) instance of geosoft.gxapi.GXIP

Returns:A null geosoft.gxapi.GXIP
Return type:geosoft.gxapi.GXIP
open_job((str)arg1, (int)arg2) → None:
Open a IP plotting job
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.1.0.

pldp_convention() → int:
Return the user's plot point convention for pole-dipole arrays.
Returns:The user’s PLDP plot point convention IP_PLDP_CONV constants
Return type:int

New in version 8.1.0.

ps_stack((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Create a stacked pseudo-section plot using a control file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – DB object
  • arg2 (str) – channel to plot
  • arg3 (str) – “IPPLOT” INI file name
  • arg4 (str) – map name to create
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The control file is created using the IPSTAKCON GX. It may then
be modified by hand as required.
ps_stack2((GXDB)arg1, (str)arg2, (str)arg3, (int)arg4, (str)arg5) → None:
As geosoft.gxapi.GXIP.ps_stack(), but select section spacing option.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.0.

ps_stack2_dir((GXDB)arg1, (str)arg2, (str)arg3, (int)arg4, (str)arg5, (str)arg6) → None:
Same as geosoft.gxapi.GXIP.pseudo_plot2(), but with directory specified.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – DB object
  • arg2 (str) – channel to plot
  • arg3 (str) – “IPPLOT” INI file name
  • arg4 (int) – IP_STACK_TYPE constants
  • arg5 (str) – map name to create
  • arg6 (str) – directory to create files
Returns:

Nothing

Return type:

None

New in version 6.4.0.

pseudo_plot((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Create pseudo-sections of a single line using a control file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – “IPPLOT” INI file name
  • arg3 (str) – current line name
  • arg4 (str) – map name to create
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The control file is created using the IPPLTCON GX. It may then
be modified by hand as required.
pseudo_plot2((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5) → None:
Same as geosoft.gxapi.GXIP.pseudo_plot(), but specify a tag for grids created.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – “IPPLOT” INI file name
  • arg3 (str) – current line name
  • arg4 (str) – tag for created grids
  • arg5 (str) – map name to create
Returns:

Nothing

Return type:

None

New in version 5.1.8.

Note:

The control file is created using the IPPLTCON GX. It may then
be modified by hand as required.
pseudo_plot2_dir((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (str)arg6) → None:
Same as geosoft.gxapi.GXIP.pseudo_plot2(), but with directory specified.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – “IPPLOT” INI file name
  • arg3 (str) – current line name
  • arg4 (str) – tag for created grids
  • arg5 (str) – map name to create
  • arg6 (str) – directory to create files
Returns:

Nothing

Return type:

None

New in version 6.4.0.

Note:

The control file is created using the IPPLTCON GX. It may then
be modified by hand as required.
qc_chan_lst((GXDB)arg1, (GXLST)arg2) → None:
Fill a list with QC channels.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.3.0.

Note:

Searches for the following QC channels existing in a database:
QC, QC_RES.
recalculate((GXDB)arg1) → None:
Recalculate derived channel values.
Parameters:arg1 (geosoft.gxapi.GXDB) – Database
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

This function recalculates "derived" channel values from
"core" data.
1. Recalculates the "STN" and "N" channels, using the TX1,
   TX2, RX1 and RX2 channels (depending on the system).
2. Recalculates the apparent resistivity "ResCalc",
   average "IP_Avg" and metal factor "MF" channels
3. Recalculates the "X" and "Y" channels. One of these will
   be equal to "STN", the other to the internally stored
   line number for the current line.
4. Recalculate the "Z" channel, based on the current "Topo"
   channel, and the "N" values.

Warning: If you make a change to an electrode location, you
would have to call geosoft.gxapi.GXIP.recalculate(), then recalculate "Topo"
(since the X and Y values would have changed), then call
geosoft.gxapi.GXIP.recalculate_z(), since "Z" values are based on "Topo" values.
recalculate_ex((GXDB)arg1, (int)arg2) → None:
Recalculate derived channel values, with option for including/excluding location calculations.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Recalculate XYZ locations (TRUE or FALSE)?
Returns:

Nothing

Return type:

None

New in version 8.0.0.

Note:

See geosoft.gxapi.GXIP.recalculate(). This version allows you to suppress the recalculation of the
current X, Y and Z channel values from the station locations.
recalculate_z((GXDB)arg1) → None:
Recalculate Z channel values.
Parameters:arg1 (geosoft.gxapi.GXDB) – Database
Returns:Nothing
Return type:None

New in version 5.1.1.

Note:

The "Z" channel values are calculated as follows:
If the "Topo" value is defined, then
Z = Topo - 0.5*N*A, where "N" is the N-spacing, and
A is the A-spacing. If the Topography is not defined, then
it is assumed to be equal to 0.
save_job((str)arg1, (int)arg2) → None:
Save a IP plotting job
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.1.0.

set_channel_info((GXDB)arg1, (str)arg2, (int)arg3, (float)arg4, (int)arg5, (GXVV)arg6) → None:
Set Time Windows or Frequency info for a channel.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.1.0.

set_electrode_mask_values((GXDB)arg1, (str)arg2, (int)arg3, (GXVV)arg4, (GXVV)arg5, (GXVV)arg6, (GXVV)arg7) → None:
Set unique electrodes, along with current mask info.
Parameters:
Returns:

Nothing

Return type:

None

New in version 9.0.0.

Note:

Mask values are set for all included electrode locations, currently selected lines.
set_electrode_mask_values_single_qc_channel((GXDB)arg1, (str)arg2, (int)arg3, (int)arg4, (GXVV)arg5, (GXVV)arg6, (GXVV)arg7) → None:
Set unique electrodes, along with current mask info.
Parameters:
Returns:

Nothing

Return type:

None

New in version 9.2.0.

Note:

Mask values are set for all included electrode locations, currently selected lines.
set_import_mode((int)arg1) → None:
When importing data to a line, set append/overwrite mode.
Parameters:arg1 (int) – 0: Overwrite, 1: Append
Returns:Nothing
Return type:None

New in version 6.3.0.

Note:

By default, importing data overwrites existing data.
Call this function before doing the import in order
to append imported data to existing data.
"Short" data channels will be dummied to the existing
data length before the new data is appended.
static trim_ubc2_d_model((GXPG)arg1, (int)arg2, (int)arg3, (int)arg4, (GXVV)arg5, (GXVV)arg6, (float_ref)arg7) → GXPG:
Trim the padding cells from the UBC IPINV2D Model.
Parameters:
Returns:

PG Object

Return type:

geosoft.gxapi.GXPG

New in version 7.1.0.

Note:

The cells are removed from the left, right and bottom.
The returned PG is the trimmed version.
The input cell size VVs are also trimmed to match,
and the origin is updated (still upper left corner).
window((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Window an IP array channel to produce a normal channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – DB object
  • arg2 (str) – VA channel to use
  • arg3 (str) – New channel
  • arg4 (str) – Window list
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The array channels cannot be used directly to produce sections.
geosoft.gxapi.GXIP.window() allows the user to select one or more of the windows
and create a new channel. In time domain, if more than one channel
is selected a weighted sum is performed, according to window widths.
In frequency domain a simple sum is performed.
Window List Syntax:
static winnow_chan_list((GXLST)arg1) → None:
Removes obviously non-pseudo-section type channels from list.
Parameters:arg1 (geosoft.gxapi.GXLST) – List of channels
Returns:Nothing
Return type:None

New in version 5.0.0.

static winnow_chan_list2((GXLST)arg1, (GXDB)arg2) → None:
Same as geosoft.gxapi.GXIP.winnow_chan_list(), but removes current X,Y,Z.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

write_distant_electrodes((GXDB)arg1) → None:
Write distant electrode locations to channels
Parameters:arg1 (geosoft.gxapi.GXDB) – DB object
Returns:Nothing
Return type:None

New in version 6.3.0.

Note:

Writes values for ALL lines.
write_distant_electrodes_lst((GXDB)arg1, (GXLST)arg2) → None:
Write distant electrode locations to channels for a LST of lines
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.4.2.

Note:

Writes values for lines in the input LST.

IP_ARRAY constants

IP Array options
gxapi.IP_ARRAY_DPDP = 0
gxapi.IP_ARRAY_PLDP = 1
gxapi.IP_ARRAY_PLPL = 2
gxapi.IP_ARRAY_GRAD = 3
gxapi.IP_ARRAY_WENNER = 5
gxapi.IP_ARRAY_SCHLUMBERGER = 6
gxapi.IP_ARRAY_UNKNOWN = 7
gxapi.IP_ARRAY_3D = 9
gxapi.IP_ARRAY_3D_PLDP = 10
gxapi.IP_ARRAY_3D_PLPL = 11

IP_CHANNELS constants

Channels to display
gxapi.IP_CHANNELS_DISPLAYED = 0
gxapi.IP_CHANNELS_SELECTED = 1
gxapi.IP_CHANNELS_ALL = 2

IP_DOMAIN constants

Types of Domains
gxapi.IP_DOMAIN_NONE = -1
gxapi.IP_DOMAIN_TIME = 0
gxapi.IP_DOMAIN_FREQUENCY = 1
gxapi.IP_DOMAIN_BOTH = 2

IP_DUPLICATE constants

How to handle duplicates
gxapi.IP_DUPLICATE_APPEND = 0
gxapi.IP_DUPLICATE_OVERWRITE = 1

IP_FILTER constants

Fraser Filters
gxapi.IP_FILTER_PANTLEG = 1
Regular pant-leg filter:    _!_  maxn:
/\ `*`\ _\ `*`\ \   n1
/\ `*`\ / \\ `*`\ \  n2
/\ `*`\ /   \\ `*`\ \ n3
:  :
gxapi.IP_FILTER_PANTLEGP = 2
Regular pant-leg filter with top at first point:
!  nscp:
/\ `*`\ \   n1
/\ `*`\ _\ `*`\ \  n2
/\ `*`\ / \\ `*`\ \ n3
:  :
gxapi.IP_FILTER_PYRIAMID = 3
Regular pyramid filter:     _!_  maxn:
/\ `*`\  \ `*`\ \   n1
/\ `*`\  \ `*`\  \ `*`\ \  n2
/\ `*`\  \ `*`\  \ `*`\  \ `*`\ \ n3
:  :
gxapi.IP_FILTER_PYRIAMIDP = 4
Regular pyramid filter      !  maxn:
with peak on a point:      /\ `*`\ \   n1
/\ `*`\  \ `*`\ \  n2
/\ `*`\  \ `*`\  \ `*`\ \ n3
:  :

IP_I2XIMPMODE constants

Interpext Import Mode
gxapi.IP_I2XIMPMODE_REPLACE = 0
Recreates the line from scratch.
gxapi.IP_I2XIMPMODE_MERGE = 1
Looks for matching Tx1 and N values and
replaces data in matching lines only.

IP_I2XINV constants

Type of Inversion
gxapi.IP_I2XINV_IMAGE = 0
gxapi.IP_I2XINV_ZONGE = 1

IP_LINES constants

Lines to display
gxapi.IP_LINES_DISPLAYED = 0
gxapi.IP_LINES_SELECTED = 1
gxapi.IP_LINES_ALL = 2

IP_PLOT constants

Type of Plot
gxapi.IP_PLOT_PSEUDOSECTION = 0
gxapi.IP_PLOT_STACKEDSECTION = 1

IP_QCTYPE constants

Type of Measurement
gxapi.IP_QCTYPE_RESISTIVITY = 0
Resistivity
gxapi.IP_QCTYPE_IP = 1
IP

IP_STACK_TYPE constants

Spacing Types
gxapi.IP_STACK_TYPE_MAP = 0
Use map-based spacing, and preserve the directions of the
original lines by rotating the sections as desired to their true
locations. (At present only N-S and E-W sections are supported).
gxapi.IP_STACK_TYPE_EQUAL = 1
Spaces the sections equally, with enough room to
guarantee no overlap with high N-values or closely spaced lines.
gxapi.IP_STACK_TYPE_GEOGRAPHIC = 2
Now the same as IP_STACK_MAP

IP_STNSCALE constants

Station Scaling
gxapi.IP_STNSCALE_NONE = 0
Station numbers become X or Y locations
gxapi.IP_STNSCALE_ASPACE = 1
Multiply station numbers by the A spacing
gxapi.IP_STNSCALE_VALUE = 2
Multiply by an input value.
gxapi.IP_STNSCALE_FILE = 3
Look up locations from a CSV Line/Station/X/Y file

IP_SYS constants

Instrument
gxapi.IP_SYS_IPDATA = 0
gxapi.IP_SYS_IP2 = 1
gxapi.IP_SYS_IP6 = 2
gxapi.IP_SYS_IP10 = 3
gxapi.IP_SYS_SYSCALR2 = 4
gxapi.IP_SYS_IPR11 = 5
gxapi.IP_SYS_IPR12 = 6
gxapi.IP_SYS_PHOENIX = 7
gxapi.IP_SYS_PHOENIX_V2 = 8
gxapi.IP_SYS_ELREC_PRO = 9

IP_UBC_CONTROL constants

Types of Domains
gxapi.IP_UBC_CONTROL_NONE = -1
gxapi.IP_UBC_CONTROL_DEFAULT = 0
gxapi.IP_UBC_CONTROL_FILE = 1
gxapi.IP_UBC_CONTROL_VALUE = 2
gxapi.IP_UBC_CONTROL_LENGTH = 3

IP_PLDP_CONV constants

Types of Domains
gxapi.IP_PLDP_CONV_CLOSE_RX = 0
gxapi.IP_PLDP_CONV_MID_RX = 1
gxapi.IP_PLDP_CONV_DISTANT_RX = 2