Skip to content
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
3.7.1
3.6.3
3.5.4
7 changes: 3 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
Segpy 2
=======

Segpy is open source software created by Sixty North and licensed under the GNU Affero General Public License.
This is the SSIO port of SEGPY and is maintained by SSIO.

Alternative commercial license terms are available from Sixty North AS if you wish to redistribute Segpy as
part of a proprietary closed source product or deliver software software-as-a-service (SaaS) using Segpy as part
of a proprietary closed source service.
Segpy is open source software created by Sixty North and licensed under the GNU Affero General Public License.

As such it is free to use for any purposes as defined in the Affero GPU License hereto attached.
Status
======

Expand Down
2 changes: 1 addition & 1 deletion segpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

__version__ = '2.0.4'
__version__ = '2.0.6'

log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())
Expand Down
213 changes: 107 additions & 106 deletions segpy/binary_reel_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,39 +187,40 @@ class BinaryReelHeader(Header):
START_OFFSET_IN_BYTES = 3201
LENGTH_IN_BYTES = 400

job_id_num = field(
Int32, offset=3201, default=0, documentation=
"Job identification number")
# job_id_num = field(
# Int32, offset=3201, default=0, documentation=
# "Job identification number")
#

line_num = field(
NNInt32, offset=3205, default=0, documentation=
"Line number. For 3-D poststack data, this will typically contain the in-line number."
)

reel_num = field(
Int32, offset=3209, default=0, documentation=
"Reel number."
)

data_traces_per_ensemble = field(
NNInt16, offset=3213, default=0, documentation=
"Number of data traces per ensemble. Mandatory for prestack data."
)

auxiliary_traces_per_ensemble = field(
NNInt16, offset=3215, default=0, documentation=
"Number of auxiliary traces per ensemble. Mandatory for prestack data."
)
#
# reel_num = field(
# Int32, offset=3209, default=0, documentation=
# "Reel number."
# )
#
# data_traces_per_ensemble = field(
# NNInt16, offset=3213, default=0, documentation=
# "Number of data traces per ensemble. Mandatory for prestack data."
# )
#
# auxiliary_traces_per_ensemble = field(
# NNInt16, offset=3215, default=0, documentation=
# "Number of auxiliary traces per ensemble. Mandatory for prestack data."
# )

sample_interval = field(
NNInt16, offset=3217, default=0, documentation=
"Sample interval in microseconds (μs). Mandatory for all data types."
)

original_field_sample_interval = field(
NNInt16, offset=3219, default=0, documentation=
"Sample interval in microseconds (μs) of original field recording."
)
# original_field_sample_interval = field(
# NNInt16, offset=3219, default=0, documentation=
# "Sample interval in microseconds (μs) of original field recording."
# )

num_samples = field(
NNInt16, offset=3221, default=0, documentation=
Expand All @@ -238,95 +239,95 @@ class BinaryReelHeader(Header):
documentation=DataSampleFormat.__doc__
)

ensemble_fold = field(
NNInt16, offset=3227, default=0, documentation=
"""Ensemble fold. The expected number of data traces per trace ensemble (e.g. the CMP fold).
Highly recommended for all types of data."""
)
# ensemble_fold = field(
# NNInt16, offset=3227, default=0, documentation=
# """Ensemble fold. The expected number of data traces per trace ensemble (e.g. the CMP fold).
# Highly recommended for all types of data."""
# )

trace_sorting = field(
TraceSortingField, offset=3229, default=0,
documentation=TraceSorting.__doc__)

vertical_sum_code = field(
NNInt16, offset=3231, default=0, documentation=
"""Vertical sum code:
1 = no sum,
2 = two sum,
...,
N=M-1 sum (M=2to32,767)."""
)

sweep_frequency_at_start = field(
NNInt16, offset=3233, default=0, documentation=
"Sweep frequency at start (Hz)."
)

sweep_frequency_at_end = field(
NNInt16, offset=3235, default=0, documentation=
"Sweep frequency at end (Hz)."
)

sweep_length = field(
NNInt16, offset=3237, default=0, documentation=
"Sweep length in milliseconds."
)

sweep_type = field(
segpy.trace_header.SweepTypeField, offset=3239, default=0,
documentation=segpy.trace_header.SweepType.__doc__
)

sweep_trace_number = field(
Int16, offset=3241, default=0, documentation=
"Trace number of sweep channel."
)

sweep_trace_taper_length_at_start = field(
NNInt16, offset=3243, default=0, documentation=
"Sweep trace taper length at start in milliseconds."
)

sweep_trace_taper_length_at_end = field(
NNInt16, offset=3245, default=0, documentation=
"Sweep trace taper length at end in milliseconds."
)

taper_type = field(
segpy.trace_header.TaperTypeField, offset=3247, default=0,
documentation=segpy.trace_header.TaperType.__doc__
)

correlated_data_traces = field(
CorrelatedDataTracesField, offset=3249, default=0,
documentation=CorrelatedDataTraces.__doc__
)

binary_gain_recovered = field(
BinaryGainRecoveredField, offset=3251, default=0,
documentation=BinaryGainRecovered.__doc__
)

amplitude_recovery_method = field(
AmplitudeRecoveryMethodField, offset=3253, default=0,
documentation=AmplitudeRecoveryMethod.__doc__
)

measurement_system = field(
MeasurementSystemField, offset=3255, default=0,
documentation=MeasurementSystem.__doc__
)

impulse_signal_polarity = field(
ImpulseSignalPolarityField, offset=3257, default=0,
documentation=ImpulseSignalPolarity.__doc__
)

vibratory_polarity_code = field(
VibratoryPolarityCodeField,
offset=3259, default=0,
documentation=VibratoryPolarityCode.__doc__
)
# vertical_sum_code = field(
# NNInt16, offset=3231, default=0, documentation=
# """Vertical sum code:
# 1 = no sum,
# 2 = two sum,
# ...,
# N=M-1 sum (M=2to32,767)."""
# )
#
# sweep_frequency_at_start = field(
# NNInt16, offset=3233, default=0, documentation=
# "Sweep frequency at start (Hz)."
# )
#
# sweep_frequency_at_end = field(
# NNInt16, offset=3235, default=0, documentation=
# "Sweep frequency at end (Hz)."
# )
#
# sweep_length = field(
# NNInt16, offset=3237, default=0, documentation=
# "Sweep length in milliseconds."
# )
#
# sweep_type = field(
# segpy.trace_header.SweepTypeField, offset=3239, default=0,
# documentation=segpy.trace_header.SweepType.__doc__
# )
#
# sweep_trace_number = field(
# Int16, offset=3241, default=0, documentation=
# "Trace number of sweep channel."
# )
#
# sweep_trace_taper_length_at_start = field(
# NNInt16, offset=3243, default=0, documentation=
# "Sweep trace taper length at start in milliseconds."
# )
#
# sweep_trace_taper_length_at_end = field(
# NNInt16, offset=3245, default=0, documentation=
# "Sweep trace taper length at end in milliseconds."
# )
#
# taper_type = field(
# segpy.trace_header.TaperTypeField, offset=3247, default=0,
# documentation=segpy.trace_header.TaperType.__doc__
# )
#
# correlated_data_traces = field(
# CorrelatedDataTracesField, offset=3249, default=0,
# documentation=CorrelatedDataTraces.__doc__
# )
#
# binary_gain_recovered = field(
# BinaryGainRecoveredField, offset=3251, default=0,
# documentation=BinaryGainRecovered.__doc__
# )
#
# amplitude_recovery_method = field(
# AmplitudeRecoveryMethodField, offset=3253, default=0,
# documentation=AmplitudeRecoveryMethod.__doc__
# )
#
# measurement_system = field(
# MeasurementSystemField, offset=3255, default=0,
# documentation=MeasurementSystem.__doc__
# )
#
# impulse_signal_polarity = field(
# ImpulseSignalPolarityField, offset=3257, default=0,
# documentation=ImpulseSignalPolarity.__doc__
# )
#
# vibratory_polarity_code = field(
# VibratoryPolarityCodeField,
# offset=3259, default=0,
# documentation=VibratoryPolarityCode.__doc__
# )

format_revision_num = field(
FormatRevisionNumField, offset=3501, default=0x100, documentation=
Expand Down
6 changes: 4 additions & 2 deletions segpy/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ def __set__(self, instance, value):
try:
self._instance_data[instance] = self._named_field._value_type(value)
except ValueError as e:
raise ValueError("Assigned value {!r} for {} attribute must be convertible to {}: {}"
.format(value, self._name, self._named_field._value_type.__name__, e)) from e
self._instance_data[instance] = self._named_field.default
# # raise ValueError("Assigned value {!r} for {} attribute must be convertible to {}: {}"
# # .format(value, self._name, self._named_field._value_type.__name__, e)) from e

def __delete__(self, instance):
raise AttributeError("Can't delete {} attribute".format(self._name))
Expand All @@ -308,3 +309,4 @@ def __delete__(self, instance):
class Header(BaseHeader, metaclass=FormatMeta):
"""A base class for header definition classes."""
pass

Loading