2 Channel Lookup

Use the Database Tools > Database Utilities > 2 Channel Lookup menu option (LOOKUP2 GX) to scan values from a Geosoft table based on a two index lookup using two input channels. The primary index channel must match the primary table field exactly. The secondary index channel is used to find a value in the secondary field of the table. Note that the ‘/=’ lines at the top of the lookup table are necessary as they are part of the Geosoft Table format. You cannot have more than the exact number of columns in a lookup table since each field defined by ‘/=’ is related to each column in sequential order.

2 Channel Lookup dialog options

Lookup table name

The lookup table name.

Script Parameter: LOOKUP2.TABLE

Primary index channel

Database primary reference channel name.

Script Parameter: LOOKUP2.CHAN1

Table primary index field

Table primary reference field. If not specified, the primary reference channel name is used.

Script Parameter: LOOKUP2.INDEX1

Secondary index channel

Database secondary reference channel name.

Script Parameter: LOOKUP2.CHAN2

Table secondary index field

Table secondary reference field. If not specified, the secondary reference channel name is used.

Script Parameter: LOOKUP2.INDEX2

Output channel

Database output channel name.

Script Parameter: LOOKUP2.OUTCHAN

Table output field

Table output field to place in the output channel. If not specified, the output channel name is used.

Script Parameter: LOOKUP2.OUTDATA

Interpolation method

Interpolation mode: "exact" "nearest" "interpolate" "nearest close" "interpolate close" See below for a description of each mode.

Script Parameter: LOOKUP2.INTERP

Search method

Table search mode: "linear" for linear up or down search. "binary" for binary search.

Script Parameter: LOOKUP2.MODE

Nominal spacing

The nominal spacing to determines the distance below which the "interpolation close" and "nearest close" options are applied.

The default setting is calculated using the second index fiducial.

Script Parameters: LOOKUP2.SPACING

Application Notes

A two-index lookup is ideal for date and time table lookups.

Interpolation methods:

"exact"

Finds exact table matches only. Values that do not match are set to dummy.

"nearest"

The result is set to the nearest value.

"interpolate"

The result is interpolated between table values.

"nearest close"

The result is set to the nearest value, but only if the reference value is within the nominal reference channel spacing. Other values are set to dummy.

"interpolate close"

The result is interpolated between lookup values, but only if the reference value is within the nominal reference channel spacing. Other values are set to dummy.

The interpolation modes only apply to the secondary index. The primary index must match the primary field exactly.

Search mode:

Use "linear" if the reference channel data is ordered, either up or down. For ordered data, a linear search will be up to four times faster than a binary search.

Use "binary" if the reference channel data is randomly ordered. A "Binary" search can be very much faster than a linear search when the data is randomly sorted.