GXSEGYREADER class¶
- class GXSEGYREADER(handle=0)[source]¶
GXSEGYREADER class.
Convert 3D SEG Y files to voxel or database.
- add_trace_filter(offset, value1, value2, constraint)[source]¶
Add a filter based on trace header fields.
- Parameters:
offset (int) – byte-offset of the field to filter by.
value1 (int) – If
constraint
is EQUAL and NOT_EQUAL, this is the value to compare the field to. For IN_RANGE and NOT_IN_RANGE, this is the minimum.value2 (int) – If
constraint
is EQUAL and NOT_EQUAL, this parameter is ignored For IN_RANGE and NOT_IN_RANGE, this is the maximum.constraint (str) – How the values are compared. Can be “IN_RANGE”, “NOT_IN_RANGE”, “EQUAL” or “NOT_EQUAL”.
New in version 9.7.
License: Geosoft End-User License
- check_sane_inline_crossline(is_sane, possibly_swapped, only_one_line)[source]¶
Checks if the currently-configured inline and crossline fields seem sensible.
- Parameters:
New in version 9.6.
License: Geosoft End-User License
- clear_trace_dummy_value()[source]¶
Disables the trace dummy value.
New in version 9.7.
License: Geosoft End-User License
- clear_trace_filters()[source]¶
Remove all active trace filters.
New in version 9.7.
License: Geosoft End-User License
- clear_user_range()[source]¶
Clears inline and crossline ranges to clamp to.
New in version 9.7.
License: Geosoft End-User License
- clear_user_z_range()[source]¶
Clears Z-range to clamp to, disbling z-clamping.
New in version 9.7.
License: Geosoft End-User License
- count_traces_that_pass_filters()[source]¶
Count the number of traces that pass the currently-configured trace filters.
- Return type:
int
New in version 9.7.
License: Geosoft End-User License
- estimate_number_of_traces(data_type_name, number_of_samples)[source]¶
Get the number of traces that would be in the SEG-Y file, given a trace length and data type.
- Parameters:
data_type_name (str) – The name of a supported data type.
number_of_samples (int) – The number of samples to return
- Return type:
int
New in version 9.6.
License: Geosoft End-User License
- export_files()[source]¶
Exports contents of SEG Y file to voxel and/or database.
New in version 9.7.
License: Geosoft End-User License
- export_voxel_and_database(voxel_filename, gdb_filename)[source]¶
Exports contents of SEG Y file to voxel and/or database.
- Parameters:
voxel_filename (str) – Output voxel file name
gdb_filename (str) – Output database file name
New in version 9.6.
License: Geosoft End-User License
- get_binary_header()[source]¶
Get the SEG Y file’s binary header.
- Returns:
- class:’LTB’ containing three columns:
the field name, offset, and value. The value column will be in text form, suitable for display to the end user.
- Return type:
New in version 9.6.
License: Geosoft End-User License
- get_clip_xy_extents(is_clip_valid, x_min, x_max, y_min, y_max)[source]¶
Gets the X,Y extents to clip the voxel.
- Parameters:
New in version 9.7.
License: Geosoft End-User License
- get_endianess()[source]¶
Returns true if the file is little endian. false if it is big endian.
- Return type:
bool
New in version 9.6.
License: Geosoft End-User License
- get_field_configuration()[source]¶
Returns information on the data in the trace headers.
- Returns:
:class:’LTB’ containing trace header information
- Return type:
New in version 9.6.
License: Geosoft End-User License
- get_georeferencing()[source]¶
Returns the georeferencing of the voxel that would be exported with the current configuration.
- Return type:
New in version 9.6.
License: Geosoft End-User License
- get_inline_and_crossline_azimuths(inline_azimuth, crossline_azimuth)[source]¶
Get the inline and crossline azimuths, in degrees
- Parameters:
New in version 9.6.
License: Geosoft End-User License
- get_is_3d()[source]¶
Returns true if the file is 3D false if it is 2D.
- Return type:
bool
New in version 9.7.
License: Geosoft End-User License
- get_last_sample_at(value)[source]¶
Returns the depth of the last sample in the traces, in the units specified by
SetZUnits()
- Parameters:
value (float_ref) – Out-parameter containing the depth of the last sample in the traces.
New in version 9.6.
License: Geosoft End-User License
- classmethod get_num_trace_data_types()[source]¶
Returns the number of supported trace data types.
- Return type:
int
New in version 9.6.
License: Geosoft End-User License
- get_possible_z_units(z_units_list)[source]¶
Get a list of the possible values that can be passed to
SetZUnits()
. The values returned by this function depend on what the z-type is set to.- Parameters:
z_units_list (str_ref) – List of possible z-units,separated by newlines
New in version 9.6.
License: Geosoft End-User License
- get_sample_interval(sample_interval)[source]¶
Returns the sample interval of the trace data.
- Parameters:
sample_interval (float_ref) – output parameter for sample interval
New in version 9.6.
License: Geosoft End-User License
- get_sample_interval_configuration(which_header, location)[source]¶
Specifies where the sample interval comes from: can be a field in the binary file header, a field in the trace header, or a value specified by the user.
- Parameters:
New in version 9.6.
License: Geosoft End-User License
- get_slice_filenames(filename_list)[source]¶
Returns a list of the filenames of the XY slices that will be exported.
- Parameters:
filename_list (str_ref) – List of filenames,separated by newlines
New in version 9.7.
License: Geosoft End-User License
- get_text_header(text)[source]¶
Get the SEG Y file’s text header.
- Parameters:
text (str_ref) – The text header contents.
New in version 9.6.
License: Geosoft End-User License
- get_tie_point(i, x, y, in_line, cross_line)[source]¶
Return the currently-active tie points. If SetTiePoints() has not already been called, then the returned points will be the automatically-selected ones.
- Parameters:
New in version 9.6.
License: Geosoft End-User License
- get_trace_count(count)[source]¶
Get the number of traces in the SEG Y file
- Parameters:
count (int_ref) – Trace count
New in version 9.6.
License: Geosoft End-User License
- get_trace_data(trace_number)[source]¶
Get the SEG Y trace file header data for a particular starting trace
- Parameters:
trace_number (int) – Which trace to read
- Returns:
:class:’VV’ containing the data from the trace header
- Return type:
New in version 9.10.
License: Geosoft End-User License
- get_trace_data_at(data_type_name, number_of_samples, current_trace, is_big_endian)[source]¶
Get the SEG Y trace file data for a particular data type, number of samples, and starting trace
- Parameters:
data_type_name (str) – The name of a supported data type.
number_of_samples (int) – The number of samples to return
current_trace (int) – The trace to start at
is_big_endian (int) – 1 for big endian, 0 for small
- Returns:
:class:’VV’ containing the data from the traces
- Return type:
New in version 9.6.
License: Geosoft End-User License
- get_trace_data_type(name)[source]¶
Get the data type of the trace data. This will match one of the names rfeturned by
GetTraceDataTypeName()
- Parameters:
name (str_ref) – The name of data type.
New in version 9.6.
License: Geosoft End-User License
- classmethod get_trace_data_type_display_name(index, name)[source]¶
Get a string, suitable for displaying to the user, describing the type returned by passing the same
index
value toGetTraceDataTypeName()
- Parameters:
index (int) – Which name to return.
name (str_ref) – The display name of a supported data type.
New in version 9.6.
License: Geosoft End-User License
- classmethod get_trace_data_type_name(index, name)[source]¶
Get the name of one of the available data types. These are the names used as identifiers in this API. To get a name suitable for displaying to the user, use `GetTraceDataTypeDisplayName() instead.
- Parameters:
index (int) – Which name to return. Call this function for each value between 0 and the value returned by
GetNumTraceTypes()
to get a full list of the available types.name (str_ref) – The name of a supported data type.
New in version 9.6.
License: Geosoft End-User License
- get_trace_header_as_json(trace_number, text)[source]¶
Return the contents of a trace header as JSON.
- Parameters:
trace_number (int) – Which trace to read
text (str_ref) – Trace header as JSON.
New in version 9.10.
License: Geosoft End-User License
- get_trace_header_at(data_type_name, number_of_samples, current_trace, is_big_endian)[source]¶
Get the SEG Y trace file header data for a particular starting trace
- Parameters:
data_type_name (str) – The name of a supported data type.
number_of_samples (int) – The number of samples to return
current_trace (int) – The trace to start at
is_big_endian (int) – 1 for big endian, 0 for small
- Returns:
:class:’VV’ containing the data from the trace header
- Return type:
New in version 9.6.
License: Geosoft End-User License
- get_trace_length()[source]¶
Returns the number of data samples per trace.
- Return type:
int
New in version 9.6.
License: Geosoft End-User License
- get_trace_length_configuration(which_header, location)[source]¶
Specifies where the trace length comes from: can be a field in the binary file header, a field in the trace header, or a value specified by the user.
- Parameters:
New in version 9.6.
License: Geosoft End-User License
- get_voxel_cell_size(x, y, z)[source]¶
Get the cell size of the voxel that would be exported with the current configuration.
- Parameters:
New in version 9.6.
License: Geosoft End-User License
- get_voxel_dimensions(x, y, z)[source]¶
Get the size of the voxel that would be exported with the current configuration.
- Parameters:
New in version 9.6.
License: Geosoft End-User License
- get_xy_units(xy_units)[source]¶
Get the currently-specified xy-units.
- Parameters:
xy_units (str_ref) – The name of the units.
New in version 9.6.
License: Geosoft End-User License
- get_z_offset(z_offset)[source]¶
Returns the z-offset (time delay) of the trace data. Positive values correspond to a deeper top-of-trace; negative values to a higher top-of-trace.
- Parameters:
z_offset (float_ref) – The z offset/time delay
New in version 9.6.
License: Geosoft End-User License
- get_z_offset_configuration(which_header, location)[source]¶
Specifies where the z-offset (time delay) comes from: can be a field in the binary file header, a field in the trace header, or a value specified by the user.
- Parameters:
New in version 9.6.
License: Geosoft End-User License
- get_z_offset_units(z_units)[source]¶
Get the currently-specified units for the z offset.
- Parameters:
z_units (str_ref) – List of possible z-units,separated by newlines
New in version 9.6.
License: Geosoft End-User License
- get_z_type(z_type)[source]¶
Indicate if the z-dimension is time or depth.
- Parameters:
z_type (str_ref) – Either “DEPTH” or “TIME”.
New in version 9.6.
License: Geosoft End-User License
- get_z_units(z_units)[source]¶
Get the currently-specified z-units.
- Parameters:
z_units (str_ref) – The name of the z-units.
New in version 9.6.
License: Geosoft 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
- classmethod list_binary_header_fields()[source]¶
Returns the names and offsets of the fields in the binary header.
- Return type:
New in version 9.6.
License: Geosoft End-User License
- classmethod list_trace_header_fields()[source]¶
Returns the names and offsets of the fields in the trace header.
- Return type:
New in version 9.6.
License: Geosoft End-User License
- classmethod null()[source]¶
A null (undefined) instance of
GXSEGYREADER
- Returns:
A null
GXSEGYREADER
- Return type:
- classmethod open_file(filename)[source]¶
Opens a 3D SEG Y file.
- Parameters:
filename (str) – File name
- Returns:
GXSEGYREADER
handle, terminates if creation fails.- Return type:
New in version 9.6.
License: Geosoft End-User License
Specify the X/Y coordinates of the traces, instead of using values from the trace headers.
- Parameters:
New in version 9.7.
License: Geosoft End-User License
- recalculate_georeferencing()[source]¶
Recalculate georeferencing; call after configuration has changed.
New in version 9.6.
License: Geosoft End-User License
- reset_tie_points()[source]¶
Discard user-supplied tie points and auto-choose new ones..
New in version 9.6.
License: Geosoft End-User License
- scan_file()[source]¶
Scans the SEG Y file, and attempts to guess the layout.
New in version 9.6.
License: Geosoft End-User License
- set_auto_voxel_cell_size_xy()[source]¶
Set the XY cell size of the voxel that would be exported to the dimensions calculated from the tie points..
New in version 9.6.
License: Geosoft End-User License
- set_crossline_slice_indices(indices)[source]¶
Which crossline slices to export to a section grid.
- Parameters:
indices (GXVV) – Which crossline values to export.
New in version 9.7.
License: Geosoft End-User License
- set_endianess(is_little_endian)[source]¶
Set the endianess of the file.
- Parameters:
is_little_endian (bool) – True is file is little endian, false for big endian.
New in version 9.6.
License: Geosoft End-User License
- set_field_configuration(configuration)[source]¶
Sets the interpretation of the fields in the SEG Y file, and specifies which fields should be exported to GDB.
- Parameters:
configuration (GXLTB) –
GXLTB
following the same format as returned byGetFieldConfiguration()
.
New in version 9.6.
License: Geosoft End-User License
- set_gdb_output_filename(filename)[source]¶
Exports contents of SEG Y file to a database.
- Parameters:
filename (str) – Output database file name
New in version 9.7.
License: Geosoft End-User License
- set_georeferencing(ipj)[source]¶
Sets the georeferencing of the voxel that would be exported with the current configuration.
New in version 9.6.
License: Geosoft End-User License
- set_inline_slice_indices(indices)[source]¶
Which inline slices to export to a section grid.
- Parameters:
indices (GXVV) – Which inline values to export.
New in version 9.7.
License: Geosoft End-User License
- set_is_3d(is_3d)[source]¶
Specify if the input SEG-Y file is 3D or 2D.
- Parameters:
is_3d (bool) – True is file is 3D, false for 2D.
New in version 9.7.
License: Geosoft End-User License
- set_sample_interval_configuration(which_header, location, location_or_value)[source]¶
Specifies where the sample interval comes from: can be a field in the binary file header, a field in the trace header, or a value specified by the user.
- Parameters:
which_header (str) – Which header contains the sample interval: “file_header”, “trace_header” or “none”
location (int) – If
which_header
is “file_header” or “trace_header”, then this parameter is the offset of the field containing the sample interval. Ifwhich_header
is “none”, thenthis parameter is ignored.location_or_value (float) – If
which_header
is “file_header” or “trace_header”, then this parameter is ignored. Ifwhich_header
is “none”, thenthis parameter is the sample interval.
New in version 9.6.
License: Geosoft End-User License
- set_section_output_filename(filename)[source]¶
Exports contents of SEG Y file to a crooked section.
- Parameters:
filename (str) – Output crooked section file name
New in version 9.7.
License: Geosoft End-User License
- set_slice_output_prefix(prefix)[source]¶
Exports inline or crossline slices to a section grid.
- Parameters:
prefix (str) – Output section file name prefix
New in version 9.7.
License: Geosoft End-User License
- set_tie_point(i, x, y, in_line, cross_line)[source]¶
Set the currently-active tie points. If SetTiePoints() has not already been called, then the returned points will be the automatically-selected ones.
- Parameters:
i (int) – Tie point index.
x (float) – x-coordinate
y (float) – inline-coordinate
in_line (int) – Tie point index.
cross_line (int) – crossline-coordinate
New in version 9.6.
License: Geosoft End-User License
- set_trace_data_type(name)[source]¶
Set the data type of the trace data. This must match one of the names returned by
GetTraceDataTypeName()
- Parameters:
name (str) – The name of data type.
New in version 9.6.
License: Geosoft End-User License
- set_trace_dummy_value(dummy_value)[source]¶
Sets the trace dummy value.
- Parameters:
dummy_value (float) – trace dummy value
New in version 9.7.
License: Geosoft End-User License
- set_trace_length_configuration(which_header, location_or_value)[source]¶
Specifies where the trace length comes from: can be a field in the binary file header, a field in the trace header, or a value specified by the user.
- Parameters:
which_header (str) – Which header contains the trace length: “file_header”, “trace_header” or “none”
location_or_value (int) – If
which_header
is “file_header” or “trace_header”, then this parameter is the offset of the field containing the trace length. Ifwhich_header
is “none”, then this parameter is the actual trace length.
New in version 9.6.
License: Geosoft End-User License
- set_user_crossline_range(crossline_min, crossline_max, crossline_stride, factor)[source]¶
Sets crossline-range to clamp to.
- Parameters:
crossline_min (int) – crossline minimum
crossline_max (int) – crossline maximum
crossline_stride (int) – crossline stride
factor (int) – Decimation factor
New in version 9.7.
License: Geosoft End-User License
- set_user_inline_range(inline_min, inline_max, inline_stride, factor)[source]¶
Sets inline-range to clamp to.
- Parameters:
inline_min (int) – inline minimum
inline_max (int) – inline maximum
inline_stride (int) – inline stride
factor (int) – Decimation factor
New in version 9.7.
License: Geosoft End-User License
- set_user_voxel_cell_size_xy(x, y)[source]¶
Set the XY cell size of the voxel that would be exported with the current configuration.
- Parameters:
x (float) – Voxel cell size along X
y (float) – Voxel cell size along Y
New in version 9.6.
License: Geosoft End-User License
- set_user_z_range(z_min, z_max)[source]¶
Sets Z-range to clamp to.
- Parameters:
z_min (float) – Z minimum
z_max (float) – Z maximum
New in version 9.7.
License: Geosoft End-User License
- set_voxel_output_filename(filename)[source]¶
Exports contents of SEG Y file to voxel.
- Parameters:
filename (str) – Output voxel file name
New in version 9.7.
License: Geosoft End-User License
- set_z_decimation(factor)[source]¶
Sets Z decimation factor.
- Parameters:
factor (int) – Decimation factor
New in version 9.7.
License: Geosoft End-User License
- set_z_offset_configuration(which_header, location, value)[source]¶
Specifies where the z-offset (time delay) comes from: can be a field in the binary file header, a field in the trace header, or a value specified by the user.
- Parameters:
which_header (str) – Which header contains the z offset: “file_header”, “trace_header” or “none”
location (int) – If
which_header
is “file_header” or “trace_header”, then this parameter is the offset of the field. Ifwhich_header
is “none”, then this parameter is ignored.value (float) – If
which_header
is “file_header” or “trace_header”, then this parameter is ignored. Ifwhich_header
is “none”, then this parameter is the z offset.
New in version 9.6.
License: Geosoft End-User License
- set_z_offset_units(z_units)[source]¶
Set the units that the z-offset is in.
- Parameters:
z_units (str) – The Z units. Must be one of the strings returned by
GetPossibleZUnits()
.
New in version 9.6.
License: Geosoft End-User License
- set_z_slice_indices(indices)[source]¶
Which z slices to export to a section grid.
- Parameters:
indices (GXVV) – Which z values to export.
New in version 9.7.
License: Geosoft End-User License
- set_z_type(z_type)[source]¶
Specify if the z-dimension is time or depth.
- Parameters:
z_type (str) – Either “DEPTH” or “TIME”.
New in version 9.6.
License: Geosoft End-User License
- set_z_units(z_units)[source]¶
Set the z-units.
- Parameters:
z_units (str) – The Z units. Must be one of the strings returned by
GetPossibleZUnits()
.
New in version 9.6.
License: Geosoft End-User License